Use unique categories to avoid flakiness

This commit is contained in:
Maikel Linke
2026-02-26 10:45:20 +11:00
parent e4db20f86e
commit fd178ee80b

View File

@@ -167,7 +167,10 @@ RSpec.describe 'As an enterprise user, I can manage my products' do
before do
create_list(:supplier_enterprise, 11, users: [user])
create_list(:tax_category, 11)
create_list(:taxon, 11)
build_list(:taxon, 11).each_with_index do |taxon, i|
taxon.name += " #{i}"
taxon.save!
end
visit admin_products_url
end
@@ -179,11 +182,7 @@ RSpec.describe 'As an enterprise user, I can manage my products' do
within row_containing_name(variant_a1.display_name) do
tomselect_search_and_select(producer_to_select, from: "Producer")
sleep(0.2)
tomselect_search_and_select(category_to_select, from: "Category")
sleep(0.2)
tomselect_search_and_select(tax_category_to_select, from: "Tax Category")
end