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:
@@ -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
|
||||
|
||||
@@ -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"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user