UNPKG

@angular/material

Version:
1 lines 3.6 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).addOption(\n 'value',\n options.value,\n (harness, value) => HarnessPredicate.stringMatches(harness.getValue(), value),\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":";;;;AAAA;;;;;;AAMG;AAYH;;;;AAIG;AACG,MAAO,4BAA6B,SAAQ,2BAOjD,CAAA;AAPD,IAAA,WAAA,GAAA;;QAQY,IAAO,CAAA,OAAA,GAAG,KAAK,CAAC;QAChB,IAAY,CAAA,YAAA,GAAG,sBAAsB,CAAC;QACtC,IAAiB,CAAA,iBAAA,GAAG,wBAAwB,CAAC;KAoBxD;AAfC;;;;;AAKG;AACH,IAAA,OAAO,IAAI,CACT,OAAA,GAA4C,EAAE,EAAA;AAE9C,QAAA,OAAO,IAAI,gBAAgB,CAAC,4BAA4B,EAAE,OAAO,CAAC,CAAC,SAAS,CAC1E,OAAO,EACP,OAAO,CAAC,KAAK,EACb,CAAC,OAAO,EAAE,KAAK,KAAK,gBAAgB,CAAC,aAAa,CAAC,OAAO,CAAC,QAAQ,EAAE,EAAE,KAAK,CAAC,CAC9E,CAAC;KACH;;AAjBD;AACO,4BAAY,CAAA,YAAA,GAAG,2BAA2B;;ACpCnD;;;;;;AAMG;;ACNH;;;;;;AAMG;;;;"}