3
3
from alttester import *
4
4
5
5
from test import TestConfig , UnityTest
6
- from test_windows_helpers import login , open_sample_app , launch_chrome , bring_sample_app_to_foreground , stop_chrome , stop_sample_app
6
+ from test_windows_helpers import login , open_sample_app , launch_browser , bring_sample_app_to_foreground , stop_browser , stop_sample_app
7
7
8
8
class WindowsTest (UnityTest ):
9
9
@@ -31,19 +31,19 @@ def test_1_device_code_login(self):
31
31
32
32
# Login
33
33
print ("Logging in..." )
34
- launch_chrome ()
34
+ launch_browser ()
35
35
bring_sample_app_to_foreground ()
36
36
login_button .tap ()
37
37
login ()
38
38
bring_sample_app_to_foreground ()
39
39
40
40
# Wait for authenticated screen
41
41
self .altdriver .wait_for_current_scene_to_be ("AuthenticatedScene" )
42
- stop_chrome ()
42
+ stop_browser ()
43
43
print ("Logged in" )
44
44
return
45
45
except Exception as err :
46
- stop_chrome ()
46
+ stop_browser ()
47
47
48
48
if attempt == 0 :
49
49
# Reset app
@@ -58,15 +58,15 @@ def test_1_device_code_login(self):
58
58
59
59
# Logout
60
60
print ("Logging out..." )
61
- launch_chrome ()
61
+ launch_browser ()
62
62
bring_sample_app_to_foreground ()
63
63
self .altdriver .find_object (By .NAME , "LogoutBtn" ).tap ()
64
64
time .sleep (5 )
65
65
bring_sample_app_to_foreground ()
66
66
67
67
# Wait for unauthenticated screen
68
68
self .altdriver .wait_for_current_scene_to_be ("UnauthenticatedScene" )
69
- stop_chrome ()
69
+ stop_browser ()
70
70
print ("Logged out and successfully reset app" )
71
71
72
72
time .sleep (5 )
@@ -143,20 +143,20 @@ def test_7_reconnect_device_code_connect_imx(self):
143
143
144
144
# Logout
145
145
print ("Logging out..." )
146
- launch_chrome ()
146
+ launch_browser ()
147
147
bring_sample_app_to_foreground ()
148
148
self .altdriver .find_object (By .NAME , "LogoutBtn" ).tap ()
149
149
time .sleep (5 )
150
150
bring_sample_app_to_foreground ()
151
151
152
152
# Wait for authenticated screen
153
153
self .altdriver .wait_for_current_scene_to_be ("UnauthenticatedScene" )
154
- stop_chrome ()
154
+ stop_browser ()
155
155
print ("Logged out" )
156
156
157
157
# Connect IMX
158
158
print ("Logging in and connecting to IMX..." )
159
- launch_chrome ()
159
+ launch_browser ()
160
160
bring_sample_app_to_foreground ()
161
161
self .altdriver .wait_for_object (By .NAME , "ConnectBtn" ).tap ()
162
162
login ()
@@ -165,7 +165,7 @@ def test_7_reconnect_device_code_connect_imx(self):
165
165
# Wait for authenticated screen
166
166
self .altdriver .wait_for_current_scene_to_be ("AuthenticatedScene" )
167
167
print ("Logged in and connected to IMX" )
168
- stop_chrome ()
168
+ stop_browser ()
169
169
170
170
# Get access token
171
171
self .altdriver .find_object (By .NAME , "GetAccessTokenBtn" ).tap ()
@@ -177,7 +177,7 @@ def test_7_reconnect_device_code_connect_imx(self):
177
177
self .assertEqual (TestConfig .WALLET_ADDRESS , output .get_text ())
178
178
179
179
# Logout
180
- launch_chrome ()
180
+ launch_browser ()
181
181
bring_sample_app_to_foreground ()
182
182
print ("Logging out..." )
183
183
self .altdriver .find_object (By .NAME , "LogoutBtn" ).tap ()
@@ -186,5 +186,5 @@ def test_7_reconnect_device_code_connect_imx(self):
186
186
187
187
# Wait for authenticated screen
188
188
self .altdriver .wait_for_current_scene_to_be ("UnauthenticatedScene" )
189
- stop_chrome ()
189
+ stop_browser ()
190
190
print ("Logged out" )
0 commit comments