mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-06 02:51:34 +00:00
Spec that overridden price with fees appears in quick cart
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
%h5 Your shopping cart
|
||||
%ul
|
||||
%li.product-cart{"ng-repeat" => "line_item in Cart.line_items_present()",
|
||||
"ng-controller" => "LineItemCtrl"}
|
||||
"ng-controller" => "LineItemCtrl", "id" => "cart-variant-{{ line_item.variant.id }}"}
|
||||
.row
|
||||
.columns.small-7
|
||||
%small
|
||||
@@ -20,15 +20,15 @@
|
||||
%em {{ line_item.variant.unit_to_display }}
|
||||
.columns.small-3.text-right
|
||||
%small
|
||||
{{line_item.quantity}}
|
||||
%span.quantity {{ line_item.quantity }}
|
||||
%i.ofn-i_009-close
|
||||
{{ line_item.variant.price_with_fees | localizeCurrency }}
|
||||
%span.price {{ line_item.variant.price_with_fees | localizeCurrency }}
|
||||
|
||||
.columns.small-2
|
||||
%small
|
||||
\=
|
||||
%strong
|
||||
.right {{ line_item.variant.totalPrice() | localizeCurrency }}
|
||||
.total-price.right {{ line_item.variant.totalPrice() | localizeCurrency }}
|
||||
|
||||
%li.total-cart{"ng-show" => "Cart.line_items_present().length > 0"}
|
||||
.row
|
||||
|
||||
@@ -54,7 +54,14 @@ feature "shopping with variant overrides defined", js: true do
|
||||
page.should have_selector 'li.total div', text: '= $61.11'
|
||||
end
|
||||
|
||||
it "shows the overridden price with fees in the quick cart"
|
||||
it "shows the overridden price with fees in the quick cart" do
|
||||
fill_in "variants[#{v1.id}]", with: "2"
|
||||
show_cart
|
||||
page.should have_selector "#cart-variant-#{v1.id} .quantity", text: '2'
|
||||
page.should have_selector "#cart-variant-#{v1.id} .price", text: '61.11'
|
||||
page.should have_selector "#cart-variant-#{v1.id} .total-price", text: '122.22'
|
||||
end
|
||||
|
||||
it "shows the correct prices in the shopping cart"
|
||||
it "shows the correct prices in the checkout"
|
||||
it "creates the order with the correct prices"
|
||||
|
||||
Reference in New Issue
Block a user