diff --git a/ios/MullvadVPNUITests/Pages/ShadowsocksObfuscationSettingsPage.swift b/ios/MullvadVPNUITests/Pages/ShadowsocksObfuscationSettingsPage.swift index 0334c9e49f39..6b3f41c2ed68 100644 --- a/ios/MullvadVPNUITests/Pages/ShadowsocksObfuscationSettingsPage.swift +++ b/ios/MullvadVPNUITests/Pages/ShadowsocksObfuscationSettingsPage.swift @@ -31,8 +31,8 @@ class ShadowsocksObfuscationSettingsPage: Page { customCell.textFields.firstMatch } - @discardableResult func tapPortCell(_ index: Int) -> Self { - portCell(index).tap() + @discardableResult func tapAutomaticPortCell() -> Self { + portCell(0).tap() return self } diff --git a/ios/MullvadVPNUITests/Pages/UDPOverTCPObfuscationSettingsPage.swift b/ios/MullvadVPNUITests/Pages/UDPOverTCPObfuscationSettingsPage.swift index c133ce776ac2..a64550848594 100644 --- a/ios/MullvadVPNUITests/Pages/UDPOverTCPObfuscationSettingsPage.swift +++ b/ios/MullvadVPNUITests/Pages/UDPOverTCPObfuscationSettingsPage.swift @@ -22,8 +22,18 @@ class UDPOverTCPObfuscationSettingsPage: Page { table.cells.element(boundBy: index) } - @discardableResult func tapPortCell(_ index: Int) -> Self { - portCell(index).tap() + @discardableResult func tapAutomaticPortCell() -> Self { + portCell(0).tap() + return self + } + + @discardableResult func tapPort80Cell() -> Self { + portCell(1).tap() + return self + } + + @discardableResult func tapPort5001Cell() -> Self { + portCell(2).tap() return self } diff --git a/ios/MullvadVPNUITests/Pages/VPNSettingsPage.swift b/ios/MullvadVPNUITests/Pages/VPNSettingsPage.swift index a9b20f145c81..d833050f1037 100644 --- a/ios/MullvadVPNUITests/Pages/VPNSettingsPage.swift +++ b/ios/MullvadVPNUITests/Pages/VPNSettingsPage.swift @@ -180,7 +180,7 @@ class VPNSettingsPage: Page { @discardableResult func verifyUDPOverTCPPort80Selected() -> Self { let detailLabel = app.staticTexts[AccessibilityIdentifier.wireGuardObfuscationUdpOverTcpPort] - XCTAssertTrue(detailLabel.label.hasSuffix("80")) + XCTAssertTrue(detailLabel.label.hasSuffix(" 80")) return self } diff --git a/ios/MullvadVPNUITests/SettingsMigrationTests.swift b/ios/MullvadVPNUITests/SettingsMigrationTests.swift index 8e6959da5cbf..b1a7e22575c0 100644 --- a/ios/MullvadVPNUITests/SettingsMigrationTests.swift +++ b/ios/MullvadVPNUITests/SettingsMigrationTests.swift @@ -138,13 +138,13 @@ class SettingsMigrationTests: BaseUITestCase { .tapUDPOverTCPPortSelectorButton() UDPOverTCPObfuscationSettingsPage(app) - .tapPortCell(2) - .tapPortCell(1) + .tapPort5001Cell() + .tapPort80Cell() .tapBackButton() VPNSettingsPage(app) .tapShadowsocksPortSelectorButton() ShadowsocksObfuscationSettingsPage(app) - .tapPortCell(0) + .tapAutomaticPortCell() .tapCustomCell() .enterText("1234") .tapBackButton()