askui
Version:
Reliable, automated end-to-end-testing that depends on what is shown on your screen instead of the technology you are running on
20 lines (19 loc) • 688 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.Action = void 0;
const input_event_1 = require("./input-event");
class Action {
constructor(inputEvent, position, text, parameters = {}) {
this.inputEvent = inputEvent;
this.position = position;
this.text = text;
this.parameters = parameters;
}
static fromJson(action, resizeRatio = 1) {
return new Action(input_event_1.InputEvent[action.inputEvent], {
x: action.position.x * resizeRatio,
y: action.position.y * resizeRatio,
}, action.text, action.parameters ? action.parameters : {});
}
}
exports.Action = Action;