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.
This commit is contained in:
Maikel Linke
2021-12-06 18:06:16 +11:00
parent dc7dfcacba
commit d99feeaaa5

View File

@@ -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