From 46696dfa172aa9ba7917b018f4c4550e7b02ea3b Mon Sep 17 00:00:00 2001 From: filipefurtad0 Date: Mon, 15 Jul 2024 11:46:52 +0100 Subject: [PATCH] Removes references to enabling admin_style_v3 features Reverts removal from bulk_product_spec.rb --- spec/base_spec_helper.rb | 3 - spec/system/admin/products_spec.rb | 55 ------------------- spec/system/admin/products_v3/actions_spec.rb | 2 +- spec/system/admin/products_v3/create_spec.rb | 2 +- spec/system/admin/products_v3/index_spec.rb | 2 +- spec/system/admin/products_v3/update_spec.rb | 2 +- .../admin/subscriptions/smoke_tests_spec.rb | 2 +- 7 files changed, 5 insertions(+), 63 deletions(-) diff --git a/spec/base_spec_helper.rb b/spec/base_spec_helper.rb index 02007105ec..f9bfa1e57c 100644 --- a/spec/base_spec_helper.rb +++ b/spec/base_spec_helper.rb @@ -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| diff --git a/spec/system/admin/products_spec.rb b/spec/system/admin/products_spec.rb index ea5a3c2d5f..abe75464db 100644 --- a/spec/system/admin/products_spec.rb +++ b/spec/system/admin/products_spec.rb @@ -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 } } diff --git a/spec/system/admin/products_v3/actions_spec.rb b/spec/system/admin/products_v3/actions_spec.rb index a02b56fab3..12c021b0a6 100644 --- a/spec/system/admin/products_v3/actions_spec.rb +++ b/spec/system/admin/products_v3/actions_spec.rb @@ -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 diff --git a/spec/system/admin/products_v3/create_spec.rb b/spec/system/admin/products_v3/create_spec.rb index 2a007a8f43..b92fada37d 100644 --- a/spec/system/admin/products_v3/create_spec.rb +++ b/spec/system/admin/products_v3/create_spec.rb @@ -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 diff --git a/spec/system/admin/products_v3/index_spec.rb b/spec/system/admin/products_v3/index_spec.rb index 261ee39693..da9593ec9c 100644 --- a/spec/system/admin/products_v3/index_spec.rb +++ b/spec/system/admin/products_v3/index_spec.rb @@ -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 diff --git a/spec/system/admin/products_v3/update_spec.rb b/spec/system/admin/products_v3/update_spec.rb index 9495838ff3..ea0bfcb6bf 100644 --- a/spec/system/admin/products_v3/update_spec.rb +++ b/spec/system/admin/products_v3/update_spec.rb @@ -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 diff --git a/spec/system/admin/subscriptions/smoke_tests_spec.rb b/spec/system/admin/subscriptions/smoke_tests_spec.rb index 6dd8a2862c..19f224f41d 100644 --- a/spec/system/admin/subscriptions/smoke_tests_spec.rb +++ b/spec/system/admin/subscriptions/smoke_tests_spec.rb @@ -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