From 4e24af2f94af56f12f0aec41185e4fc2f7f5a605 Mon Sep 17 00:00:00 2001 From: filipefurtad0 Date: Mon, 12 Feb 2024 16:44:10 +0000 Subject: [PATCH] Applies helper changes --- spec/system/admin/bulk_product_update_spec.rb | 8 ++++---- spec/system/admin/order_cycles/list_spec.rb | 2 +- spec/system/admin/order_spec.rb | 8 +++++--- spec/system/admin/product_import_spec.rb | 6 +++--- 4 files changed, 13 insertions(+), 11 deletions(-) diff --git a/spec/system/admin/bulk_product_update_spec.rb b/spec/system/admin/bulk_product_update_spec.rb index 902439e050..527512c648 100644 --- a/spec/system/admin/bulk_product_update_spec.rb +++ b/spec/system/admin/bulk_product_update_spec.rb @@ -705,10 +705,10 @@ RSpec.describe ' toggle_columns /^.{0,1}Producer$/i - expect(page).to have_no_selector "th", text: "Producer" - expect(page).to have_selector "th", text: "Name" - expect(page).to have_selector "th", text: "Price" - expect(page).to have_selector "th", text: "On Hand" + expect(page).not_to have_selector "th", text: "Producer" + expect(page).to have_selector "th", text: "NAME" + expect(page).to have_selector "th", text: "PRICE" + expect(page).to have_selector "th", text: "ON HAND" end end diff --git a/spec/system/admin/order_cycles/list_spec.rb b/spec/system/admin/order_cycles/list_spec.rb index c6344e8f02..ea71316afb 100644 --- a/spec/system/admin/order_cycles/list_spec.rb +++ b/spec/system/admin/order_cycles/list_spec.rb @@ -72,7 +72,7 @@ RSpec.describe ' end # I can load more order_cycles - expect(page).to have_no_selector "#listing_order_cycles tr.order-cycle-#{oc7.id}" + expect(page).not_to have_selector "#listing_order_cycles tr.order-cycle-#{oc7.id}" trigger_click(:button, "Show 30 more days") expect(page).to have_selector "#listing_order_cycles tr.order-cycle-#{oc7.id}" diff --git a/spec/system/admin/order_spec.rb b/spec/system/admin/order_spec.rb index cd4c8b9aec..17fb1d48bf 100644 --- a/spec/system/admin/order_spec.rb +++ b/spec/system/admin/order_spec.rb @@ -125,7 +125,8 @@ RSpec.describe ' it "sets the customer on the order" do expect(order.customer_id).to be_nil - tomselect_search_and_select customer2.email, from: 'select-customer' + tomselect_search_and_select customer2.email, from: 'customer_search_override' + check 'order_use_billing' trigger_click(:button, 'Update') @@ -148,7 +149,8 @@ RSpec.describe ' it "should update the order customer (not only its details)" do expect(page).to have_field 'order_email', with: customer2.email - tomselect_search_and_select customer3.email, from: 'select-customer' + tomselect_search_and_select customer3.email, from: 'customer_search_override' + check 'order_use_billing' expect(page).to have_field 'order_email', with: customer3.email @@ -513,7 +515,7 @@ RSpec.describe ' expect(page).to have_selector '#select-customer' # And I select that customer's email address and save the order - tomselect_search_and_select customer.email, from: 'select-customer' + tomselect_search_and_select customer.email, from: 'customer_search_override' expect(page).to have_field "order_email", with: customer.email click_button 'Update' diff --git a/spec/system/admin/product_import_spec.rb b/spec/system/admin/product_import_spec.rb index 4cefc9b0e9..71458716d4 100644 --- a/spec/system/admin/product_import_spec.rb +++ b/spec/system/admin/product_import_spec.rb @@ -712,9 +712,9 @@ RSpec.describe "Product Import" do expect(page).to have_selector '.created-count', text: '1' - expect(page).to have_no_selector '.updated-count' - expect(page).to have_content "Go To Products Page" - expect(page).to have_content "Upload Another File" + expect(page).not_to have_selector '.updated-count' + expect(page).to have_content "Go To Products Page".upcase + expect(page).to have_content "Upload Another File".upcase visit spree.admin_products_path