@@ -85,21 +85,49 @@ def login(self):
85
85
raise SystemExit (f"Failed to reset app { err } " )
86
86
87
87
def test_1_login (self ):
88
+ print ("=" * 60 )
89
+ print ("STARTING TEST: test_1_login" )
90
+ print ("=" * 60 )
88
91
self .login ()
92
+ print ("COMPLETED TEST: test_1_login" )
93
+ print ("=" * 60 )
89
94
90
95
def test_2_other_functions (self ):
96
+ print ("=" * 60 )
97
+ print ("STARTING TEST: test_2_other_functions" )
98
+ print ("=" * 60 )
91
99
self .test_0_other_functions ()
100
+ print ("COMPLETED TEST: test_2_other_functions" )
101
+ print ("=" * 60 )
92
102
93
103
def test_3_passport_functions (self ):
104
+ print ("=" * 60 )
105
+ print ("STARTING TEST: test_3_passport_functions" )
106
+ print ("=" * 60 )
94
107
self .test_1_passport_functions ()
108
+ print ("COMPLETED TEST: test_3_passport_functions" )
109
+ print ("=" * 60 )
95
110
96
111
def test_4_imx_functions (self ):
112
+ print ("=" * 60 )
113
+ print ("STARTING TEST: test_4_imx_functions" )
114
+ print ("=" * 60 )
97
115
self .test_2_imx_functions ()
116
+ print ("COMPLETED TEST: test_4_imx_functions" )
117
+ print ("=" * 60 )
98
118
99
119
def test_5_zkevm_functions (self ):
120
+ print ("=" * 60 )
121
+ print ("STARTING TEST: test_5_zkevm_functions" )
122
+ print ("=" * 60 )
100
123
self .test_3_zkevm_functions ()
124
+ print ("COMPLETED TEST: test_5_zkevm_functions" )
125
+ print ("=" * 60 )
101
126
102
127
def test_6_relogin (self ):
128
+ print ("=" * 60 )
129
+ print ("STARTING TEST: test_6_relogin" )
130
+ print ("=" * 60 )
103
131
self .restart_app_and_altdriver ()
104
132
105
133
# Relogin
@@ -119,8 +147,14 @@ def test_6_relogin(self):
119
147
self .get_altdriver ().find_object (By .NAME , "ConnectBtn" ).tap ()
120
148
time .sleep (5 )
121
149
self .assertEqual ("Connected to IMX" , output .get_text ())
150
+
151
+ print ("COMPLETED TEST: test_6_relogin" )
152
+ print ("=" * 60 )
122
153
123
154
def test_7_reconnect_connect_imx (self ):
155
+ print ("=" * 60 )
156
+ print ("STARTING TEST: test_7_reconnect_connect_imx" )
157
+ print ("=" * 60 )
124
158
self .restart_app_and_altdriver ()
125
159
126
160
# Reconnect
@@ -148,21 +182,24 @@ def test_7_reconnect_connect_imx(self):
148
182
time .sleep (10 ) # Give more time for logout browser process
149
183
bring_sample_app_to_foreground ()
150
184
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" )
163
187
stop_browser ()
164
188
print ("Logged out" )
165
189
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
+
166
203
# Connect IMX
167
204
print ("Logging in and connecting to IMX..." )
168
205
launch_browser ()
@@ -197,3 +234,5 @@ def test_7_reconnect_connect_imx(self):
197
234
self .get_altdriver ().wait_for_current_scene_to_be ("UnauthenticatedScene" )
198
235
stop_browser ()
199
236
print ("Logged out" )
237
+ print ("COMPLETED TEST: test_8_connect_imx" )
238
+ print ("=" * 60 )
0 commit comments