mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-13 23:37:47 +00:00
Fix cart fields sharing same scope
All cart page quantity fields were displaying a single max quantity instead of a different value for each one.
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
Darkswarm.directive "ofnOnHand", ->
|
||||
restrict: 'A'
|
||||
require: "ngModel"
|
||||
scope: true
|
||||
|
||||
link: (scope, elem, attr, ngModel) ->
|
||||
# In cases where this field gets its value from the HTML element rather than the model,
|
||||
|
||||
@@ -176,7 +176,7 @@ feature "full-page cart", js: true do
|
||||
end
|
||||
|
||||
describe "with insufficient stock available" do
|
||||
xit "prevents user from entering invalid values" do
|
||||
it "prevents user from entering invalid values" do
|
||||
add_product_to_cart order, product_with_fee
|
||||
|
||||
variant.update_attributes!(on_hand: 2, on_demand: false)
|
||||
|
||||
Reference in New Issue
Block a user