UNPKG

@ng-apimock/cypress-plugin

Version:
27 lines 1.75 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const cypress_plugin_1 = require("./cypress.plugin"); function load() { const plugin = new cypress_plugin_1.CypressPlugin(); Cypress.Commands.add('createPreset', (name, includeMocks, includeVariables) => plugin.createPreset(name, includeMocks, includeVariables)); Cypress.Commands.add('delayResponse', (name, delay) => plugin.delayResponse(name, delay)); Cypress.Commands.add('deleteVariable', (name) => plugin.deleteVariable(name)); Cypress.Commands.add('echoRequest', (name, echo) => plugin.echoRequest(name, echo)); Cypress.Commands.add('getMocks', () => plugin.getMocks()); Cypress.Commands.add('getPresets', () => plugin.getPresets()); Cypress.Commands.add('getRecordings', () => plugin.getRecordings()); Cypress.Commands.add('getVariables', () => plugin.getVariables()); Cypress.Commands.add('initializeNgApimock', () => plugin.setNgApimockCookie()); Cypress.Commands.add('recordRequests', (record) => plugin.recordRequests(record)); Cypress.Commands.add('resetMocksToDefault', () => plugin.resetMocksToDefault()); Cypress.Commands.add('initializeNgApimock', () => plugin.setNgApimockCookie()); Cypress.Commands.add('selectPreset', (name) => plugin.selectPreset(name)); Cypress.Commands.add('selectScenario', (name, scenario) => plugin.selectScenario(name, scenario)); Cypress.Commands.add('setMocksToPassThrough', () => plugin.setMocksToPassThrough()); Cypress.Commands.add('setVariable', (key, value) => plugin.setVariable(key, value)); Cypress.Commands.add('setVariables', (variables) => plugin.setVariables(variables)); } module.exports = { load, }; //# sourceMappingURL=index.js.map