@@ -25,13 +25,7 @@ def restart_app_and_altdriver(self):
25
25
time .sleep (5 ) # Give time for the app to open
26
26
self .start_altdriver ()
27
27
28
- def select_auth_type (self , use_pkce : bool ):
29
- auth_type = "PKCE" if use_pkce else "DeviceCodeAuth"
30
- self .get_altdriver ().find_object (By .NAME , auth_type ).tap ()
31
-
32
- def login (self , use_pkce : bool ):
33
- self .select_auth_type (use_pkce )
34
-
28
+ def login (self ):
35
29
# Wait for unauthenticated screen
36
30
self .get_altdriver ().wait_for_current_scene_to_be ("UnauthenticatedScene" )
37
31
@@ -46,7 +40,7 @@ def login(self, use_pkce: bool):
46
40
launch_browser ()
47
41
bring_sample_app_to_foreground ()
48
42
login_button .tap ()
49
- login (use_pkce )
43
+ login ()
50
44
bring_sample_app_to_foreground ()
51
45
52
46
# Wait for authenticated screen
@@ -88,12 +82,8 @@ def login(self, use_pkce: bool):
88
82
else :
89
83
raise SystemExit (f"Failed to reset app { err } " )
90
84
91
- def test_1a_pkce_login (self ):
92
- self .login (True )
93
-
94
- def test_1b_device_code_login (self ):
95
- self .restart_app_and_altdriver ()
96
- self .login (False )
85
+ def test_1_login (self ):
86
+ self .login ()
97
87
98
88
def test_2_other_functions (self ):
99
89
self .test_0_other_functions ()
@@ -110,9 +100,6 @@ def test_5_zkevm_functions(self):
110
100
def test_6_relogin (self ):
111
101
self .restart_app_and_altdriver ()
112
102
113
- # Select use device code auth
114
- self .select_auth_type (use_pkce = False )
115
-
116
103
# Relogin
117
104
print ("Re-logging in..." )
118
105
self .get_altdriver ().wait_for_object (By .NAME , "ReloginBtn" ).tap ()
@@ -130,12 +117,9 @@ def test_6_relogin(self):
130
117
self .get_altdriver ().find_object (By .NAME , "ConnectBtn" ).tap ()
131
118
self .assertEqual ("Connected to IMX" , output .get_text ())
132
119
133
- def test_7_reconnect_device_code_connect_imx (self ):
120
+ def test_7_reconnect_connect_imx (self ):
134
121
self .restart_app_and_altdriver ()
135
122
136
- use_pkce = False
137
- self .select_auth_type (use_pkce )
138
-
139
123
# Reconnect
140
124
print ("Reconnecting..." )
141
125
self .get_altdriver ().wait_for_object (By .NAME , "ReconnectBtn" ).tap ()
@@ -171,7 +155,7 @@ def test_7_reconnect_device_code_connect_imx(self):
171
155
launch_browser ()
172
156
bring_sample_app_to_foreground ()
173
157
self .get_altdriver ().wait_for_object (By .NAME , "ConnectBtn" ).tap ()
174
- login (use_pkce )
158
+ login ()
175
159
bring_sample_app_to_foreground ()
176
160
177
161
# Wait for authenticated screen
0 commit comments