UNPKG

systelab-components-test

Version:

Widgets to be use in the E2E Tests based in Protractor

30 lines (29 loc) 1.13 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var tslib_1 = require("tslib"); var protractor_1 = require("protractor"); var button_1 = require("./button"); var widget_1 = require("./widget"); var Popup = /** @class */ (function (_super) { tslib_1.__extends(Popup, _super); function Popup() { return _super !== null && _super.apply(this, arguments) || this; } Popup.prototype.getText = function () { return tslib_1.__awaiter(this, void 0, void 0, function () { return tslib_1.__generator(this, function (_a) { switch (_a.label) { case 0: return [4 /*yield*/, this.elem.getText()]; case 1: return [2 /*return*/, _a.sent()]; } }); }); }; Popup.prototype.getButton = function (text) { return new button_1.Button(this.elem .element(protractor_1.by.tagName('systelab-dialog-bottom')) .element(protractor_1.by.buttonText(text))); }; return Popup; }(widget_1.Widget)); exports.Popup = Popup;