@@ -85,21 +85,49 @@ def login(self):
8585 raise SystemExit (f"Failed to reset app { err } " )
8686
8787 def test_1_login (self ):
88+ print ("=" * 60 )
89+ print ("STARTING TEST: test_1_login" )
90+ print ("=" * 60 )
8891 self .login ()
92+ print ("COMPLETED TEST: test_1_login" )
93+ print ("=" * 60 )
8994
9095 def test_2_other_functions (self ):
96+ print ("=" * 60 )
97+ print ("STARTING TEST: test_2_other_functions" )
98+ print ("=" * 60 )
9199 self .test_0_other_functions ()
100+ print ("COMPLETED TEST: test_2_other_functions" )
101+ print ("=" * 60 )
92102
93103 def test_3_passport_functions (self ):
104+ print ("=" * 60 )
105+ print ("STARTING TEST: test_3_passport_functions" )
106+ print ("=" * 60 )
94107 self .test_1_passport_functions ()
108+ print ("COMPLETED TEST: test_3_passport_functions" )
109+ print ("=" * 60 )
95110
96111 def test_4_imx_functions (self ):
112+ print ("=" * 60 )
113+ print ("STARTING TEST: test_4_imx_functions" )
114+ print ("=" * 60 )
97115 self .test_2_imx_functions ()
116+ print ("COMPLETED TEST: test_4_imx_functions" )
117+ print ("=" * 60 )
98118
99119 def test_5_zkevm_functions (self ):
120+ print ("=" * 60 )
121+ print ("STARTING TEST: test_5_zkevm_functions" )
122+ print ("=" * 60 )
100123 self .test_3_zkevm_functions ()
124+ print ("COMPLETED TEST: test_5_zkevm_functions" )
125+ print ("=" * 60 )
101126
102127 def test_6_relogin (self ):
128+ print ("=" * 60 )
129+ print ("STARTING TEST: test_6_relogin" )
130+ print ("=" * 60 )
103131 self .restart_app_and_altdriver ()
104132
105133 # Relogin
@@ -119,8 +147,14 @@ def test_6_relogin(self):
119147 self .get_altdriver ().find_object (By .NAME , "ConnectBtn" ).tap ()
120148 time .sleep (5 )
121149 self .assertEqual ("Connected to IMX" , output .get_text ())
150+
151+ print ("COMPLETED TEST: test_6_relogin" )
152+ print ("=" * 60 )
122153
123154 def test_7_reconnect_connect_imx (self ):
155+ print ("=" * 60 )
156+ print ("STARTING TEST: test_7_reconnect_connect_imx" )
157+ print ("=" * 60 )
124158 self .restart_app_and_altdriver ()
125159
126160 # Reconnect
@@ -148,21 +182,24 @@ def test_7_reconnect_connect_imx(self):
148182 time .sleep (10 ) # Give more time for logout browser process
149183 bring_sample_app_to_foreground ()
150184
151- # Wait for authenticated screen with longer timeout for logout
152- # In CI, the app sometimes crashes during logout, so handle that gracefully
153- try :
154- self .get_altdriver ().wait_for_current_scene_to_be ("UnauthenticatedScene" , timeout = 60 )
155- except Exception as e :
156- # Check if app crashed during logout (common in CI)
157- if "connection" in str (e ).lower () or "closed" in str (e ).lower ():
158- print ("App appears to have closed during logout - this is acceptable for logout test" )
159- # App closing during logout is actually a valid logout scenario
160- pass
161- else :
162- raise e
185+ # Wait for authenticated screen
186+ self .get_altdriver ().wait_for_current_scene_to_be ("UnauthenticatedScene" )
163187 stop_browser ()
164188 print ("Logged out" )
165189
190+ print ("COMPLETED TEST: test_7_reconnect_connect_imx" )
191+ print ("=" * 60 )
192+
193+ def test_8_connect_imx (self ):
194+ print ("=" * 60 )
195+ print ("STARTING TEST: test_8_connect_imx" )
196+ print ("=" * 60 )
197+ # Ensure clean state regardless of previous tests
198+ self .restart_app_and_altdriver ()
199+
200+ # Wait for initial scene
201+ self .get_altdriver ().wait_for_current_scene_to_be ("UnauthenticatedScene" )
202+
166203 # Connect IMX
167204 print ("Logging in and connecting to IMX..." )
168205 launch_browser ()
@@ -197,3 +234,5 @@ def test_7_reconnect_connect_imx(self):
197234 self .get_altdriver ().wait_for_current_scene_to_be ("UnauthenticatedScene" )
198235 stop_browser ()
199236 print ("Logged out" )
237+ print ("COMPLETED TEST: test_8_connect_imx" )
238+ print ("=" * 60 )
0 commit comments