@o3r/testing
Version:
The module provides testing (e2e, unit test) utilities to help you build your own E2E pipeline integrating visual testing.
30 lines • 1.26 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.MatAutocomplete = void 0;
var tslib_1 = require("tslib");
var element_1 = require("../element");
/**
* Implementation dedicated to angular / TestBed.
*/
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 () {
return tslib_1.__generator(this, function (_a) {
switch (_a.label) {
case 0: return [4 /*yield*/, this.setValue(value)];
case 1:
_a.sent();
return [2 /*return*/, this.sourceElement.triggerEventHandler('change', { target: this.sourceElement.nativeElement, preventDefault: function () { }, stopPropagation: function () { } })];
}
});
});
};
return MatAutocomplete;
}(element_1.O3rElement));
exports.MatAutocomplete = MatAutocomplete;
//# sourceMappingURL=autocomplete-material.js.map