diff --git a/spec/features/admin/enterprises/business_address_form_spec.rb b/spec/system/admin/enterprises/business_address_form_spec.rb similarity index 99% rename from spec/features/admin/enterprises/business_address_form_spec.rb rename to spec/system/admin/enterprises/business_address_form_spec.rb index 38c9681db7f..38f01a1ab0f 100644 --- a/spec/features/admin/enterprises/business_address_form_spec.rb +++ b/spec/system/admin/enterprises/business_address_form_spec.rb @@ -1,4 +1,4 @@ -require "spec_helper" +require "system_helper" describe "Business Address" do include WebHelper diff --git a/spec/features/admin/enterprises/images_spec.rb b/spec/system/admin/enterprises/images_spec.rb similarity index 89% rename from spec/features/admin/enterprises/images_spec.rb rename to spec/system/admin/enterprises/images_spec.rb index 89a96f17062..072af5b0083 100644 --- a/spec/features/admin/enterprises/images_spec.rb +++ b/spec/system/admin/enterprises/images_spec.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -require "spec_helper" +require "system_helper" describe "Managing enterprise images" do include WebHelper @@ -18,6 +18,10 @@ end describe "images for an enterprise" do + + let(:alert_text_logo) {'The logo will be removed immediately after you confirm'.strip} + let(:alert_text_promo) {'The promo image will be removed immediately after you confirm.'.strip} + def go_to_images within(".side_menu") do click_link "Images" @@ -53,8 +57,9 @@ def go_to_images # Removing image within ".page-admin-enterprises-form__logo-field-group" do - click_on "Remove Image" - accept_js_alert + accept_alert(alert_text_logo) do + click_on "Remove Image" + end end expect(page).to have_content("Logo removed successfully") @@ -91,8 +96,9 @@ def go_to_images # Removing image within ".page-admin-enterprises-form__promo-image-field-group" do - click_on "Remove Image" - accept_js_alert + accept_alert(alert_text_promo) do + click_on "Remove Image" + end end expect(page).to have_content("Promo image removed successfully") diff --git a/spec/features/admin/enterprises/index_spec.rb b/spec/system/admin/enterprises/index_spec.rb similarity index 99% rename from spec/features/admin/enterprises/index_spec.rb rename to spec/system/admin/enterprises/index_spec.rb index 676976351b9..019ca733a2e 100644 --- a/spec/features/admin/enterprises/index_spec.rb +++ b/spec/system/admin/enterprises/index_spec.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -require 'spec_helper' +require 'system_helper' describe 'Enterprises Index' do include WebHelper diff --git a/spec/features/admin/enterprises/terms_and_conditions_spec.rb b/spec/system/admin/enterprises/terms_and_conditions_spec.rb similarity index 99% rename from spec/features/admin/enterprises/terms_and_conditions_spec.rb rename to spec/system/admin/enterprises/terms_and_conditions_spec.rb index a2ff0a03204..716519f9ca0 100644 --- a/spec/features/admin/enterprises/terms_and_conditions_spec.rb +++ b/spec/system/admin/enterprises/terms_and_conditions_spec.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -require "spec_helper" +require "system_helper" describe "Uploading Terms and Conditions PDF" do include AuthenticationHelper