UNPKG

gauge-ts

Version:
21 lines (20 loc) 968 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.StepExecutionStartingProcessor = void 0; const HookRegistry_1 = require("../models/HookRegistry"); const HookType_1 = require("../models/HookType"); const HookExecutionProcessor_1 = require("./HookExecutionProcessor"); class StepExecutionStartingProcessor extends HookExecutionProcessor_1.HookExecutionProcessor { hookType = HookType_1.HookType.BeforeStep; getExecutionInfo(hookExecreq) { const req = hookExecreq; return req.getCurrentexecutioninfo(); } getApplicableHooks(hookExecReq) { const execInfo = this.getExecutionInfo(hookExecReq); const specInfo = execInfo.getCurrentspec(); const scenInfo = execInfo.getCurrentscenario(); return HookRegistry_1.default.get(this.hookType, specInfo.getTagsList().concat(scenInfo.getTagsList())); } } exports.StepExecutionStartingProcessor = StepExecutionStartingProcessor;