Stabilise flaky checkout spec with voucher

While applying a voucher the spec tried to proceed the checkout before
the voucher update completed rendering. It failed when the machine was
slow.

With rspec-slow-repeate I got 100% fail rate before and 100% pass after
this change.
This commit is contained in:
Maikel Linke
2023-08-10 10:05:01 +10:00
parent 4505beff98
commit 04bba2adf1

View File

@@ -125,6 +125,7 @@ describe "As a consumer, I want to see adjustment breakdown" do
# add Voucher
fill_in "Enter voucher code", with: "some_code"
click_button("Apply")
expect(page).to have_link "Remove code"
# Choose payment
click_on "Next - Order summary"