Skip to content

Commit 56143a0

Browse files
Mivanova/livesync aar file plugin (#160)
* new test * check livesync for aar file * remove unuse code
1 parent 2ce9ffa commit 56143a0

File tree

2 files changed

+31
-0
lines changed

2 files changed

+31
-0
lines changed
214 KB
Binary file not shown.

tests/emulator/run_android_tests.py

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -826,6 +826,37 @@ def test_370_tns_run_android_with_jar_and_aar_files_in_app_res(self):
826826
Device.screen_match(device_name=EMULATOR_NAME, device_id=EMULATOR_ID,
827827
expected_image='livesync-hello-world_home')
828828

829+
def test_380_tns_run_android_livesync_aar_file_changes(self):
830+
"""
831+
App should not crash when reference .jar or/and .aar file in App_Resources/Android/libs
832+
https://github.com/NativeScript/nativescript-cli/issues/3610
833+
"""
834+
Tns.plugin_add("nativescript-camera", attributes={"--path": self.app_name})
835+
log = Tns.run_android(attributes={'--path': self.app_name, '--device': EMULATOR_ID, '--syncAllFiles': ''}, wait=False,
836+
assert_success=False)
837+
838+
strings = ['Project successfully built',
839+
'Successfully installed on device with identifier', EMULATOR_ID,
840+
'Successfully synced application']
841+
Tns.wait_for_log(log_file=log, string_list=strings, timeout=180, check_interval=10)
842+
843+
# Verify app looks correct inside emulator
844+
Device.screen_match(device_name=EMULATOR_NAME, device_id=EMULATOR_ID,
845+
expected_image='livesync-hello-world_home')
846+
847+
copy_aar = os.path.join(TEST_RUN_HOME, 'data', 'plugins', 'TNSListView-release.aar')
848+
paste_aar = os.path.join(self.app_name, 'node_modules', 'nativescript-camera', 'platforms', 'android')
849+
850+
File.copy(src=copy_aar, dest=paste_aar)
851+
strings = ['Project successfully built',
852+
'Successfully installed on device with identifier', EMULATOR_ID,
853+
'Successfully synced application']
854+
Tns.wait_for_log(log_file=log, string_list=strings, timeout=180, check_interval=10)
855+
856+
# Verify app looks correct inside emulator
857+
Device.screen_match(device_name=EMULATOR_NAME, device_id=EMULATOR_ID,
858+
expected_image='livesync-hello-world_home')
859+
829860
@unittest.skip("Skip because of https://github.com/NativeScript/nativescript-cli/issues/2825")
830861
def test_390_tns_run_android_should_warn_if_package_ids_do_not_match(self):
831862
"""

0 commit comments

Comments
 (0)