@angular/material
Version:
Angular Material
1 lines • 3.69 kB
Source Map (JSON)
{"version":3,"file":"testing.mjs","sources":["../../../../../../../src/material/legacy-progress-spinner/testing/progress-spinner-harness.ts","../../../../../../../src/material/legacy-progress-spinner/testing/public-api.ts","../../../../../../../src/material/legacy-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 {LegacyProgressSpinnerMode} from '@angular/material/legacy-progress-spinner';\nimport {ProgressSpinnerHarnessFilters} from '@angular/material/progress-spinner/testing';\n\n/**\n * Harness for interacting with a standard mat-progress-spinner in tests.\n * @deprecated Use `MatProgressSpinnerHarness` from `@angular/material/progress-spinner/testing` instead. See https://material.angular.io/guide/mdc-migration for information about migrating.\n * @breaking-change 17.0.0\n */\nexport class MatLegacyProgressSpinnerHarness extends ComponentHarness {\n /** The selector for the host element of a Progress Spinner 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(\n options: ProgressSpinnerHarnessFilters = {},\n ): HarnessPredicate<MatLegacyProgressSpinnerHarness> {\n return new HarnessPredicate(MatLegacyProgressSpinnerHarness, 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<LegacyProgressSpinnerMode> {\n const modeAttr = (await this.host()).getAttribute('mode');\n return (await modeAttr) as LegacyProgressSpinnerMode;\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\nexport {MatLegacyProgressSpinnerHarness} from './progress-spinner-harness';\nexport {ProgressSpinnerHarnessFilters as LegacyProgressSpinnerHarnessFilters} from '@angular/material/progress-spinner/testing';\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;;;;;;AAMG;AAOH;;;;AAIG;AACG,MAAO,+BAAgC,SAAQ,gBAAgB,CAAA;AAInE;;;;;AAKG;AACH,IAAA,OAAO,IAAI,CACT,OAAA,GAAyC,EAAE,EAAA;AAE3C,QAAA,OAAO,IAAI,gBAAgB,CAAC,+BAA+B,EAAE,OAAO,CAAC,CAAC;KACvE;;AAGD,IAAA,MAAM,QAAQ,GAAA;AACZ,QAAA,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,IAAI,EAAE,CAAC;QAC/B,MAAM,SAAS,GAAG,MAAM,IAAI,CAAC,YAAY,CAAC,eAAe,CAAC,CAAC;AAC3D,QAAA,OAAO,SAAS,GAAG,oBAAoB,CAAC,SAAS,CAAC,GAAG,IAAI,CAAC;KAC3D;;AAGD,IAAA,MAAM,OAAO,GAAA;AACX,QAAA,MAAM,QAAQ,GAAG,CAAC,MAAM,IAAI,CAAC,IAAI,EAAE,EAAE,YAAY,CAAC,MAAM,CAAC,CAAC;AAC1D,QAAA,QAAQ,MAAM,QAAQ,EAA+B;KACtD;;AA1BD;AACO,+BAAY,CAAA,YAAA,GAAG,uBAAuB;;ACpB/C;;;;;;AAMG;;ACNH;;;;;;AAMG;;;;"}