UNPKG

@angular/material

Version:
1 lines 3.95 kB
{"version":3,"file":"testing.mjs","sources":["../../../../../../../src/material/legacy-autocomplete/testing/autocomplete-harness.ts","../../../../../../../src/material/legacy-autocomplete/testing/public-api.ts","../../../../../../../src/material/legacy-autocomplete/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 {HarnessPredicate} from '@angular/cdk/testing';\nimport {\n MatLegacyOptgroupHarness,\n MatLegacyOptionHarness,\n LegacyOptgroupHarnessFilters,\n LegacyOptionHarnessFilters,\n} from '@angular/material/legacy-core/testing';\nimport {_MatAutocompleteHarnessBase} from '@angular/material/autocomplete/testing';\nimport {LegacyAutocompleteHarnessFilters} from './autocomplete-harness-filters';\n\n/**\n * Harness for interacting with a standard mat-autocomplete in tests.\n * @deprecated Use `MatAutocompleteHarness` from `@angular/material/autocomplete/testing` instead. See https://material.angular.io/guide/mdc-migration for information about migrating.\n * @breaking-change 17.0.0\n */\nexport class MatLegacyAutocompleteHarness extends _MatAutocompleteHarnessBase<\n typeof MatLegacyOptionHarness,\n MatLegacyOptionHarness,\n LegacyOptionHarnessFilters,\n typeof MatLegacyOptgroupHarness,\n MatLegacyOptgroupHarness,\n LegacyOptgroupHarnessFilters\n> {\n protected _prefix = 'mat';\n protected _optionClass = MatLegacyOptionHarness;\n protected _optionGroupClass = MatLegacyOptgroupHarness;\n\n /** The selector for the host element of a `MatAutocomplete` instance. */\n static hostSelector = '.mat-autocomplete-trigger';\n\n /**\n * Gets a `HarnessPredicate` that can be used to search for a `MatAutocompleteHarness` that meets\n * certain criteria.\n * @param options Options for filtering which autocomplete instances are considered a match.\n * @return a `HarnessPredicate` configured with the given options.\n */\n static with(\n options: LegacyAutocompleteHarnessFilters = {},\n ): HarnessPredicate<MatLegacyAutocompleteHarness> {\n return new HarnessPredicate(MatLegacyAutocompleteHarness, options)\n .addOption('value', options.value, (harness, value) =>\n HarnessPredicate.stringMatches(harness.getValue(), value),\n )\n .addOption('disabled', options.disabled, async (harness, disabled) => {\n return (await harness.isDisabled()) === disabled;\n });\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 {MatLegacyAutocompleteHarness} from './autocomplete-harness';\nexport {LegacyAutocompleteHarnessFilters} from './autocomplete-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":";;;;;AAkBA;;;;AAIG;AACG,MAAO,4BAA6B,SAAQ,2BAOjD,CAAA;AAPD,IAAA,WAAA,GAAA;;AAQY,QAAA,IAAO,CAAA,OAAA,GAAG,KAAK,CAAC;AAChB,QAAA,IAAY,CAAA,YAAA,GAAG,sBAAsB,CAAC;AACtC,QAAA,IAAiB,CAAA,iBAAA,GAAG,wBAAwB,CAAC;KAsBxD;AAjBC;;;;;AAKG;AACH,IAAA,OAAO,IAAI,CACT,OAAA,GAA4C,EAAE,EAAA;AAE9C,QAAA,OAAO,IAAI,gBAAgB,CAAC,4BAA4B,EAAE,OAAO,CAAC;aAC/D,SAAS,CAAC,OAAO,EAAE,OAAO,CAAC,KAAK,EAAE,CAAC,OAAO,EAAE,KAAK,KAChD,gBAAgB,CAAC,aAAa,CAAC,OAAO,CAAC,QAAQ,EAAE,EAAE,KAAK,CAAC,CAC1D;AACA,aAAA,SAAS,CAAC,UAAU,EAAE,OAAO,CAAC,QAAQ,EAAE,CAAO,OAAO,EAAE,QAAQ,KAAI,SAAA,CAAA,IAAA,EAAA,KAAA,CAAA,EAAA,KAAA,CAAA,EAAA,aAAA;YACnE,OAAO,CAAC,MAAM,OAAO,CAAC,UAAU,EAAE,MAAM,QAAQ,CAAC;SAClD,CAAA,CAAC,CAAC;KACN;;AAnBD;AACO,4BAAY,CAAA,YAAA,GAAG,2BAA2B;;ACpCnD;;;;;;AAMG;;ACNH;;;;;;AAMG;;;;"}