Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support visit/2 for custom drivers #149

Closed
wants to merge 1 commit into from

Conversation

ftes
Copy link
Contributor

@ftes ftes commented Nov 18, 2024

In addition to the auto detection of Live vs. Static via Plug.Conn.

Usage (add a test?):

setup_args
|> MyDriver.build()
|> visit("/path")
...

Alternative (that wouldn't require changes to PhoenixTest)

Instead of adding a visit/2 to the Driver protocol, custom drivers could implement their own variant.
No real downside. Apart from making it more or less obvious that custom drivers are supported.

setup_args
|> MyDriver.visit("/path")
...

@germsvel
Copy link
Owner

Thanks for doing this! I opted for #160 to avoid the need to raise. It's very minor improvement, but I think I like it better since it at least gives us a clue as to what Live and Static do with visit.

@germsvel germsvel closed this Dec 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants