systelab-components-wdio-test
Version:
Widgets to be use in the E2E Tests based in WDIO
32 lines (31 loc) • 917 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.Spinner = void 0;
const widget_js_1 = require("./widget.js");
const browser_js_1 = require("../wdio/browser.js");
class Spinner extends widget_js_1.Widget {
async clear() {
return this.byTagName('input').clear();
}
async setText(text) {
return this.byTagName('input').write(text);
}
async getText() {
return this.byTagName('input').getValue();
}
async getValue() {
return +(await this.getText());
}
async setValue(value) {
await this.clear();
await this.setText(value.toString());
await browser_js_1.Browser.pressTab();
}
async increase() {
return this.byClassName('input-group-append').click();
}
async decrease() {
return this.byClassName('input-group-prepend').click();
}
}
exports.Spinner = Spinner;