From d99feeaaa5549c688876810f660d587923bc5e3c Mon Sep 17 00:00:00 2001 From: Maikel Linke Date: Mon, 6 Dec 2021 18:06:16 +1100 Subject: [PATCH] Remove unreliable spec expectation We were not failing if these percentages were not displayed. But the spec did fail when the import was finished already and the progress bar wasn't there any more. Let's avoid these race conditions and wait for the final completion page. --- spec/system/admin/product_import_spec.rb | 8 -------- 1 file changed, 8 deletions(-) diff --git a/spec/system/admin/product_import_spec.rb b/spec/system/admin/product_import_spec.rb index 9ecd27c560..e9bb45ca62 100644 --- a/spec/system/admin/product_import_spec.rb +++ b/spec/system/admin/product_import_spec.rb @@ -685,8 +685,6 @@ describe "Product Import", js: true do # Save file. proceed_with_save - # Be extra patient. - expect_progress_percentages "33%", "67%", "100%" expect_import_completed # Check that all rows are saved. @@ -713,12 +711,6 @@ describe "Product Import", js: true do expect_import_completed end - def expect_progress_percentages(*percentages) - percentages.each do |percentage| - page.has_selector? ".progress-interface", text: percentage # Waits for progress bar - end - end - def proceed_with_save click_link I18n.t("admin.product_import.import.save") end