From e4db20f86e7f04f46b498e954cef3c7e02b64741 Mon Sep 17 00:00:00 2001 From: Maikel Linke Date: Thu, 26 Feb 2026 10:41:31 +1100 Subject: [PATCH] Remove unncessary expectation This assertion was confusing me. It was quite complex and the only thing it was asserting was the placeholder via a CSS selector. I don't think it's worth keeping. --- spec/support/products_helper.rb | 6 ------ spec/system/admin/products_v3/actions_spec.rb | 12 ------------ 2 files changed, 18 deletions(-) diff --git a/spec/support/products_helper.rb b/spec/support/products_helper.rb index dde11158ce..c941b4caea 100644 --- a/spec/support/products_helper.rb +++ b/spec/support/products_helper.rb @@ -79,12 +79,6 @@ module ProductsHelper end end - def validate_tomselect_with_search!(page, field_name, search_selector) - open_tomselect_to_validate!(page, field_name) do - expect(page).to have_selector(search_selector) - end - end - def random_producer(product) Enterprise.is_primary_producer .where.not(id: product.supplier.id) diff --git a/spec/system/admin/products_v3/actions_spec.rb b/spec/system/admin/products_v3/actions_spec.rb index ead18a3ac4..22078d5567 100644 --- a/spec/system/admin/products_v3/actions_spec.rb +++ b/spec/system/admin/products_v3/actions_spec.rb @@ -178,24 +178,12 @@ RSpec.describe 'As an enterprise user, I can manage my products' do tax_category_to_select = random_tax_category within row_containing_name(variant_a1.display_name) do - validate_tomselect_with_search!( - page, "Producer", - producer_search_selector - ) tomselect_search_and_select(producer_to_select, from: "Producer") sleep(0.2) - validate_tomselect_with_search!( - page, "Category", - categories_search_selector - ) tomselect_search_and_select(category_to_select, from: "Category") sleep(0.2) - validate_tomselect_with_search!( - page, "Tax Category", - tax_categories_search_selector - ) tomselect_search_and_select(tax_category_to_select, from: "Tax Category") end