@@ -250,18 +250,16 @@ def test_330_tns_run_ios_after_rebuild_of_native_project(self):
250
250
assert Device .wait_for_text (device_id = self .DEVICE_ID , text = "Tap the button" ), "App failed to load!"
251
251
252
252
# Change JS and wait until app is synced
253
- # ReplaceHelper.replace(self.app_name, ReplaceHelper.CHANGE_JS, sleep=10)
254
- # strings = ['Successfully transferred', 'main-view-model.js', 'Successfully synced application', self.DEVICE_ID]
255
- # Tns.wait_for_log(log_file=log, string_list=strings)
256
- # assert Device.wait_for_text(device_id=self.DEVICE_ID, text="clicks"), "JS changes not synced on device!"
253
+ ReplaceHelper .replace (self .app_name , ReplaceHelper .CHANGE_JS , sleep = 10 )
254
+ strings = ['Successfully transferred' , 'main-view-model.js' , 'Successfully synced application' , self .DEVICE_ID ]
255
+ Tns .wait_for_log (log_file = log , string_list = strings )
256
+ assert Device .wait_for_text (device_id = self .DEVICE_ID , text = "clicks" ), "JS changes not synced on device!"
257
257
258
258
# Rollback all the changes and verify files are synced
259
- # ReplaceHelper.rollback(self.app_name, ReplaceHelper.CHANGE_JS, sleep=10)
260
- # strings = ['Successfully transferred', 'main-view-model.js', 'Refreshing application']
261
- # Tns.wait_for_log(log_file=log, string_list=strings)
262
- # assert Device.wait_for_text(device_id=self.DEVICE_ID, text="taps left"), "JS changes not synced on device!"
263
-
264
- # TODO: We need test for issue 2988
259
+ ReplaceHelper .rollback (self .app_name , ReplaceHelper .CHANGE_JS , sleep = 10 )
260
+ strings = ['Successfully transferred' , 'main-view-model.js' , 'Refreshing application' ]
261
+ Tns .wait_for_log (log_file = log , string_list = strings )
262
+ assert Device .wait_for_text (device_id = self .DEVICE_ID , text = "taps left" ), "JS changes not synced on device!"
265
263
266
264
def test_400_tns_run_ios_should_not_crash_when_uninstall_app (self ):
267
265
"""
@@ -292,3 +290,14 @@ def test_400_tns_run_ios_should_not_crash_when_uninstall_app(self):
292
290
strings = ['Successfully installed' , 'Successfully synced application' ]
293
291
Tns .wait_for_log (log_file = log , string_list = strings , timeout = 150 , check_interval = 10 )
294
292
assert Device .wait_for_text (device_id = self .DEVICE_ID , text = "TEST" ), "XML changes not synced on device!"
293
+
294
+ def test_404_tns_run_ios_on_not_existing_device_should_not_start_simualtor (self ):
295
+ """
296
+ `tns run ios --device fakeID` should show error and emulator should not be started (test for issue #2728)
297
+ """
298
+ Simulator .stop ()
299
+ output = Tns .run_ios (attributes = {'--path' : self .app_name , '--device' : 'fakeID' , '--justlaunch' : '' },
300
+ assert_success = False )
301
+ TnsAsserts .invalid_device (output = output )
302
+ sleep (10 )
303
+ assert not Simulator .is_running ()[0 ], 'iOS Simulator started by `tns run ios --device fakeID`!'
0 commit comments