From 79421f2265da1db6f2bcd63e9e04e577ac746323 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Bellet Date: Wed, 12 Jul 2023 10:13:26 +0200 Subject: [PATCH] Expect to found the product --- spec/system/admin/products_v3/products_spec.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/spec/system/admin/products_v3/products_spec.rb b/spec/system/admin/products_v3/products_spec.rb index 87774f4186..69e3037b59 100644 --- a/spec/system/admin/products_v3/products_spec.rb +++ b/spec/system/admin/products_v3/products_spec.rb @@ -109,6 +109,7 @@ describe 'As an admin, I can see the new product page' do expect(page).to have_select "category_id", selected: "Category 1" expect_page_to_be 1 expect_products_count_to_be 1 + expect(page).to have_selector "table.products tbody tr td", text: product_by_category.name end end @@ -118,6 +119,7 @@ describe 'As an admin, I can see the new product page' do expect(page).to have_field "search_term", with: "searchable product" expect_page_to_be 1 expect_products_count_to_be 1 + expect(page).to have_selector "table.products tbody tr td", text: product_by_name.name click_link "Clear search" expect(page).to have_field "search_term", with: ""