mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-27 01:43:22 +00:00
Removes references to enabling admin_style_v3 features
Reverts removal from bulk_product_spec.rb
This commit is contained in:
@@ -148,9 +148,6 @@ RSpec.configure do |config|
|
||||
config.before(:each) do
|
||||
Flipper.features.each(&:remove)
|
||||
OpenFoodNetwork::FeatureToggle.setup!
|
||||
|
||||
# activate feature toggle admin_style_v3 to use new admin interface and run the build
|
||||
Flipper.enable(:admin_style_v3)
|
||||
end
|
||||
|
||||
config.before(:each, :feature) do |example|
|
||||
|
||||
@@ -250,61 +250,6 @@ RSpec.describe '
|
||||
end
|
||||
end
|
||||
|
||||
describe "legacy products page (TODO: migrate/combine specs with v3 specs)" do
|
||||
before { Flipper.disable(:admin_style_v3) }
|
||||
|
||||
describe "deleting" do
|
||||
let!(:product1) {
|
||||
create(:simple_product, name: 'a product to keep', supplier_id: supplier.id)
|
||||
}
|
||||
|
||||
context 'a simple product' do
|
||||
let!(:product2) {
|
||||
create(:simple_product, name: 'a product to delete', supplier_id: supplier.id)
|
||||
}
|
||||
|
||||
before do
|
||||
login_as_admin
|
||||
visit spree.admin_products_path
|
||||
|
||||
within "#p_#{product2.id}" do
|
||||
accept_alert { page.find("[data-powertip=Remove]").click }
|
||||
end
|
||||
visit current_path
|
||||
end
|
||||
|
||||
it 'removes it from the product list' do
|
||||
expect(page).not_to have_selector "#p_#{product2.id}"
|
||||
expect(page).to have_selector "#p_#{product1.id}"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
describe 'cloning' do
|
||||
let!(:product1) {
|
||||
create(:simple_product, name: 'a weight product', supplier_id: supplier.id,
|
||||
variant_unit: "weight")
|
||||
}
|
||||
|
||||
context 'products' do
|
||||
before do
|
||||
login_as_admin
|
||||
visit spree.admin_products_path
|
||||
end
|
||||
|
||||
it 'creates a copy of the product' do
|
||||
within "#p_#{product1.id}" do
|
||||
page.find("[data-powertip=Clone]").click
|
||||
end
|
||||
visit current_path
|
||||
within "#p_#{product1.id + 1}" do
|
||||
expect(page).to have_input "product_name", with: 'COPY OF a weight product'
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
context "as an enterprise user" do
|
||||
let!(:tax_category) { create(:tax_category) }
|
||||
let(:filter) { { producerFilter: 2 } }
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
require "system_helper"
|
||||
|
||||
RSpec.describe 'As an enterprise user, I can manage my products', feature: :admin_style_v3 do
|
||||
RSpec.describe 'As an enterprise user, I can manage my products' do
|
||||
include AdminHelper
|
||||
include WebHelper
|
||||
include AuthenticationHelper
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
require "system_helper"
|
||||
|
||||
RSpec.describe 'As an enterprise user, I can manage my products', feature: :admin_style_v3 do
|
||||
RSpec.describe 'As an enterprise user, I can manage my products' do
|
||||
include AuthenticationHelper
|
||||
include WebHelper
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
require "system_helper"
|
||||
|
||||
RSpec.describe 'As an enterprise user, I can manage my products', feature: :admin_style_v3 do
|
||||
RSpec.describe 'As an enterprise user, I can manage my products' do
|
||||
include AdminHelper
|
||||
include WebHelper
|
||||
include AuthenticationHelper
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
require "system_helper"
|
||||
|
||||
RSpec.describe 'As an enterprise user, I can update my products', feature: :admin_style_v3 do
|
||||
RSpec.describe 'As an enterprise user, I can update my products' do
|
||||
include AdminHelper
|
||||
include WebHelper
|
||||
include AuthenticationHelper
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
require 'system_helper'
|
||||
|
||||
RSpec.describe 'Subscriptions', feature: :admin_style_v3 do
|
||||
RSpec.describe 'Subscriptions' do
|
||||
include AdminHelper
|
||||
include AuthenticationHelper
|
||||
include WebHelper
|
||||
|
||||
Reference in New Issue
Block a user