Removes references to enabling admin_style_v3 features

Reverts removal from bulk_product_spec.rb
This commit is contained in:
filipefurtad0
2024-07-15 11:46:52 +01:00
parent e1976c6cc2
commit 46696dfa17
7 changed files with 5 additions and 63 deletions

View File

@@ -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|

View File

@@ -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 } }

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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