diff --git a/spec/system/admin/enterprises_spec.rb b/spec/system/admin/enterprises_spec.rb index a6b4cdbb8a9..a70ed7084a7 100644 --- a/spec/system/admin/enterprises_spec.rb +++ b/spec/system/admin/enterprises_spec.rb @@ -101,6 +101,7 @@ # 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 @@ 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 @@ 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