@angular/material
Version:
Angular Material
22 lines • 4.72 kB
JavaScript
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("tslib"),require("@angular/cdk/testing"),require("@angular/material/form-field/testing/control")):"function"==typeof define&&define.amd?define("@angular/material/input/testing",["exports","tslib","@angular/cdk/testing","@angular/material/form-field/testing/control"],e):e(((t=t||self).ng=t.ng||{},t.ng.material=t.ng.material||{},t.ng.material.input=t.ng.material.input||{},t.ng.material.input.testing={}),t.tslib,t.ng.cdk.testing,t.ng.material.formField.testing.control)}(this,(function(t,e,r,n){"use strict";
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/var i=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return e.__extends(n,t),n.with=function(t){var i=this;return void 0===t&&(t={}),new r.HarnessPredicate(n,t).addOption("value",t.value,(function(t,r){return e.__awaiter(i,void 0,void 0,(function(){return e.__generator(this,(function(e){switch(e.label){case 0:return[4,t.getValue()];case 1:return[2,e.sent()===r]}}))}))})).addOption("placeholder",t.placeholder,(function(t,r){return e.__awaiter(i,void 0,void 0,(function(){return e.__generator(this,(function(e){switch(e.label){case 0:return[4,t.getPlaceholder()];case 1:return[2,e.sent()===r]}}))}))}))},n.prototype.isDisabled=function(){return e.__awaiter(this,void 0,void 0,(function(){return e.__generator(this,(function(t){switch(t.label){case 0:return[4,this.host()];case 1:return[2,t.sent().getProperty("disabled")]}}))}))},n.prototype.isRequired=function(){return e.__awaiter(this,void 0,void 0,(function(){return e.__generator(this,(function(t){switch(t.label){case 0:return[4,this.host()];case 1:return[2,t.sent().getProperty("required")]}}))}))},n.prototype.isReadonly=function(){return e.__awaiter(this,void 0,void 0,(function(){return e.__generator(this,(function(t){switch(t.label){case 0:return[4,this.host()];case 1:return[2,t.sent().getProperty("readOnly")]}}))}))},n.prototype.getValue=function(){return e.__awaiter(this,void 0,void 0,(function(){return e.__generator(this,(function(t){switch(t.label){case 0:return[4,this.host()];case 1:return[4,t.sent().getProperty("value")];case 2:return[2,t.sent()]}}))}))},n.prototype.getName=function(){return e.__awaiter(this,void 0,void 0,(function(){return e.__generator(this,(function(t){switch(t.label){case 0:return[4,this.host()];case 1:return[4,t.sent().getProperty("name")];case 2:return[2,t.sent()]}}))}))},n.prototype.getType=function(){return e.__awaiter(this,void 0,void 0,(function(){return e.__generator(this,(function(t){switch(t.label){case 0:return[4,this.host()];case 1:return[4,t.sent().getProperty("type")];case 2:return[2,t.sent()]}}))}))},n.prototype.getPlaceholder=function(){return e.__awaiter(this,void 0,void 0,(function(){return e.__generator(this,(function(t){switch(t.label){case 0:return[4,this.host()];case 1:return[4,t.sent().getProperty("placeholder")];case 2:return[2,t.sent()]}}))}))},n.prototype.getId=function(){return e.__awaiter(this,void 0,void 0,(function(){return e.__generator(this,(function(t){switch(t.label){case 0:return[4,this.host()];case 1:return[4,t.sent().getProperty("id")];case 2:return[2,t.sent()]}}))}))},n.prototype.focus=function(){return e.__awaiter(this,void 0,void 0,(function(){return e.__generator(this,(function(t){switch(t.label){case 0:return[4,this.host()];case 1:return[2,t.sent().focus()]}}))}))},n.prototype.blur=function(){return e.__awaiter(this,void 0,void 0,(function(){return e.__generator(this,(function(t){switch(t.label){case 0:return[4,this.host()];case 1:return[2,t.sent().blur()]}}))}))},n.prototype.setValue=function(t){return e.__awaiter(this,void 0,void 0,(function(){var r;return e.__generator(this,(function(e){switch(e.label){case 0:return[4,this.host()];case 1:return[4,(r=e.sent()).clear()];case 2:return e.sent(),t?[4,r.sendKeys(t)]:[3,4];case 3:e.sent(),e.label=4;case 4:return[2]}}))}))},n.hostSelector="[matInput], input[matNativeControl], textarea[matNativeControl]",n}(n.MatFormFieldControlHarness);
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/t.MatInputHarness=i,Object.defineProperty(t,"__esModule",{value:!0})}));