|
28 | 28 | from core.osutils.process import Process
|
29 | 29 | from core.settings.settings import ANDROID_RUNTIME_PATH, ANDROID_KEYSTORE_PATH, ANDROID_KEYSTORE_PASS, \
|
30 | 30 | ANDROID_KEYSTORE_ALIAS, ANDROID_KEYSTORE_ALIAS_PASS, EMULATOR_ID, EMULATOR_NAME, CURRENT_OS
|
| 31 | +from core.settings.strings import cannot_resolve_device, list_devices |
31 | 32 | from core.tns.replace_helper import ReplaceHelper
|
32 | 33 | from core.tns.tns import Tns
|
33 | 34 | from core.tns.tns_platform_type import Platform
|
@@ -95,7 +96,8 @@ def test_001_tns_run_android_js_css_xml_manifest(self):
|
95 | 96 | Tns.wait_for_log(log_file=log, string_list=strings)
|
96 | 97 |
|
97 | 98 | # Verify application looks correct
|
98 |
| - Device.screen_match(device_name=EMULATOR_NAME, device_id=EMULATOR_ID, expected_image='livesync-hello-world_js_css_xml') |
| 99 | + Device.screen_match(device_name=EMULATOR_NAME, device_id=EMULATOR_ID, |
| 100 | + expected_image='livesync-hello-world_js_css_xml') |
99 | 101 |
|
100 | 102 | # Rollback all the changes
|
101 | 103 | ReplaceHelper.rollback(self.app_name, ReplaceHelper.CHANGE_JS, sleep=10)
|
@@ -483,3 +485,9 @@ def test_401_tns_run_android_should_not_continue_on_build_failure(self):
|
483 | 485 | assert "successfully built" not in output
|
484 | 486 | assert "installed" not in output
|
485 | 487 | assert "synced" not in output
|
| 488 | + |
| 489 | + def test_404_run_on_invalid_device_id(self): |
| 490 | + output = Tns.run_android(attributes={'--path': self.app_name, '--device': 'fakeId', '--justlaunch': ''}, |
| 491 | + assert_success=False) |
| 492 | + assert cannot_resolve_device in output |
| 493 | + assert list_devices in output |
0 commit comments