Skip to content

Comments

Add PhoenixTest.reload_page/1 helper#275

Merged
germsvel merged 4 commits intogermsvel:mainfrom
ftes:feature/refresh
Jan 24, 2026
Merged

Add PhoenixTest.reload_page/1 helper#275
germsvel merged 4 commits intogermsvel:mainfrom
ftes:feature/refresh

Conversation

@ftes
Copy link
Contributor

@ftes ftes commented Nov 12, 2025

I think this is often helpful to check that some state is persisted, even after a LiveView reloads.

Copy link
Owner

@germsvel germsvel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I haven't needed this, but I can see how it can be helpful. I would love to add it.

What do you think about changing the name to reload_page?

I think "reload" is a more common term (at least, I was looking around and that seems to be more common):

Chrome DevTools Protocol👇

Image

My browser reload tooltip 👇

Image

And I would say let's just name it reload, but depending on where you are in the pipeline, it might not be clear what you're reloading.

Some of our other actions have the some tag name alongside it click_link, click_button... hence my thoughts landing on reload_page.

What do you think? Any reason I'm missing why we'd want to call it refresh (or maybe reload) instead of reload_page?

@ftes
Copy link
Contributor Author

ftes commented Dec 4, 2025

I agree with your reasoning, refresh_page seems the best option 👍

@ftes ftes changed the title Add PhoenixTest.refresh/1 helper Add PhoenixTest.reload_page/1 helper Dec 4, 2025
@germsvel germsvel merged commit 0818b12 into germsvel:main Jan 24, 2026
2 checks passed
@germsvel
Copy link
Owner

Thanks @ftes! Finally resolved those conflicts and got this in. 🎉

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