UNPKG

@o3r/testing

Version:

The module provides testing (e2e, unit test) utilities to help you build your own E2E pipeline integrating visual testing.

37 lines 1.51 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.MatAutocomplete = void 0; var tslib_1 = require("tslib"); var protractor_1 = require("protractor"); var element_1 = require("../element"); /** * Implementation dedicated to Protractor. * @deprecated Will be removed in v13, please use Playwright instead */ var MatAutocomplete = /** @class */ (function (_super) { tslib_1.__extends(MatAutocomplete, _super); function MatAutocomplete(sourceElement) { return _super.call(this, sourceElement) || this; } /** @inheritdoc */ MatAutocomplete.prototype.selectByValue = function (value, _timeout) { return tslib_1.__awaiter(this, void 0, void 0, function () { var matOption; return tslib_1.__generator(this, function (_a) { switch (_a.label) { case 0: return [4 /*yield*/, this.setValue(value)]; case 1: _a.sent(); return [4 /*yield*/, this.click()]; case 2: _a.sent(); matOption = (0, protractor_1.element)(protractor_1.By.css('.mat-option, mat-option')); return [2 /*return*/, new element_1.O3rElement(matOption).click()]; } }); }); }; return MatAutocomplete; }(element_1.O3rElement)); exports.MatAutocomplete = MatAutocomplete; //# sourceMappingURL=autocomplete-material.js.map