/** * @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 */ import { HarnessPredicate } from '@angular/cdk/testing'; import { _MatSelectHarnessBase } from '@angular/material/select/testing'; import { MatLegacyOptionHarness, MatLegacyOptgroupHarness, } from '@angular/material/legacy-core/testing'; /** * Harness for interacting with a standard mat-select in tests. * @deprecated Use `MatSelectHarness` from `@angular/material/select/testing` instead. See https://material.angular.io/guide/mdc-migration for information about migrating. * @breaking-change 17.0.0 */ export class MatLegacySelectHarness extends _MatSelectHarnessBase { constructor() { super(...arguments); this._prefix = 'mat'; this._optionClass = MatLegacyOptionHarness; this._optionGroupClass = MatLegacyOptgroupHarness; } static { this.hostSelector = '.mat-select'; } /** * Gets a `HarnessPredicate` that can be used to search for a `MatSelectHarness` that meets * certain criteria. * @param options Options for filtering which select instances are considered a match. * @return a `HarnessPredicate` configured with the given options. */ static with(options = {}) { return new HarnessPredicate(MatLegacySelectHarness, options).addOption('disabled', options.disabled, async (harness, disabled) => { return (await harness.isDisabled()) === disabled; }); } } //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2VsZWN0LWhhcm5lc3MuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9zcmMvbWF0ZXJpYWwvbGVnYWN5LXNlbGVjdC90ZXN0aW5nL3NlbGVjdC1oYXJuZXNzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOzs7Ozs7R0FNRztBQUVILE9BQU8sRUFBQyxnQkFBZ0IsRUFBQyxNQUFNLHNCQUFzQixDQUFDO0FBQ3RELE9BQU8sRUFBQyxxQkFBcUIsRUFBQyxNQUFNLGtDQUFrQyxDQUFDO0FBQ3ZFLE9BQU8sRUFDTCxzQkFBc0IsRUFDdEIsd0JBQXdCLEdBR3pCLE1BQU0sdUNBQXVDLENBQUM7QUFHL0M7Ozs7R0F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