mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-27 01:43:22 +00:00
Stabilise flaky assertion on PDF text
The PDF reader can't always place text elements in the right place. So something that should be in one line can be in multiple lines and those lines can be in a different order. I'm asserting the moving parts separately as done in other places of this spec.
This commit is contained in:
@@ -212,7 +212,9 @@ describe '
|
||||
end
|
||||
|
||||
it "displays $0.00 when a line item has no tax" do
|
||||
expect(page).to have_content "#{Spree::Product.first.name} (1g) 1 $0.00 $12.54"
|
||||
expect(page).to have_content Spree::Product.first.name
|
||||
expect(page).to have_content "(1g)"
|
||||
expect(page).to have_content "1 $0.00 $12.54"
|
||||
end
|
||||
|
||||
it "displays the taxes correctly" do
|
||||
@@ -343,7 +345,9 @@ describe '
|
||||
convert_pdf_to_page
|
||||
end
|
||||
it "displays $0.0 when a line item has no tax" do
|
||||
expect(page).to have_content "#{Spree::Product.first.name} (1g) 1 $0.00 $12.54"
|
||||
expect(page).to have_content Spree::Product.first.name
|
||||
expect(page).to have_content "(1g)"
|
||||
expect(page).to have_content "1 $0.00 $12.54"
|
||||
end
|
||||
|
||||
it "displays the added tax on the GST colum" do
|
||||
|
||||
Reference in New Issue
Block a user