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.
This commit is contained in:
Maikel Linke
2026-02-26 10:41:31 +11:00
parent 560348722c
commit e4db20f86e
2 changed files with 0 additions and 18 deletions

View File

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

View File

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