Innovenergy_trunk/frontend/node_modules/testcafe/lib/live/test-run-controller.js

98 lines
13 KiB
JavaScript

"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const events_1 = __importDefault(require("events"));
const lodash_1 = require("lodash");
const test_run_1 = require("./test-run");
const test_run_state_1 = __importDefault(require("./test-run-state"));
class LiveModeTestRunController extends events_1.default {
constructor() {
super();
this.testWrappers = [];
this.expectedTestCount = 0;
this._testRunCtor = null;
this.testRuns = {};
this.allTestsCompletePromise = Promise.resolve();
this.completeAllRunningTests = lodash_1.noop;
this.on('all-tests-complete', () => this.completeAllRunningTests());
}
get TestRunCtor() {
if (!this._testRunCtor) {
this._testRunCtor = (0, test_run_1.TestRunCtorFactory)({
created: testRun => this._onTestRunCreated(testRun),
done: (testRun, forced) => this._onTestRunDone(testRun, forced),
readyToNext: testRun => this._onTestRunReadyToNext(testRun),
});
}
return this._testRunCtor;
}
setExpectedTestCount(testCount) {
this.expectedTestCount = testCount;
}
_getTestRuns() {
return [].concat(...Object.values(this.testRuns));
}
run() {
const readyToNextPromises = [];
const testRuns = [].concat(...Object.values(this.testRuns));
testRuns.forEach(testRun => {
if (testRun.finish) {
readyToNextPromises.push(testRun.readyToNextPromise);
testRun.finish();
}
});
this.testRuns = {};
return Promise.all(readyToNextPromises);
}
stop() {
this._getTestRuns().forEach(testRun => {
testRun.stop();
});
}
_getTestWrapper(test) {
return this.testWrappers.find(w => w.test === test);
}
_onTestRunCreated(testRun) {
this.allTestsCompletePromise = new Promise(resolve => {
this.completeAllRunningTests = resolve;
});
const connectionId = testRun.browserConnection.id;
this.testRuns[connectionId] = this.testRuns[connectionId] || [];
this.testRuns[connectionId].push(testRun);
}
_onTestRunDone(testRun) {
testRun.state = test_run_state_1.default.done;
const testWillBeRestarted = !this._isTestFinished(testRun);
const hasRunningTestsInOtherBrowsers = this._getTestRuns().some(t => t.state !== test_run_state_1.default.done);
if (!hasRunningTestsInOtherBrowsers && !testWillBeRestarted)
this.emit('all-tests-complete');
const browserTestRuns = this.testRuns[testRun.browserConnection.id];
const tests = (0, lodash_1.uniq)(browserTestRuns.map(t => t.test));
testRun.readyToNextPromise = new Promise(resolve => {
testRun.setReadyToNext = resolve;
});
const isLastTestRun = tests.length >= this.expectedTestCount;
if (testWillBeRestarted || !isLastTestRun)
return Promise.resolve();
return new Promise(resolve => {
testRun.finish = () => {
testRun.finish = null;
resolve();
};
});
}
_onTestRunReadyToNext(testRun) {
testRun.setReadyToNext();
}
_isTestFinished(testRun) {
const { quarantine, errs } = testRun;
if (!quarantine)
return true;
return quarantine.isFirstAttemptSuccessful(errs) || quarantine.isThresholdReached(errs);
}
}
exports.default = LiveModeTestRunController;
module.exports = exports.default;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGVzdC1ydW4tY29udHJvbGxlci5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9saXZlL3Rlc3QtcnVuLWNvbnRyb2xsZXIuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7QUFBQSxvREFBa0M7QUFDbEMsbUNBQW9DO0FBQ3BDLHlDQUFnRDtBQUNoRCxzRUFBOEM7QUFFOUMsTUFBTSx5QkFBMEIsU0FBUSxnQkFBWTtJQUNoRDtRQUNJLEtBQUssRUFBRSxDQUFDO1FBRVIsSUFBSSxDQUFDLFlBQVksR0FBUSxFQUFFLENBQUM7UUFDNUIsSUFBSSxDQUFDLGlCQUFpQixHQUFHLENBQUMsQ0FBQztRQUMzQixJQUFJLENBQUMsWUFBWSxHQUFRLElBQUksQ0FBQztRQUU5QixJQUFJLENBQUMsUUFBUSxHQUFrQixFQUFFLENBQUM7UUFDbEMsSUFBSSxDQUFDLHVCQUF1QixHQUFHLE9BQU8sQ0FBQyxPQUFPLEVBQUUsQ0FBQztRQUNqRCxJQUFJLENBQUM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W4pLFxuICAgICAgICAgICAgfSk7XG4gICAgICAgIH1cblxuICAgICAgICByZXR1cm4gdGhpcy5fdGVzdFJ1bkN0b3I7XG4gICAgfVxuXG4gICAgc2V0RXhwZWN0ZWRUZXN0Q291bnQgKHRlc3RDb3VudCkge1xuICAgICAgICB0aGlzLmV4cGVjdGVkVGVzdENvdW50ID0gdGVzdENvdW50O1xuICAgIH1cblxuICAgIF9nZXRUZXN0UnVucyAoKSB7XG4gICAgICAgIHJldHVybiBbXS5jb25jYXQoLi4uT2JqZWN0LnZhbHVlcyh0aGlzLnRlc3RSdW5zKSk7XG4gICAgfVxuXG4gICAgcnVuICgpIHtcbiAgICAgICAgY29uc3QgcmVhZHlUb05leHRQcm9taXNlcyA9IFtdO1xuXG4gICAgICAgIGNvbnN0IHRlc3RSdW5zID0gW10uY29uY2F0KC4uLk9iamVjdC52YWx1ZXModGhpcy50ZXN0UnVucykpO1xuXG4gICAgICAgIHRlc3RSdW5zLmZvckVhY2godGVzdFJ1biA9PiB7XG4gICAgICAgICAgICBpZiAodGVzdFJ1bi5maW5pc2gpIHtcbiAgICAgICAgICAgICAgICByZWFkeVRvTmV4dFByb21pc2VzLnB1c2godGVzdFJ1bi5yZWFkeVRvTmV4dFByb21pc2UpO1xuICAgICAgICAgICAgICAgIHRlc3RSdW4uZmluaXNoKCk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH0pO1xuXG4gICAgICAgIHRoaXMudGVzdFJ1bnMgPSB7fTtcblxuICAgICAgICByZXR1cm4gUHJvbWlzZS5hbGwocmVhZHlUb05leHRQcm9taXNlcyk7XG4gICAgfVxuXG4gICAgc3RvcCAoKSB7XG4gICAgICAgIHRoaXMuX2dldFRlc3RSdW5zKCkuZm9yRWFjaCh0ZXN0UnVuID0+IHtcbiAgICAgICAgICAgIHRlc3RSdW4uc3RvcCgpO1xuICAgICAgICB9KTtcbiAgICB9XG5cbiAgICBfZ2V0VGVzdFdyYXBwZXIgKHRlc3QpIHtcbiAgICAgICAg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