Skip to content

Commit

Permalink
Do explicit save in specs when switching tabs
Browse files Browse the repository at this point in the history
  • Loading branch information
pacodelaluna committed Dec 26, 2024
1 parent 5cd50b1 commit 3ddc08c
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions spec/system/admin/enterprises_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -122,33 +122,33 @@
# Unchecking hides the Properties tab
accept_alert { click_link "Primary Details" }
uncheck 'enterprise_is_primary_producer'
accept_alert { click_link "Admin Only" }
click_button 'Update'
click_link "Admin Only"
choose 'None'
expect(page).not_to have_selector "[data-test=link_for_enterprise_fees]"
expect(page).not_to have_selector "[data-test=link_for_payment_methods]"
expect(page).not_to have_selector "[data-test=link_for_shipping_methods]"
expect(page).not_to have_selector "[data-test=link_for_properties]"
click_button 'Update'
# Checking displays the Properties tab
accept_alert { click_link "Primary Details" }
check 'enterprise_is_primary_producer'
expect(page).to have_selector "[data-test=link_for_enterprise_fees]"
expect(page).not_to have_selector "[data-test=link_for_payment_methods]"
expect(page).not_to have_selector "[data-test=link_for_shipping_methods]"
expect(page).to have_selector "[data-test=link_for_properties]"
accept_alert { click_link "Primary Details" }
uncheck 'enterprise_is_primary_producer'
accept_alert { click_link "Admin Only" }
click_button 'Update'
click_link "Admin Only"
choose 'Own'
expect(page).to have_selector "[data-test=link_for_enterprise_fees]"
expect(page).to have_selector "[data-test=link_for_payment_methods]"
expect(page).to have_selector "[data-test=link_for_shipping_methods]"
accept_alert { click_link "Admin Only" }
choose 'Any'
expect(page).to have_selector "[data-test=link_for_enterprise_fees]"
expect(page).to have_selector "[data-test=link_for_payment_methods]"
expect(page).to have_selector "[data-test=link_for_shipping_methods]"
click_button 'Update'

accept_alert { click_link "Primary Details" }
page.find("#enterprise_group_ids-ts-control").set(eg1.name)
page.find("#enterprise_group_ids-ts-dropdown .option.active").click

Expand Down

0 comments on commit 3ddc08c

Please sign in to comment.