cybernaut
Version:
Reliable, zero configuration end-to-end testing in BDD-style.
80 lines • 2.29 kB
JavaScript
// tslint:disable no-any
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const sinon_1 = require("sinon");
class BrowserStubs {
constructor() {
this.outputFile = sinon_1.stub();
this.sleep = sinon_1.stub();
this.uuidV4 = sinon_1.stub();
}
}
exports.BrowserStubs = BrowserStubs;
exports.browserStubs = new BrowserStubs();
class ConfigStubs {
constructor() {
this.resolve = sinon_1.stub();
}
}
exports.ConfigStubs = ConfigStubs;
exports.configStubs = new ConfigStubs();
class ElementStubs {
constructor() {
this.translate = sinon_1.stub();
}
}
exports.ElementStubs = ElementStubs;
exports.elementStubs = new ElementStubs();
class ImplementationStubs {
constructor() {
this.Builder = sinon_1.stub();
this.Test = sinon_1.stub();
this.build = sinon_1.stub();
this.implementation = sinon_1.stub();
this.implicitlyWait = sinon_1.stub();
this.manage = sinon_1.stub();
this.pageLoadTimeout = sinon_1.stub();
this.pass = sinon_1.stub();
this.quit = sinon_1.stub();
this.setScriptTimeout = sinon_1.stub();
this.timeouts = sinon_1.stub();
this.withCapabilities = sinon_1.stub();
}
}
exports.ImplementationStubs = ImplementationStubs;
exports.implementationStubs = new ImplementationStubs();
class PredicateStubs {
constructor() {
this.deepStrictEqual = sinon_1.stub();
}
}
exports.PredicateStubs = PredicateStubs;
exports.predicateStubs = new PredicateStubs();
class StepStubs {
constructor() {
this.sleep = sinon_1.stub();
this.step = sinon_1.stub();
}
}
exports.StepStubs = StepStubs;
exports.stepStubs = new StepStubs();
class TestStubs {
constructor() {
this.fail = sinon_1.stub();
this.format = sinon_1.stub();
this.get = sinon_1.stub();
this.pass = sinon_1.stub();
this.perform = sinon_1.stub();
this.run = sinon_1.stub();
this.test = sinon_1.stub();
}
}
exports.TestStubs = TestStubs;
exports.testStubs = new TestStubs();
function resetAll(stubs) {
for (const key of Object.keys(stubs)) {
stubs[key].reset();
}
}
exports.resetAll = resetAll;
//# sourceMappingURL=stubs.js.map