File tree Expand file tree Collapse file tree 3 files changed +11
-4
lines changed
MullvadVPN/Coordinators/Settings/Multihop Expand file tree Collapse file tree 3 files changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -68,12 +68,13 @@ struct SettingsMultihopView<ViewModel>: View where ViewModel: TunnelSettingsObse
6868 : Color ( UIColor . Cell. titleTextColor)
6969 )
7070 Spacer ( ) . frame ( width: UIMetrics . SettingsCell. selectableSettingsCellLeftViewSpacing)
71- Text ( option. label)
71+ Button ( option. label, action : { tunnelViewModel . value = option . id } )
7272 . foregroundStyle (
7373 ( tunnelViewModel. value == option. id)
7474 ? Color ( UIColor . Cell. Background. selected)
7575 : Color ( UIColor . Cell. titleTextColor)
7676 )
77+ . accessibilityIdentifier ( option. accessibilityIdentifier. asString)
7778 Spacer ( )
7879 }
7980 . padding ( EdgeInsets ( UIMetrics . SettingsCell. defaultLayoutMargins) )
@@ -112,7 +113,6 @@ struct SettingsMultihopView<ViewModel>: View where ViewModel: TunnelSettingsObse
112113 . onTapGesture {
113114 tunnelViewModel. value = option. id
114115 }
115- . accessibilityIdentifier ( option. accessibilityIdentifier. asString)
116116 }
117117 }
118118 . cornerRadius ( 16 )
Original file line number Diff line number Diff line change @@ -27,6 +27,7 @@ class MultihopPage: Page {
2727 return self
2828 }
2929
30+ // the old on/off UI; delete once we get rid of the code
3031 @discardableResult func tapEnableSwitch( ) -> Self {
3132 app. switches [ AccessibilityIdentifier . multihopSwitch] . tap ( )
3233 return self
@@ -40,4 +41,10 @@ class MultihopPage: Page {
4041 }
4142 return self
4243 }
44+
45+ // the new, tristate UI
46+ @discardableResult func tapMultihopAlways( ) -> Self {
47+ app. buttons [ AccessibilityIdentifier . multihopAlways] . tap ( )
48+ return self
49+ }
4350}
Original file line number Diff line number Diff line change @@ -533,7 +533,7 @@ class RelayTests: LoggedInWithTimeUITestCase {
533533
534534 MultihopPage ( app)
535535 . verifyOnePage ( )
536- . tapEnableSwitch ( )
536+ . tapMultihopAlways ( )
537537 . tapBackButton ( )
538538
539539 SettingsPage ( app)
@@ -561,7 +561,7 @@ class RelayTests: LoggedInWithTimeUITestCase {
561561
562562 MultihopPage ( app)
563563 . verifyOnePage ( )
564- . tapEnableSwitch ( )
564+ . tapMultihopAlways ( )
565565 . tapBackButton ( )
566566
567567 SettingsPage ( app)
You can’t perform that action at this time.
0 commit comments