Use JavaScript in tests opening modal dialogs
This way we reproduce the user experience in the tests, and we can make sure modal dialogs open when we expect it.
This commit is contained in:
@@ -63,11 +63,11 @@ describe "Valuator groups", :admin do
|
||||
expect(page).to have_content "Health and Sports"
|
||||
end
|
||||
|
||||
scenario "Delete" do
|
||||
scenario "Delete", :js do
|
||||
create(:valuator_group)
|
||||
|
||||
visit admin_valuator_groups_path
|
||||
click_link "Delete"
|
||||
accept_confirm { click_link "Delete" }
|
||||
|
||||
expect(page).to have_content "Valuator group deleted successfully"
|
||||
expect(page).to have_content "There are no valuator groups"
|
||||
|
||||
Reference in New Issue
Block a user