@@ -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 ()
@@ -131,12 +118,9 @@ def test_6_relogin(self):
131118 time .sleep (5 )
132119 self .assertEqual ("Connected to IMX" , output .get_text ())
133120
134- def test_7_reconnect_device_code_connect_imx (self ):
121+ def test_7_reconnect_connect_imx (self ):
135122 self .restart_app_and_altdriver ()
136123
137- use_pkce = False
138- self .select_auth_type (use_pkce )
139-
140124 # Reconnect
141125 print ("Reconnecting..." )
142126 self .get_altdriver ().wait_for_object (By .NAME , "ReconnectBtn" ).tap ()
@@ -172,7 +156,7 @@ def test_7_reconnect_device_code_connect_imx(self):
172156 launch_browser ()
173157 bring_sample_app_to_foreground ()
174158 self .get_altdriver ().wait_for_object (By .NAME , "ConnectBtn" ).tap ()
175- login (use_pkce )
159+ login ()
176160 bring_sample_app_to_foreground ()
177161
178162 # Wait for authenticated screen
0 commit comments