diff --git a/spec/features/admin/tag_rules_spec.rb b/spec/features/admin/tag_rules_spec.rb index f6087364fe..ffc2c1c065 100644 --- a/spec/features/admin/tag_rules_spec.rb +++ b/spec/features/admin/tag_rules_spec.rb @@ -231,6 +231,13 @@ feature 'Tag Rules', js: true do end expect(page).to have_no_selector "#tr_0" end.to change{ TagRule.count }.by(-2) + + # After deleting tags, the form is dirty and we need to confirm leaving + # the page. If we don't do it here, Capybara may timeout waiting for the + # confirmation while resetting the session. + accept_confirm do + visit("about:blank") + end end end