Skip to content

Commit 684537b

Browse files
FatmeFatme
authored andcommitted
Merge pull request #1140 from NativeScript/fatme/fix-first-test-run
Fixes #1123
2 parents f26005c + 07ffbdc commit 684537b

File tree

3 files changed

+12
-5
lines changed

3 files changed

+12
-5
lines changed

lib/services/test-execution-service.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,12 @@ class TestExecutionService implements ITestExecutionService {
7575
}).future<boolean>()();
7676
};
7777

78-
let notRunningiOSSimulatorAction = (): IFuture<void> => {
79-
return this.$platformService.deployOnEmulator(this.$devicePlatformsConstants.iOS.toLowerCase());
78+
let notRunningiOSSimulatorAction = (): IFuture<boolean> => {
79+
return (() => {
80+
this.$platformService.deployOnEmulator(this.$devicePlatformsConstants.iOS.toLowerCase()).wait();
81+
this.detourEntryPoint(projectFilesPath).wait();
82+
return true;
83+
}).future<boolean>()();
8084
};
8185

8286
let beforeBatchLiveSyncAction = (filePath: string): IFuture<string> => {

lib/services/usb-livesync-service.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,11 @@ export class UsbLiveSyncService extends usbLivesyncServiceBaseLib.UsbLiveSyncSer
6969
}).future<boolean>()();
7070
};
7171

72-
let notRunningiOSSimulatorAction = (): IFuture<void> => {
73-
return this.$platformService.deployOnEmulator(this.$devicePlatformsConstants.iOS.toLowerCase());
72+
let notRunningiOSSimulatorAction = (): IFuture<boolean> => {
73+
return (() => {
74+
this.$platformService.deployOnEmulator(this.$devicePlatformsConstants.iOS.toLowerCase()).wait();
75+
return false;
76+
}).future<boolean>()();
7477
};
7578

7679
let beforeLiveSyncAction = (device: Mobile.IDevice, deviceAppData: Mobile.IDeviceAppData): IFuture<void> => {

0 commit comments

Comments
 (0)