mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-24 20:36:49 +00:00
Merge pull request #9352 from filipefurtad0/price_breakdown_spec
Adds price breakdown assertion
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user