Use refresh instead of visiting the current page

This way it's more obvious what's going on.

Note that, in this case, the expectations were **not** true before
visiting the page, so we aren't fixing a flaky test.
This commit is contained in:
Javi Martín
2025-03-14 22:24:44 +01:00
parent 1593a150e7
commit 533d2198ee
17 changed files with 26 additions and 26 deletions

View File

@@ -34,7 +34,7 @@ shared_examples "flaggable" do |factory_name, admin: false|
expect(page).not_to have_link "Flag as inappropriate", visible: :all
end
visit path
refresh
within "##{dom_id(flaggable)} .flag-content" do
expect(page).to have_link "Unflag", visible: :hidden