Skip to content

Commit 1d63a1c

Browse files
author
Natalia Hristova
committed
Add check for not changing Chrome DevTools url/socket (cli #3183 and #3261) (#86)
1 parent 520bdf2 commit 1d63a1c

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

tests/simulator/debug_ios_chrome_tests.py

+10-1
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,9 @@ def test_100_debug_ios_simulator_with_livesync(self):
115115
log = Tns.debug_ios(attributes={'--path': self.app_name, '--emulator': ''})
116116
self.__verify_debugger_start(log)
117117

118+
# Get Chrome URL
119+
url_1 = run(command="grep chrome-devtools " + log)
120+
118121
# Verify app starts and do not stop on first line of code
119122
Device.screen_match(device_name=SIMULATOR_NAME,
120123
device_id=self.SIMULATOR_ID, expected_image='livesync-hello-world_home')
@@ -132,8 +135,14 @@ def test_100_debug_ios_simulator_with_livesync(self):
132135
# Change CSS and wait until app is synced
133136
ReplaceHelper.replace(self.app_name, ReplaceHelper.CHANGE_CSS, sleep=3)
134137
strings = ['Successfully transferred', 'app.css', 'open the following URL in Chrome', 'CONSOLE LOG']
135-
Tns.wait_for_log(log_file=log, string_list=strings)
138+
Tns.wait_for_log(log_file=log, string_list=strings, clean_log=False)
136139

137140
# Verify application looks correct
138141
Device.screen_match(device_name=SIMULATOR_NAME, device_id=self.SIMULATOR_ID,
139142
expected_image='livesync-hello-world_js_css_xml')
143+
144+
# Get Chrome URL and check it is not changed - https://github.com/NativeScript/nativescript-cli/issues/3183
145+
url_2 = run(command="grep -a chrome-devtools " + log)
146+
assert url_1 == url_2, "Chrome DevTools URLs are different! \n First URL: {0}, \n Second URL: {1}"\
147+
.format(url_1, url_2)
148+

0 commit comments

Comments
 (0)