mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-27 01:43:22 +00:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user