UNPKG

@angular/material

Version:
30 lines 3.45 kB
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("tslib"),require("@angular/cdk/testing")):"function"==typeof define&&define.amd?define("@angular/material/sidenav/testing",["exports","tslib","@angular/cdk/testing"],e):e(((t=t||self).ng=t.ng||{},t.ng.material=t.ng.material||{},t.ng.material.sidenav=t.ng.material.sidenav||{},t.ng.material.sidenav.testing={}),t.tslib,t.ng.cdk.testing)}(this,(function(t,e,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 r=function(t){function r(){return null!==t&&t.apply(this,arguments)||this}return e.__extends(r,t),r.with=function(t){var i=this;return void 0===t&&(t={}),new n.HarnessPredicate(r,t).addOption("position",t.position,(function(t,n){return e.__awaiter(i,void 0,void 0,(function(){return e.__generator(this,(function(e){switch(e.label){case 0:return[4,t.getPosition()];case 1:return[2,e.sent()===n]}}))}))}))},r.prototype.isOpen=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().hasClass("mat-drawer-opened")]}}))}))},r.prototype.getPosition=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().hasClass("mat-drawer-end")];case 2:return[2,t.sent()?"end":"start"]}}))}))},r.prototype.getMode=function(){return e.__awaiter(this,void 0,void 0,(function(){var t;return e.__generator(this,(function(e){switch(e.label){case 0:return[4,this.host()];case 1:return[4,(t=e.sent()).hasClass("mat-drawer-push")];case 2:return e.sent()?[2,"push"]:[4,t.hasClass("mat-drawer-side")];case 3:return e.sent()?[2,"side"]:[2,"over"]}}))}))},r.hostSelector=".mat-drawer",r}(n.ComponentHarness),i=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return e.__extends(i,t),i.with=function(t){var i=this;return void 0===t&&(t={}),new n.HarnessPredicate(r,t).addOption("position",t.position,(function(t,n){return e.__awaiter(i,void 0,void 0,(function(){return e.__generator(this,(function(e){switch(e.label){case 0:return[4,t.getPosition()];case 1:return[2,e.sent()===n]}}))}))}))},i.prototype.isFixedInViewport=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().hasClass("mat-sidenav-fixed")]}}))}))},i.hostSelector=".mat-sidenav",i}(r); /** * @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 */ /** * @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.MatDrawerHarness=r,t.MatSidenavHarness=i,Object.defineProperty(t,"__esModule",{value:!0})}));