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

@@ -68,7 +68,7 @@ describe "Admin booths", :admin do
expect(page).to have_content "Booth created successfully"
visit admin_booths_path
refresh
expect(page).to have_content "Upcoming booth"
expect(page).to have_content "39th Street, number 2, ground floor"
end

View File

@@ -64,7 +64,7 @@ describe "Poll question options", :admin do
expect(page).to have_content "Changes saved"
expect(page).to have_content "New title"
visit admin_question_path(question)
refresh
expect(page).not_to have_content "Answer title"