From dc7dfcacba1289abd2d0b1d0170173405c0fe540 Mon Sep 17 00:00:00 2001 From: Maikel Linke Date: Mon, 6 Dec 2021 18:01:17 +1100 Subject: [PATCH] Wait for product import to finish in spec The expectation returned to early. --- spec/system/admin/product_import_spec.rb | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/spec/system/admin/product_import_spec.rb b/spec/system/admin/product_import_spec.rb index eb98a1c3fc..9ecd27c560 100644 --- a/spec/system/admin/product_import_spec.rb +++ b/spec/system/admin/product_import_spec.rb @@ -724,6 +724,12 @@ describe "Product Import", js: true do end def expect_import_completed - expect(page).to have_content I18n.t('admin.product_import.save_results.final_results') + # The step pages are hidden and shown by AngularJS and we get a false + # positive when querying for the content of a hidden step. + # + # expect(page).to have_content I18n.t('admin.product_import.save_results.final_results') + # + # Being more explicit seems to work: + expect(page).to have_selector("h5", text: "Import final results") end end