Moves test introduced by #11799 to a section in the spec where a modal does not need acceptance

Tests forward navigation
This commit is contained in:
filipefurtad0
2023-12-22 14:24:37 +00:00
parent 5f7760c3cc
commit 2e301a67b0

View File

@@ -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