Merge pull request #9352 from filipefurtad0/price_breakdown_spec

Adds price breakdown assertion
This commit is contained in:
Maikel
2022-07-07 13:36:45 +10:00
committed by GitHub

View File

@@ -102,6 +102,24 @@ describe "shopping with variant overrides defined", js: true do
expect(page).to have_price with_currency(61.11)
end
context "clicking the pie-chart icon" do
before do
visit shop_path
within "#variant-#{product1_variant1.id}" do
page.find(".graph-button").click
end
end
it "shows the price breakdown modal" do
within(:xpath, '//body') do
within(".price_breakdown") do
expect(page).to have_content("Price breakdown")
expect(page).to have_content(enterprise_fee.name.to_s)
end
end
end
end
# The two specs below reveal an unrelated issue with fee calculation. See:
# https://github.com/openfoodfoundation/openfoodnetwork/issues/312