From 10b8c2b7899e71a0ddda78b706e7e368bf889b7f Mon Sep 17 00:00:00 2001 From: Luis Ramos Date: Sat, 27 Jun 2020 15:54:58 +0100 Subject: [PATCH] Relax the assertion and dont check row number so that it passes even if order of elements is not the same --- spec/features/admin/configuration/taxonomies_spec.rb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/spec/features/admin/configuration/taxonomies_spec.rb b/spec/features/admin/configuration/taxonomies_spec.rb index 6947a9a0b3..6e871e3529 100644 --- a/spec/features/admin/configuration/taxonomies_spec.rb +++ b/spec/features/admin/configuration/taxonomies_spec.rb @@ -14,8 +14,10 @@ describe "Taxonomies" do create(:taxonomy, name: 'Brand') create(:taxonomy, name: 'Categories') click_link "Taxonomies" - within_row(1) { expect(page).to have_content("Brand") } - within_row(2) { expect(page).to have_content("Categories") } + within("table.index tbody") do + expect(page).to have_content("Brand") + expect(page).to have_content("Categories") + end end end