Remove unnecessary within block

This commit is contained in:
Jean-Baptiste Bellet
2023-01-13 09:21:15 +01:00
parent c99ec38c85
commit c5d94d372f

View File

@@ -455,9 +455,8 @@ describe "As a consumer, I want to checkout my order", js: true do
shared_examples "displays the shipping fee" do |checkout_page|
it "on the #{checkout_page} page" do
within ".summary-right" do
expect(page).to have_content("Shipping #{with_currency(4.56)}")
end
expect(page).to have_content("Shipping #{with_currency(4.56)}")
if checkout_page.eql?("order confirmation")
expect(page).to have_content "Your order has been processed successfully"
end
@@ -588,9 +587,8 @@ describe "As a consumer, I want to checkout my order", js: true do
shared_examples "displays the transaction fee" do |checkout_page|
it "on the #{checkout_page} page" do
within ".summary-right" do
expect(page).to have_content("Transaction fee #{with_currency(1.23)}")
end
expect(page).to have_content("Transaction fee #{with_currency(1.23)}")
if checkout_page.eql?("order confirmation")
expect(page).to have_content "Your order has been processed successfully"
end