Skip to content

Commit

Permalink
revert: screenshot fix attempt (commit 5964098)
Browse files Browse the repository at this point in the history
  • Loading branch information
noomorph committed Jun 16, 2018
1 parent e5523cd commit 4bb6978
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 14 deletions.
11 changes: 1 addition & 10 deletions detox/src/artifacts/ArtifactsManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ class ArtifactsManager {
this.onTerminate = _.once(this.onTerminate.bind(this));

this._idlePromise = Promise.resolve();
this._relaunchPromise = Promise.resolve();
this._onIdleCallbacks = [];
this._activeArtifacts = [];
this._artifactPluginsFactories = [];
Expand Down Expand Up @@ -142,21 +141,15 @@ class ArtifactsManager {
this._pid = pid;

if (!isFirstTime) {
this._relaunchPromise = this._relaunchPromise.then(() => {
return this._emit('onRelaunchApp', [{ deviceId, bundleId, pid }]);
});

await this._relaunchPromise;
await this._emit('onRelaunchApp', [{ deviceId, bundleId, pid }]);
}
}

async onBeforeAll() {
await this._relaunchPromise;
await this._emit('onBeforeAll', []);
}

async onBeforeEach(testSummary) {
await this._relaunchPromise;
await this._emit('onBeforeEach', [testSummary]);
}

Expand All @@ -169,12 +162,10 @@ class ArtifactsManager {
}

async onAfterEach(testSummary) {
await this._relaunchPromise;
await this._emit('onAfterEach', [testSummary]);
}

async onAfterAll() {
await this._relaunchPromise;
await this._emit('onAfterAll', []);
await this._idlePromise;
log.verbose('ArtifactsManager', 'finalized artifacts successfully');
Expand Down
4 changes: 0 additions & 4 deletions detox/src/artifacts/templates/plugin/ArtifactPlugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,6 @@ class ArtifactPlugin {
*
* @protected
* @async
* @param {Object} event - Relaunch app event object
* @param {string} event.deviceId - Current deviceId
* @param {string} event.bundleId - Current bundleId
* @param {number} event.pid - Process id of the running app
* @return {Promise<void>} - when done
*/
async onBeforeAll() {}
Expand Down

0 comments on commit 4bb6978

Please sign in to comment.