Skip to content

Commit

Permalink
Merge pull request #12800 from filipefurtad0/adds_retry_option_on_edi…
Browse files Browse the repository at this point in the history
…t_spec

Adds retry option to flaky edit_spec.rb
  • Loading branch information
mkllnk authored Aug 23, 2024
2 parents 8b03611 + 32cd14e commit e2423ad
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions spec/system/admin/order_cycles/edit_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
end

context 'with no attached order' do
it "does not show warning modal" do
it "does not show warning modal", retry: 3 do
login_as_admin
visit edit_admin_order_cycle_path(order_cycle)

Expand Down Expand Up @@ -134,13 +134,14 @@
end

context 'with no attached orders' do
it "does not show warning modal" do
it "does not show warning modal", retry: 3 do
login_as_admin
visit edit_admin_order_cycle_path(order_cycle)

# change non-date range field value
fill_in 'order_cycle_name', with: "OC1 name updated"
expect(page).to have_content('You have unsaved changes')
sleep(2)

# click save
click_button('Save')
Expand All @@ -155,6 +156,7 @@
find("button", text: "Close").click
end
expect(page).to have_content('You have unsaved changes')
sleep(2)

click_button('Save')
expect(page).to have_content('Your order cycle has been updated.')
Expand Down

0 comments on commit e2423ad

Please sign in to comment.