summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorBug Magnet <marco.nikic@mullvad.net>2025-06-02 12:09:40 +0200
committerBug Magnet <marco.nikic@mullvad.net>2025-06-02 13:44:36 +0200
commit68b255c32344a7a90235dde36cc4f9fc1d1342c8 (patch)
tree0105e8d312edf833140ee68244fb267335e34610
parent5def796e705f1f88891a58bf6bad207bc2fc073d (diff)
downloadmullvadvpn-68b255c32344a7a90235dde36cc4f9fc1d1342c8.tar.xz
mullvadvpn-68b255c32344a7a90235dde36cc4f9fc1d1342c8.zip
Fix the UITests trying to log in too fast
-rw-r--r--ios/MullvadVPNUITests/Base/BaseUITestCase.swift7
1 files changed, 7 insertions, 0 deletions
diff --git a/ios/MullvadVPNUITests/Base/BaseUITestCase.swift b/ios/MullvadVPNUITests/Base/BaseUITestCase.swift
index 71fbbf0b05..df03759409 100644
--- a/ios/MullvadVPNUITests/Base/BaseUITestCase.swift
+++ b/ios/MullvadVPNUITests/Base/BaseUITestCase.swift
@@ -320,6 +320,13 @@ class BaseUITestCase: XCTestCase {
.getSuccessIconShown()
if successIconShown == false {
+ // If the login happened too fast, the UI harness will miss the success icon being shown
+ // Check if the app is already on main page, and continue if it is.
+ if app.otherElements[.headerBarView].exists {
+ successIconShown = true
+ break
+ }
+
// Give it some time to show up. App might be waiting for a network connection to timeout.
LoginPage(app).waitForAccountNumberSubmitButton()
}