Leave tag rules spec in clean state

This commit is contained in:
Maikel Linke
2020-01-16 10:42:33 +11:00
parent 3a9aaf6764
commit 4d53f47d88

View File

@@ -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