mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-05 02:41:33 +00:00
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:
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user