Skip to content

armgit / sure

Public Imported from GitHub
0

The personal finance app for everyone (by everyone)

Ruby

Fix flaky Monarch import system test after full page load (#5183)

Artur Kalimullinbf435b061227
diff --git a/test/system/imports_test.rb b/test/system/imports_test.rb
index dbf5db188c..6e710b0dfb 100644
--- a/test/system/imports_test.rb
+++ b/test/system/imports_test.rb
@@ -282,6 +282,10 @@ class ImportsTest < ApplicationSystemTestCase
assert_no_selector "input[type=checkbox][data-checkbox-group=transactions]:checked", visible: :all
click_on "Review import"
+ # The account choices form opts out of Turbo, so this is a full page load.
+ # Wait for the new URL before reading any text: Chrome can fail to read the
+ # outgoing page's h1 with an error Capybara does not retry.
+ assert_current_path import_path(MonarchImport.where(family: @user.family).sole)
assert_selector "h1", text: "Confirm your import data"
click_on "Publish import"