Skip to content

Commit 8e18e3d

Browse files
committed
Add verifications for NativeScript/nativescript-cli#2903
1 parent a772f4f commit 8e18e3d

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

core/tns/tns.py

+9
Original file line numberDiff line numberDiff line change
@@ -405,6 +405,15 @@ def run_android(attributes={}, assert_success=True, log_trace=False, timeout=COM
405405
if assert_success:
406406
assert "Project successfully built" in output
407407
assert "Successfully installed on device with identifier" in output
408+
app_name = Tns.__get_app_name_from_attributes(attributes=attributes)
409+
apk_base_name = Tns.__get_final_package_name(app_name, platform=Platform.ANDROID)
410+
base_app_path = app_name + TnsAsserts.PLATFORM_ANDROID + "build/outputs/apk/" + apk_base_name
411+
if "--release" in attributes.keys():
412+
apk_path = base_app_path + "-release.apk"
413+
else:
414+
apk_path = base_app_path + "-debug.apk"
415+
apk_path = apk_path.replace("\"", "") # Handle projects with space
416+
assert File.exists(apk_path), "Apk file does not exist at " + apk_path
408417
return output
409418

410419
@staticmethod

tests/simulator/debug_ios_tests.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ def test_100_debug_ios_simulator_with_livesync(self):
129129

130130
# Change JS and wait until app is synced
131131
ReplaceHelper.replace(self.app_name, ReplaceHelper.CHANGE_JS, sleep=10)
132-
strings = ['Successfully transferred', 'main-view-model.js', 'Successfully synced application', 'CONSOLE LOG',
132+
strings = ['Successfully transferred', 'main-view-model.js', 'CONSOLE LOG',
133133
'Backend socket closed', 'Frontend socket closed', 'NativeScript debugger detached',
134134
'Frontend client connected', 'Backend socket created', 'NativeScript debugger attached']
135135
Tns.wait_for_log(log_file=log, string_list=strings)

0 commit comments

Comments
 (0)