mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-05 22:26:07 +00:00
Add ability to bulk update products for product managers
I forgot to do this in #12328 [BUU] Remove Stimulus Reflex from Products screen
This commit is contained in:
@@ -192,7 +192,7 @@ module Spree
|
||||
OpenFoodNetwork::Permissions.new(user).managed_product_enterprises.include? product.supplier
|
||||
end
|
||||
|
||||
can [:admin, :index], :products_v3
|
||||
can [:admin, :index, :bulk_update], :products_v3
|
||||
|
||||
can [:create], Spree::Variant
|
||||
can [:admin, :index, :read, :edit,
|
||||
|
||||
@@ -150,7 +150,6 @@ describe 'As an enterprise user, I can manage my products', feature: :admin_styl
|
||||
fill_in "Name", with: "Pommes"
|
||||
end
|
||||
|
||||
pending "#12403"
|
||||
expect {
|
||||
click_button "Save changes"
|
||||
|
||||
@@ -179,14 +178,14 @@ describe 'As an enterprise user, I can manage my products', feature: :admin_styl
|
||||
search_by_category "Category 1"
|
||||
|
||||
# expect(page).to have_content "1 product found for your search criteria."
|
||||
expect(page).to have_select "category_id", selected: "Category 1"
|
||||
expect(page).to have_select "category_id", selected: "Category 1" # fails in dev but not CI
|
||||
expect_products_count_to_be 1
|
||||
expect(page).to have_field "Name", with: product_by_category.name
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
xdescribe "updating" do # pending #12403
|
||||
describe "updating" do
|
||||
let!(:variant_a1) {
|
||||
product_a.variants.first.tap{ |v|
|
||||
v.update! display_name: "Medium box", sku: "APL-01", price: 5.25, on_hand: 5,
|
||||
|
||||
Reference in New Issue
Block a user