Prefer find and click and wait for title to appears

This commit is contained in:
Jean-Baptiste Bellet
2021-10-19 17:26:04 +02:00
parent 8852fe1a49
commit d13d1209be

View File

@@ -313,8 +313,10 @@ describe "As a consumer I want to check out my cart", js: true do
it "checks out successfully" do
visit checkout_path
choose shipping_with_fee.name
choose check_without_fee.name
expect(page).to have_content "Shipping info"
find("input[value='#{shipping_with_fee.id}'").click
expect(page).to have_content "Payment"
find("input[value='#{check_without_fee.id}'").click
perform_enqueued_jobs do
place_order