Skip to content

Commit 8aeafac

Browse files
committed
Fix flaky checkout spec
This change adds a waiting matcher for the text on the page, instead of asserting on the current_path which causes race conditions and flakyness.
1 parent b00fcfe commit 8aeafac

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

templates/spec/system/checkout_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -599,8 +599,8 @@
599599
choose "Credit Card"
600600
fill_in_credit_card
601601
click_button "Save and Continue"
602+
expect(page).to have_text('Put your terms and conditions here')
602603

603-
expect(current_path).to eq checkout_state_path('confirm')
604604
check 'Agree to Terms of Service'
605605
click_button "Place Order"
606606
end

0 commit comments

Comments
 (0)