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