File tree 7 files changed +73
-21
lines changed
7 files changed +73
-21
lines changed Original file line number Diff line number Diff line change 2359
2359
/* End PBXFrameworksBuildPhase section */
2360
2360
2361
2361
/* Begin PBXGroup section */
2362
- 014449932CA1B55200C0C2F2 /* EncryptedDnsProxy */ = {
2363
- isa = PBXGroup;
2364
- children = (
2365
- );
2366
- path = EncryptedDnsProxy;
2367
- sourceTree = "<group>";
2368
- };
2369
2362
062B45A228FD4C0F00746E77 /* Assets */ = {
2370
2363
isa = PBXGroup;
2371
2364
children = (
4188
4181
F0DC77A02B2223290087F09D /* Transport */ = {
4189
4182
isa = PBXGroup;
4190
4183
children = (
4191
- 014449932CA1B55200C0C2F2 /* EncryptedDnsProxy */,
4192
4184
F0164ED02B4F2DCB0020268D /* AccessMethodIterator.swift */,
4193
4185
F0DC77A32B2315800087F09D /* Direct */,
4194
4186
F0E5B2F62C9C689C0007F78C /* EncryptedDNS */,
Original file line number Diff line number Diff line change @@ -21,7 +21,6 @@ public enum AccessibilityIdentifier: String {
21
21
case appLogsShareButton
22
22
case applyButton
23
23
case cancelButton
24
- case connectionPanelButton
25
24
case continueWithLoginButton
26
25
case collapseButton
27
26
case expandButton
Original file line number Diff line number Diff line change @@ -48,13 +48,14 @@ class ConnectionPanelView: UIView {
48
48
}
49
49
50
50
private let collapseView : ConnectionPanelCollapseView = {
51
- let button = ConnectionPanelCollapseView ( )
52
- button. axis = . horizontal
53
- button. alignment = . top
54
- button. distribution = . fill
55
- button. translatesAutoresizingMaskIntoConstraints = false
56
- button. tintColor = . white
57
- return button
51
+ let collapseView = ConnectionPanelCollapseView ( )
52
+ collapseView. axis = . horizontal
53
+ collapseView. alignment = . top
54
+ collapseView. distribution = . fill
55
+ collapseView. translatesAutoresizingMaskIntoConstraints = false
56
+ collapseView. tintColor = . white
57
+ collapseView. isAccessibilityElement = false
58
+ return collapseView
58
59
} ( )
59
60
60
61
private let inAddressRow = ConnectionPanelAddressRow ( )
@@ -316,8 +317,6 @@ class ConnectionPanelCollapseView: UIStackView {
316
317
addArrangedSubview ( UIView ( ) ) // Pushes content left.
317
318
318
319
updateImage ( )
319
-
320
- accessibilityIdentifier = . connectionPanelButton
321
320
}
322
321
323
322
required init ( coder: NSCoder ) {
Original file line number Diff line number Diff line change @@ -44,7 +44,7 @@ final class TunnelControlView: UIView {
44
44
private let locationContainerView : UIStackView = {
45
45
let view = UIStackView ( )
46
46
view. translatesAutoresizingMaskIntoConstraints = false
47
- view. isAccessibilityElement = true
47
+ view. isAccessibilityElement = false
48
48
view. accessibilityTraits = . summaryElement
49
49
view. axis = . vertical
50
50
view. spacing = 8
Original file line number Diff line number Diff line change @@ -121,7 +121,7 @@ class TunnelControlPage: Page {
121
121
}
122
122
123
123
@discardableResult func tapRelayStatusExpandCollapseButton( ) -> Self {
124
- app. buttons [ AccessibilityIdentifier . relayStatusCollapseButton] . tap ( )
124
+ app. otherElements [ AccessibilityIdentifier . relayStatusCollapseButton] . press ( forDuration : . leastNonzeroMagnitude )
125
125
return self
126
126
}
127
127
@@ -202,6 +202,13 @@ class TunnelControlPage: Page {
202
202
return self
203
203
}
204
204
205
+ /// Verify that the app attempts to connect over Multihop.
206
+ @discardableResult func verifyConnectingOverMultihop( ) -> Self {
207
+ let relayName = getCurrentRelayName ( ) . lowercased ( )
208
+ XCTAssertTrue ( relayName. contains ( " via " ) )
209
+ return self
210
+ }
211
+
205
212
func getInIPAddressFromConnectionStatus( ) -> String {
206
213
let inAddressRow = app. otherElements [ AccessibilityIdentifier . connectionPanelInAddressRow]
207
214
@@ -215,7 +222,7 @@ class TunnelControlPage: Page {
215
222
}
216
223
217
224
func getCurrentRelayName( ) -> String {
218
- let relayExpandButton = app. buttons [ . relayStatusCollapseButton]
225
+ let relayExpandButton = app. otherElements [ . relayStatusCollapseButton]
219
226
220
227
guard let relayName = relayExpandButton. value as? String else {
221
228
XCTFail ( " Failed to read relay name from tunnel control page " )
Original file line number Diff line number Diff line change @@ -205,4 +205,22 @@ class VPNSettingsPage: Page {
205
205
XCTAssertEqual ( switchValue, " 1 " )
206
206
return self
207
207
}
208
+
209
+ @discardableResult func tapDaitaSwitchIfOn( ) -> Self {
210
+ let switchElement = app. cells [ . daitaSwitch] . switches [ AccessibilityIdentifier . customSwitch]
211
+
212
+ if switchElement. value as? String == " 1 " {
213
+ tapDaitaSwitch ( )
214
+ }
215
+ return self
216
+ }
217
+
218
+ @discardableResult func tapMultihopSwitchIfOn( ) -> Self {
219
+ let switchElement = app. cells [ . multihopSwitch] . switches [ AccessibilityIdentifier . customSwitch]
220
+
221
+ if switchElement. value as? String == " 1 " {
222
+ tapMultihopSwitch ( )
223
+ }
224
+ return self
225
+ }
208
226
}
Original file line number Diff line number Diff line change @@ -245,6 +245,43 @@ class RelayTests: LoggedInWithTimeUITestCase {
245
245
. tapDisconnectButton ( )
246
246
}
247
247
248
+ func testMultihopSettings( ) throws {
249
+ // Undo enabling Multihop in teardown
250
+ addTeardownBlock {
251
+ HeaderBar ( self . app)
252
+ . tapSettingsButton ( )
253
+
254
+ SettingsPage ( self . app)
255
+ . tapVPNSettingsCell ( )
256
+
257
+ VPNSettingsPage ( self . app)
258
+ . tapMultihopSwitchIfOn ( )
259
+ }
260
+
261
+ HeaderBar ( app)
262
+ . tapSettingsButton ( )
263
+
264
+ SettingsPage ( app)
265
+ . tapVPNSettingsCell ( )
266
+
267
+ VPNSettingsPage ( app)
268
+ . tapMultihopSwitch ( )
269
+ . tapBackButton ( )
270
+
271
+ SettingsPage ( app)
272
+ . tapDoneButton ( )
273
+
274
+ TunnelControlPage ( app)
275
+ . tapSecureConnectionButton ( )
276
+
277
+ allowAddVPNConfigurationsIfAsked ( )
278
+
279
+ TunnelControlPage ( app)
280
+ . waitForSecureConnectionLabel ( )
281
+ . verifyConnectingOverMultihop ( )
282
+ . tapDisconnectButton ( )
283
+ }
284
+
248
285
/// Connect to a relay in the default country and city, get name and IP address of the relay the app successfully connects to. Assumes user is logged on and at tunnel control page.
249
286
private func getDefaultRelayInfo( ) -> RelayInfo {
250
287
TunnelControlPage ( app)
You can’t perform that action at this time.
0 commit comments