blob: e85beed97683cf3b8025e391e428b116affab0cd (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
|
//
// UDPOverTCPObfuscationSettingsPage.swift
// MullvadVPN
//
// Created by Andrew Bulhak on 2024-12-12.
// Copyright © 2025 Mullvad VPN AB. All rights reserved.
//
import Foundation
import XCTest
class UDPOverTCPObfuscationSettingsPage: Page {
@discardableResult override init(_ app: XCUIApplication) {
super.init(app)
}
private var table: XCUIElement {
app.collectionViews[AccessibilityIdentifier.wireGuardObfuscationUdpOverTcpTable]
}
private func portCell(_ index: Int) -> XCUIElement {
table.cells.element(boundBy: index)
}
@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
}
@discardableResult func tapBackButton() -> Self {
// Workaround for setting accessibility identifier on navigation bar button being non-trivial
app.navigationBars.buttons.element(boundBy: 0).tap()
return self
}
}
|