!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("tslib"),require("@angular/cdk/testing"),require("@angular/material/select/testing"),require("@angular/cdk/coercion")):"function"==typeof define&&define.amd?define("@angular/material/paginator/testing",["exports","tslib","@angular/cdk/testing","@angular/material/select/testing","@angular/cdk/coercion"],e):e(((t=t||self).ng=t.ng||{},t.ng.material=t.ng.material||{},t.ng.material.paginator=t.ng.material.paginator||{},t.ng.material.paginator.testing={}),t.tslib,t.ng.cdk.testing,t.ng.material.select.testing,t.ng.cdk.coercion)}(this,(function(t,e,n,r,a){"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 i(){var e=null!==t&&t.apply(this,arguments)||this;return e._nextButton=e.locatorFor(".mat-paginator-navigation-next"),e._previousButton=e.locatorFor(".mat-paginator-navigation-previous"),e._firstPageButton=e.locatorForOptional(".mat-paginator-navigation-first"),e._lastPageButton=e.locatorForOptional(".mat-paginator-navigation-last"),e._select=e.locatorForOptional(r.MatSelectHarness.with({ancestor:".mat-paginator-page-size"})),e._pageSizeFallback=e.locatorFor(".mat-paginator-page-size-value"),e._rangeLabel=e.locatorFor(".mat-paginator-range-label"),e}return e.__extends(i,t),i.with=function(t){return void 0===t&&(t={}),new n.HarnessPredicate(i,t)},i.prototype.goToNextPage=function(){return e.__awaiter(this,void 0,void 0,(function(){return e.__generator(this,(function(t){switch(t.label){case 0:return[4,this._nextButton()];case 1:return[2,t.sent().click()]}}))}))},i.prototype.goToPreviousPage=function(){return e.__awaiter(this,void 0,void 0,(function(){return e.__generator(this,(function(t){switch(t.label){case 0:return[4,this._previousButton()];case 1:return[2,t.sent().click()]}}))}))},i.prototype.goToFirstPage=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._firstPageButton()];case 1:if(!(t=e.sent()))throw Error("Could not find first page button inside paginator. Make sure that `showFirstLastButtons` is enabled.");return[2,t.click()]}}))}))},i.prototype.goToLastPage=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._lastPageButton()];case 1:if(!(t=e.sent()))throw Error("Could not find last page button inside paginator. Make sure that `showFirstLastButtons` is enabled.");return[2,t.click()]}}))}))},i.prototype.setPageSize=function(t){return e.__awaiter(this,void 0,void 0,(function(){var n;return e.__generator(this,(function(e){switch(e.label){case 0:return[4,this._select()];case 1:if(!(n=e.sent()))throw Error("Cannot find page size selector in paginator. Make sure that the `pageSizeOptions` have been configured.");return[2,n.clickOptions({text:""+t})]}}))}))},i.prototype.getPageSize=function(){return e.__awaiter(this,void 0,void 0,(function(){var t,n,r;return e.__generator(this,(function(e){switch(e.label){case 0:return[4,this._select()];case 1:return(t=e.sent())?(n=t.getValueText(),[3,4]):[3,2];case 2:return[4,this._pageSizeFallback()];case 3:n=e.sent().text(),e.label=4;case 4:return r=a.coerceNumberProperty,[4,n];case 5:return[2,r.apply(void 0,[e.sent()])]}}))}))},i.prototype.getRangeLabel=function(){return e.__awaiter(this,void 0,void 0,(function(){return e.__generator(this,(function(t){switch(t.label){case 0:return[4,this._rangeLabel()];case 1:return[2,t.sent().text()]}}))}))},i.hostSelector=".mat-paginator",i}(n.ComponentHarness); /** * @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.MatPaginatorHarness=i,Object.defineProperty(t,"__esModule",{value:!0})}));