From 1923c0dbc67c69703b2a5fb75cdb1f6d191a4a13 Mon Sep 17 00:00:00 2001 From: Rob Harrington Date: Fri, 1 Jun 2018 08:21:17 +1000 Subject: [PATCH] Update enterprise_fees_spec to work with Selenium --- spec/features/admin/enterprise_fees_spec.rb | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/spec/features/admin/enterprise_fees_spec.rb b/spec/features/admin/enterprise_fees_spec.rb index c3526e1b20..ea23afc938 100644 --- a/spec/features/admin/enterprise_fees_spec.rb +++ b/spec/features/admin/enterprise_fees_spec.rb @@ -97,7 +97,9 @@ feature %q{ visit admin_enterprise_fees_path # And I click delete - find("a.delete-resource").click + accept_alert do + find("a.delete-resource").click + end # Then my enterprise fee should have been deleted visit admin_enterprise_fees_path @@ -116,7 +118,9 @@ feature %q{ visit admin_enterprise_fees_path # And I click delete - find("a.delete-resource").click + accept_alert do + find("a.delete-resource").click + end # Then I should see an error expect(page).to have_content "That enterprise fee cannot be deleted as it is referenced by a product distribution: #{p.id} - #{p.name}."