Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added data/plugins/TNSListView-release.aar
Binary file not shown.
31 changes: 31 additions & 0 deletions tests/emulator/run_android_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -814,6 +814,37 @@ def test_370_tns_run_android_with_jar_and_aar_files_in_app_res(self):
Device.screen_match(device_name=EMULATOR_NAME, device_id=EMULATOR_ID,
expected_image='livesync-hello-world_home')

def test_380_tns_run_android_livesync_aar_file_changes(self):
"""
App should not crash when reference .jar or/and .aar file in App_Resources/Android/libs
https://github.com/NativeScript/nativescript-cli/issues/3610
"""
Tns.plugin_add("nativescript-camera", attributes={"--path": self.app_name})
log = Tns.run_android(attributes={'--path': self.app_name, '--device': EMULATOR_ID, '--syncAllFiles': ''}, wait=False,
assert_success=False)

strings = ['Project successfully built',
'Successfully installed on device with identifier', EMULATOR_ID,
'Successfully synced application']
Tns.wait_for_log(log_file=log, string_list=strings, timeout=180, check_interval=10)

# Verify app looks correct inside emulator
Device.screen_match(device_name=EMULATOR_NAME, device_id=EMULATOR_ID,
expected_image='livesync-hello-world_home')

copy_aar = os.path.join(TEST_RUN_HOME, 'data', 'plugins', 'TNSListView-release.aar')
paste_aar = os.path.join(self.app_name, 'node_modules', 'nativescript-camera', 'platforms', 'android')

File.copy(src=copy_aar, dest=paste_aar)
strings = ['Project successfully built',
'Successfully installed on device with identifier', EMULATOR_ID,
'Successfully synced application']
Tns.wait_for_log(log_file=log, string_list=strings, timeout=180, check_interval=10)

# Verify app looks correct inside emulator
Device.screen_match(device_name=EMULATOR_NAME, device_id=EMULATOR_ID,
expected_image='livesync-hello-world_home')

@unittest.skip("Skip because of https://github.com/NativeScript/nativescript-cli/issues/2825")
def test_390_tns_run_android_should_warn_if_package_ids_do_not_match(self):
"""
Expand Down