| !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@angular/cdk/testing")):"function"==typeof define&&define.amd?define("@angular/material/core/testing",["exports","@angular/cdk/testing"],e):e(((t=t||self).ng=t.ng||{},t.ng.material=t.ng.material||{},t.ng.material.core=t.ng.material.core||{},t.ng.material.core.testing={}),t.ng.cdk.testing)}(this,(function(t,e){"use strict"; |
| ***************************************************************************** */var n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)};function r(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}function o(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{u(r.next(t))}catch(t){i(t)}}function a(t){try{u(r.throw(t))}catch(t){i(t)}}function u(t){t.done?o(t.value):function e(t){return t instanceof n?t:new n((function(e){e(t)}))}(t.value).then(s,a)}u((r=r.apply(t,e||[])).next())}))}function i(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function u(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!((o=(o=s.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}}function s(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,o,i=n.call(t),s=[];try{for(;(void 0===e||e-- >0)&&!(r=i.next()).done;)s.push(r.value)}catch(t){o={error:t}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return s}function a(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(s(arguments[e]));return t}var u=function(t){function n(){var e=t.apply(this,a(arguments))||this;return e._text=e.locatorFor(".mat-option-text"),e}return r(n,t),n.with=function(t){var r=this;return void 0===t&&(t={}),new e.HarnessPredicate(n,t).addOption("text",t.text,(function(t,n){return o(r,void 0,void 0,(function(){var r,o;return i(this,(function(i){switch(i.label){case 0:return o=(r=e.HarnessPredicate).stringMatches,[4,t.getText()];case 1:return[2,o.apply(r,[i.sent(),n])]}}))}))})).addOption("isSelected",t.isSelected,(function(t,e){return o(r,void 0,void 0,(function(){return i(this,(function(n){switch(n.label){case 0:return[4,t.isSelected()];case 1:return[2,n.sent()===e]}}))}))}))},n.prototype.click=function(){return o(this,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.host()];case 1:return[2,t.sent().click()]}}))}))},n.prototype.getText=function(){return o(this,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this._text()];case 1:return[2,t.sent().text()]}}))}))},n.prototype.isDisabled=function(){return o(this,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.host()];case 1:return[2,t.sent().hasClass("mat-option-disabled")]}}))}))},n.prototype.isSelected=function(){return o(this,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.host()];case 1:return[2,t.sent().hasClass("mat-selected")]}}))}))},n.prototype.isActive=function(){return o(this,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.host()];case 1:return[2,t.sent().hasClass("mat-active")]}}))}))},n.prototype.isMultiple=function(){return o(this,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.host()];case 1:return[2,t.sent().hasClass("mat-option-multiple")]}}))}))},n}(e.ComponentHarness);u.hostSelector=".mat-option";var c=function(t){function n(){var e=t.apply(this,a(arguments))||this;return e._label=e.locatorFor(".mat-optgroup-label"),e}return r(n,t),n.with=function(t){var r=this;return void 0===t&&(t={}),new e.HarnessPredicate(n,t).addOption("labelText",t.labelText,(function(t,n){return o(r,void 0,void 0,(function(){var r,o;return i(this,(function(i){switch(i.label){case 0:return o=(r=e.HarnessPredicate).stringMatches,[4,t.getLabelText()];case 1:return[2,o.apply(r,[i.sent(),n])]}}))}))}))},n.prototype.getLabelText=function(){return o(this,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this._label()];case 1:return[2,t.sent().text()]}}))}))},n.prototype.isDisabled=function(){return o(this,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.host()];case 1:return[2,t.sent().hasClass("mat-optgroup-disabled")]}}))}))},n.prototype.getOptions=function(t){return void 0===t&&(t={}),o(this,void 0,void 0,(function(){return i(this,(function(e){return[2,this.locatorForAll(u.with(t))()]}))}))},n}(e.ComponentHarness);c.hostSelector=".mat-optgroup", |