UNPKG

ng-apimock-with-presets

Version:

An ng-apimock fork with preset functionality

39 lines 2.17 kB
"use strict"; var __extends = (this && this.__extends) || (function () { var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; })(); Object.defineProperty(exports, "__esModule", { value: true }); var helper_1 = require("../../helper"); var updateMockHandler_1 = require("../updateMockHandler"); var ProtractorUpdateMockHandler = (function (_super) { __extends(ProtractorUpdateMockHandler, _super); function ProtractorUpdateMockHandler() { return _super !== null && _super.apply(this, arguments) || this; } ProtractorUpdateMockHandler.prototype.handlePassThroughScenario = function (registry, identifier, ngApimockId) { helper_1.default.protractor.addSessionIfNonExisting(registry, ngApimockId); delete registry.sessions[ngApimockId].selections[identifier]; }; ProtractorUpdateMockHandler.prototype.handleScenarioSelection = function (registry, identifier, scenario, ngApimockId) { helper_1.default.protractor.addSessionIfNonExisting(registry, ngApimockId); registry.sessions[ngApimockId].selections[identifier] = scenario; }; ProtractorUpdateMockHandler.prototype.handleDelay = function (registry, identifier, delay, ngApimockId) { helper_1.default.protractor.addSessionIfNonExisting(registry, ngApimockId); registry.sessions[ngApimockId].delays[identifier] = delay; }; ProtractorUpdateMockHandler.prototype.handleEcho = function (registry, identifier, echo, ngApimockId) { helper_1.default.protractor.addSessionIfNonExisting(registry, ngApimockId); registry.sessions[ngApimockId].echos[identifier] = echo; }; return ProtractorUpdateMockHandler; }(updateMockHandler_1.default)); exports.default = ProtractorUpdateMockHandler; //# sourceMappingURL=updateMockHandler.js.map