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

Handle form redirects in Live pages #21

Merged
merged 1 commit into from
Feb 10, 2024
Merged

Conversation

germsvel
Copy link
Owner

@germsvel germsvel commented Feb 10, 2024

Closes #19

What changed?

Our Live implementation doesn't handle form redirects, be they to another LiveView with push_navigate/2 or to a static page via redirect/2.

This commit updates the implementation to follow redirects the same way we follow redirects when we click on links.

Testing note

We also create a new describe block to encapsulate all the testing for fill_form/3 + click_button/2.

What changed?
============

Our `Live` implementation doesn't handle form redirects, be they to
another LiveView with `push_navigate/2` or to a static page via
`redirect/2`.

This commit updates the implementation to follow redirects the same way
we follow redirects when we click on links.

Testing note
-----------

We also create a new describe block to for testing `fill_form/3` +
`click_button/2`.
@germsvel germsvel merged commit 531e5e9 into main Feb 10, 2024
1 check passed
@germsvel germsvel deleted the gv-handle-live-form-redirect branch February 10, 2024 16:04
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.

How to test a redirect after form submission?
1 participant