@@ -25,13 +25,7 @@ def restart_app_and_altdriver(self):
2525 time .sleep (5 ) # Give time for the app to open
2626 self .start_altdriver ()
2727
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 ):
3529 # Wait for unauthenticated screen
3630 self .get_altdriver ().wait_for_current_scene_to_be ("UnauthenticatedScene" )
3731
@@ -46,7 +40,7 @@ def login(self, use_pkce: bool):
4640 launch_browser ()
4741 bring_sample_app_to_foreground ()
4842 login_button .tap ()
49- login (use_pkce )
43+ login ()
5044 bring_sample_app_to_foreground ()
5145
5246 # Wait for authenticated screen
@@ -88,12 +82,8 @@ def login(self, use_pkce: bool):
8882 else :
8983 raise SystemExit (f"Failed to reset app { err } " )
9084
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 ()
9787
9888 def test_2_other_functions (self ):
9989 self .test_0_other_functions ()
@@ -110,9 +100,6 @@ def test_5_zkevm_functions(self):
110100 def test_6_relogin (self ):
111101 self .restart_app_and_altdriver ()
112102
113- # Select use device code auth
114- self .select_auth_type (use_pkce = False )
115-
116103 # Relogin
117104 print ("Re-logging in..." )
118105 self .get_altdriver ().wait_for_object (By .NAME , "ReloginBtn" ).tap ()
@@ -130,12 +117,9 @@ def test_6_relogin(self):
130117 self .get_altdriver ().find_object (By .NAME , "ConnectBtn" ).tap ()
131118 self .assertEqual ("Connected to IMX" , output .get_text ())
132119
133- def test_7_reconnect_device_code_connect_imx (self ):
120+ def test_7_reconnect_connect_imx (self ):
134121 self .restart_app_and_altdriver ()
135122
136- use_pkce = False
137- self .select_auth_type (use_pkce )
138-
139123 # Reconnect
140124 print ("Reconnecting..." )
141125 self .get_altdriver ().wait_for_object (By .NAME , "ReconnectBtn" ).tap ()
@@ -171,7 +155,7 @@ def test_7_reconnect_device_code_connect_imx(self):
171155 launch_browser ()
172156 bring_sample_app_to_foreground ()
173157 self .get_altdriver ().wait_for_object (By .NAME , "ConnectBtn" ).tap ()
174- login (use_pkce )
158+ login ()
175159 bring_sample_app_to_foreground ()
176160
177161 # Wait for authenticated screen
0 commit comments