From 2e301a67b077a9135d322869fbc43927ff933cde Mon Sep 17 00:00:00 2001 From: filipefurtad0 Date: Fri, 22 Dec 2023 14:24:37 +0000 Subject: [PATCH] Moves test introduced by #11799 to a section in the spec where a modal does not need acceptance Tests forward navigation --- spec/system/admin/enterprises_spec.rb | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/spec/system/admin/enterprises_spec.rb b/spec/system/admin/enterprises_spec.rb index a6b4cdbb8a..a70ed7084a 100644 --- a/spec/system/admin/enterprises_spec.rb +++ b/spec/system/admin/enterprises_spec.rb @@ -101,6 +101,7 @@ describe ' # expect(page).to have_checked_field "enterprise_enable_subscriptions_false" accept_alert do + scroll_to(:bottom) within(".side_menu") { click_link "Users" } end select2_select user.email, from: 'enterprise_owner_id' @@ -120,14 +121,6 @@ describe ' click_link "Primary Details" end - # Back navigation loads the tab content - page.execute_script('window.history.back()') - expect(page).to have_selector '#enterprise_description' - - accept_alert do - click_link "Primary Details" - end - # Unchecking hides the Properties tab uncheck 'enterprise_is_primary_producer' choose 'None' @@ -256,6 +249,14 @@ describe ' expect(page).to have_checked_field "enterprise_require_login_true" expect(page).to have_checked_field "enterprise_enable_subscriptions_true" + # Back navigation loads the tab content + page.execute_script('window.history.back()') + expect(page).to have_selector '#enterprise_description' + + # Forward navigation brings back the previous tab + page.execute_script('window.history.forward()') + expect(page).to have_content 'This is my shopfront message.' + # Test that the right input alert text is displayed accept_alert('Please enter a URL to insert') do first('.ta-text').click