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

LiveViewTest reports flash present when navigating between views in different sessions, when it is not #3171

Open
sevenseacat opened this issue Mar 12, 2024 · 0 comments

Comments

@sevenseacat
Copy link
Contributor

Environment

  • Elixir version (elixir -v): Elixir 1.15.7 (compiled with Erlang/OTP 26)
  • Phoenix version (mix deps): phoenix 1.7.11
  • Phoenix LiveView version (mix deps): phoenix_live_view 0.20.12
  • Operating system: MacOS Sonoma 14.2.1
  • Browsers you attempted to reproduce this bug on (the more the merrier): Firefox, Safari
  • Does the problem persist after removing "assets/node_modules" and trying again? Yes/no: Yes

Actual behavior

See commit in reproduction app: sevenseacat/test_flash_session_bug@81e8964

(I put it in an app because I couldn't work out how to write/run tests in a single-file app)

Flash messages are not passed between LiveViews mounted in different sessions (verified by running the sample app and clicking from /one to Two) yet the test reports that the flash is rendered on the page.

Expected behavior

This test sevenseacat/test_flash_session_bug@81e8964#diff-2e5c87a4402d040320c823b9f1664bf3a42b06d0e66ba98db0a0fe1488867997R5-R15 should pass because the flash is not present on the page when viewed normally, but is present when run during the test.

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

No branches or pull requests

1 participant