diff --git a/ios/MullvadVPN/Classes/AccessbilityIdentifier.swift b/ios/MullvadVPN/Classes/AccessbilityIdentifier.swift index 86fc7df767dc..60b0c22fe942 100644 --- a/ios/MullvadVPN/Classes/AccessbilityIdentifier.swift +++ b/ios/MullvadVPN/Classes/AccessbilityIdentifier.swift @@ -181,6 +181,8 @@ public enum AccessibilityIdentifier: Equatable { case wireGuardObfuscationOff case wireGuardObfuscationUdpOverTcp case wireGuardObfuscationShadowsocks + case wireGuardObfuscationUdpOverTcpPort + case wireGuardObfuscationShadowsocksPort case wireGuardPort(UInt16?) case udpOverTcpObfuscationSettings diff --git a/ios/MullvadVPN/View controllers/VPNSettings/VPNSettingsCellFactory.swift b/ios/MullvadVPN/View controllers/VPNSettings/VPNSettingsCellFactory.swift index 3f0b75c9e196..b1f1c9fd59f1 100644 --- a/ios/MullvadVPN/View controllers/VPNSettings/VPNSettingsCellFactory.swift +++ b/ios/MullvadVPN/View controllers/VPNSettings/VPNSettingsCellFactory.swift @@ -39,6 +39,7 @@ final class VPNSettingsCellFactory: CellFactoryProtocol { // swiftlint:disable:next cyclomatic_complexity function_body_length func configureCell(_ cell: UITableViewCell, item: VPNSettingsDataSource.Item, indexPath: IndexPath) { + (cell as? SettingsCell)?.detailTitleLabel.accessibilityIdentifier = nil switch item { case .dnsSettings: guard let cell = cell as? SettingsCell else { return } @@ -154,6 +155,7 @@ final class VPNSettingsCellFactory: CellFactoryProtocol { ), viewModel.obfuscationUpdOverTcpPort.description) cell.setAccessibilityIdentifier(item.accessibilityIdentifier) + cell.detailTitleLabel.setAccessibilityIdentifier(.wireGuardObfuscationUdpOverTcpPort) cell.applySubCellStyling() cell.buttonAction = { [weak self] in @@ -178,6 +180,7 @@ final class VPNSettingsCellFactory: CellFactoryProtocol { ), viewModel.obfuscationShadowsocksPort.description) cell.setAccessibilityIdentifier(item.accessibilityIdentifier) + cell.detailTitleLabel.setAccessibilityIdentifier(.wireGuardObfuscationShadowsocksPort) cell.applySubCellStyling() cell.buttonAction = { [weak self] in diff --git a/ios/MullvadVPNUITests/Pages/VPNSettingsPage.swift b/ios/MullvadVPNUITests/Pages/VPNSettingsPage.swift index 446960716852..a9b20f145c81 100644 --- a/ios/MullvadVPNUITests/Pages/VPNSettingsPage.swift +++ b/ios/MullvadVPNUITests/Pages/VPNSettingsPage.swift @@ -179,8 +179,8 @@ class VPNSettingsPage: Page { } @discardableResult func verifyUDPOverTCPPort80Selected() -> Self { - let cell = app.cells["\(AccessibilityIdentifier.wireGuardObfuscationPort)80"] - XCTAssertTrue(cell.isSelected) + let detailLabel = app.staticTexts[AccessibilityIdentifier.wireGuardObfuscationUdpOverTcpPort] + XCTAssertTrue(detailLabel.label.hasSuffix("80")) return self } diff --git a/ios/MullvadVPNUITests/SettingsMigrationTests.swift b/ios/MullvadVPNUITests/SettingsMigrationTests.swift index 0d4281b6824b..8e6959da5cbf 100644 --- a/ios/MullvadVPNUITests/SettingsMigrationTests.swift +++ b/ios/MullvadVPNUITests/SettingsMigrationTests.swift @@ -175,7 +175,6 @@ class SettingsMigrationTests: BaseUITestCase { .verifyCustomWireGuardPortSelected(portNumber: wireGuardPort) .tapWireGuardObfuscationExpandButton() .verifyWireGuardObfuscationOnSelected() - .tapUDPOverTCPPortExpandButton() .verifyUDPOverTCPPort80Selected() .tapQuantumResistantTunnelExpandButton() .verifyQuantumResistantTunnelOnSelected()