77 lines
8.6 KiB
JavaScript
77 lines
8.6 KiB
JavaScript
"use strict";
|
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
};
|
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
exports.DisableDebugCommand = exports.DebugCommand = exports.ExecuteSelectorCommand = exports.ExecuteClientFunctionCommand = exports.ExecuteClientFunctionCommandBase = exports.WaitCommand = void 0;
|
|
const type_1 = __importDefault(require("./type"));
|
|
const base_1 = require("./base");
|
|
const argument_1 = require("./validations/argument");
|
|
const lodash_1 = require("lodash");
|
|
// Commands
|
|
class WaitCommand extends base_1.ActionCommandBase {
|
|
constructor(obj, testRun) {
|
|
super(obj, testRun, type_1.default.wait);
|
|
}
|
|
getAssignableProperties() {
|
|
return [
|
|
{ name: 'timeout', type: argument_1.positiveIntegerArgument, required: true },
|
|
];
|
|
}
|
|
}
|
|
exports.WaitCommand = WaitCommand;
|
|
WaitCommand.methodName = (0, lodash_1.camelCase)(type_1.default.wait);
|
|
class ExecuteClientFunctionCommandBase extends base_1.ActionCommandBase {
|
|
constructor(obj, testRun, type) {
|
|
super(obj, testRun, type, false);
|
|
}
|
|
getAssignableProperties() {
|
|
return [
|
|
{ name: 'instantiationCallsiteName', defaultValue: '' },
|
|
{ name: 'fnCode', defaultValue: '' },
|
|
{ name: 'args', defaultValue: [] },
|
|
{ name: 'dependencies', defaultValue: [] },
|
|
{ name: 'esmRuntime', defaultValue: null },
|
|
];
|
|
}
|
|
}
|
|
exports.ExecuteClientFunctionCommandBase = ExecuteClientFunctionCommandBase;
|
|
class ExecuteClientFunctionCommand extends ExecuteClientFunctionCommandBase {
|
|
constructor(obj, testRun) {
|
|
super(obj, testRun, type_1.default.executeClientFunction);
|
|
}
|
|
}
|
|
exports.ExecuteClientFunctionCommand = ExecuteClientFunctionCommand;
|
|
ExecuteClientFunctionCommand.methodName = type_1.default.executeClientFunction;
|
|
class ExecuteSelectorCommand extends ExecuteClientFunctionCommandBase {
|
|
constructor(obj, testRun) {
|
|
super(obj, testRun, type_1.default.executeSelector);
|
|
}
|
|
getAssignableProperties() {
|
|
return [
|
|
{ name: 'visibilityCheck', defaultValue: false },
|
|
{ name: 'timeout', defaultValue: null },
|
|
{ name: 'apiFnChain' },
|
|
{ name: 'needError' },
|
|
{ name: 'index', defaultValue: 0 },
|
|
{ name: 'strictError' },
|
|
];
|
|
}
|
|
}
|
|
exports.ExecuteSelectorCommand = ExecuteSelectorCommand;
|
|
ExecuteSelectorCommand.methodName = type_1.default.executeSelector;
|
|
class DebugCommand extends base_1.ActionCommandBase {
|
|
constructor() {
|
|
super(null, null, type_1.default.debug);
|
|
}
|
|
}
|
|
exports.DebugCommand = DebugCommand;
|
|
DebugCommand.methodName = (0, lodash_1.camelCase)(type_1.default.debug);
|
|
class DisableDebugCommand extends base_1.ActionCommandBase {
|
|
constructor() {
|
|
super(null, null, type_1.default.disableDebug);
|
|
}
|
|
}
|
|
exports.DisableDebugCommand = DisableDebugCommand;
|
|
DisableDebugCommand.methodName = (0, lodash_1.camelCase)(type_1.default.disableDebug);
|
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoib2JzZXJ2YXRpb24uanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9zcmMvdGVzdC1ydW4vY29tbWFuZHMvb2JzZXJ2YXRpb24uanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7O0FBQUEsa0RBQTBCO0FBQzFCLGlDQUEyQztBQUMzQyxxREFBaUU7QUFDakUsbUNBQW1DO0FBRW5DLFdBQVc7QUFDWCxNQUFhLFdBQVksU0FBUSx3QkFBaUI7SUFHOUMsWUFBYSxHQUFHLEVBQUUsT0FBTztRQUNyQixLQUFLLENBQUMsR0FBRyxFQUFFLE9BQU8sRUFBRSxjQUFJLENBQUMsSUFBSSxDQUFDLENBQUM7SUFDbkMsQ0FBQztJQUVELHVC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