{"version":3,"file":"testing.mjs","sources":["../../../../../../../src/material/legacy-progress-bar/testing/progress-bar-harness.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 {ProgressBarHarnessFilters} from '@angular/material/progress-bar/testing';\n\n/**\n * Harness for interacting with a standard mat-progress-bar in tests.\n * @deprecated Use `MatProgressBarHarness` from `@angular/material/progress-bar/testing` instead. See https://material.angular.io/guide/mdc-migration for information about migrating.\n * @breaking-change 17.0.0\n */\nexport class MatLegacyProgressBarHarness extends ComponentHarness {\n /** The selector for the host element of a `MatProgressBar` instance. */\n static hostSelector = '.mat-progress-bar';\n\n /**\n * Gets a `HarnessPredicate` that can be used to search for a `MatProgressBarHarness` that meets\n * certain criteria.\n * @param options Options for filtering which progress bar instances are considered a match.\n * @return a `HarnessPredicate` configured with the given options.\n */\n static with(\n options: ProgressBarHarnessFilters = {},\n ): HarnessPredicate {\n return new HarnessPredicate(MatLegacyProgressBarHarness, options);\n }\n\n /** Gets the progress bar's value. */\n async getValue(): Promise {\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 bar's mode. */\n async getMode(): Promise {\n return (await this.host()).getAttribute('mode');\n }\n}\n"],"names":[],"mappings":";;;AAYA;;;;AAIG;AACG,MAAO,2BAA4B,SAAQ,gBAAgB,CAAA;;aAExD,IAAY,CAAA,YAAA,GAAG,mBAAmB,CAAC,EAAA;AAE1C;;;;;AAKG;AACH,IAAA,OAAO,IAAI,CACT,OAAA,GAAqC,EAAE,EAAA;AAEvC,QAAA,OAAO,IAAI,gBAAgB,CAAC,2BAA2B,EAAE,OAAO,CAAC,CAAC;KACnE;;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,OAAO,CAAC,MAAM,IAAI,CAAC,IAAI,EAAE,EAAE,YAAY,CAAC,MAAM,CAAC,CAAC;KACjD;;;;;"}