1 | {"version":3,"file":"progress-spinner__testing.js","sources":["../../../../../../src/material/progress-spinner/testing/progress-spinner-harness.ts","../../../../../../src/material/progress-spinner/testing/progress-spinner-harness-filters.ts","../../../../../../src/material/progress-spinner/testing/public-api.ts","../../../../../../src/material/progress-spinner/testing/index.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {coerceNumberProperty} from '@angular/cdk/coercion';\nimport {ComponentHarness, HarnessPredicate} from '@angular/cdk/testing';\nimport {ProgressSpinnerMode} from '@angular/material/progress-spinner';\nimport {ProgressSpinnerHarnessFilters} from './progress-spinner-harness-filters';\n\n/** Harness for interacting with a standard mat-progress-spinner in tests. */\nexport class MatProgressSpinnerHarness extends ComponentHarness {\n /** The selector for the host element of a `MatProgressSpinner` instance. */\n static hostSelector = '.mat-progress-spinner';\n\n /**\n * Gets a `HarnessPredicate` that can be used to search for a `MatProgressSpinnerHarness` that\n * meets certain criteria.\n * @param options Options for filtering which progress spinner instances are considered a match.\n * @return a `HarnessPredicate` configured with the given options.\n */\n static with(options: ProgressSpinnerHarnessFilters = {}):\n HarnessPredicate<MatProgressSpinnerHarness> {\n return new HarnessPredicate(MatProgressSpinnerHarness, options);\n }\n\n /** Gets the progress spinner's value. */\n async getValue(): Promise<number|null> {\n const host = await this.host();\n const ariaValue = await host.getAttribute('aria-valuenow');\n return ariaValue ? coerceNumberProperty(ariaValue) : null;\n }\n\n /** Gets the progress spinner's mode. */\n async getMode(): Promise<ProgressSpinnerMode> {\n const modeAttr = (await this.host()).getAttribute('mode');\n return await modeAttr as ProgressSpinnerMode;\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {BaseHarnessFilters} from '@angular/cdk/testing';\n\n/** A set of criteria that can be used to filter a list of `MatProgressSpinnerHarness` instances. */\nexport interface ProgressSpinnerHarnessFilters extends BaseHarnessFilters {}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport * from './progress-spinner-harness';\nexport * from './progress-spinner-harness-filters';\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;AAAA;;;;;;;AAaA;MACa,yBAA0B,SAAQ,gBAAgB;;;;;;;IAU7D,OAAO,IAAI,CAAC,UAAyC,EAAE;QAErD,OAAO,IAAI,gBAAgB,CAAC,yBAAyB,EAAE,OAAO,CAAC,CAAC;KACjE;;IAGK,QAAQ;;YACZ,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,IAAI,EAAE,CAAC;YAC/B,MAAM,SAAS,GAAG,MAAM,IAAI,CAAC,YAAY,CAAC,eAAe,CAAC,CAAC;YAC3D,OAAO,SAAS,GAAG,oBAAoB,CAAC,SAAS,CAAC,GAAG,IAAI,CAAC;SAC3D;KAAA;;IAGK,OAAO;;YACX,MAAM,QAAQ,GAAG,CAAC,MAAM,IAAI,CAAC,IAAI,EAAE,EAAE,YAAY,CAAC,MAAM,CAAC,CAAC;YAC1D,OAAO,MAAM,QAA+B,CAAC;SAC9C;KAAA;;AAzBD;AACO,sCAAY,GAAG,uBAAuB;;AChB/C;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;;;"} |
---|