source: trip-planner-front/node_modules/@angular/material/fesm2015/sort/testing.js.map@ 8d391a1

Last change on this file since 8d391a1 was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 6.3 KB
Line 
1{"version":3,"file":"sort__testing.js","sources":["../../../../../../src/material/sort/testing/sort-header-harness.ts","../../../../../../src/material/sort/testing/sort-harness.ts","../../../../../../src/material/sort/testing/public-api.ts","../../../../../../src/material/sort/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 {ComponentHarness, HarnessPredicate} from '@angular/cdk/testing';\nimport {SortDirection} from '@angular/material/sort';\nimport {SortHeaderHarnessFilters} from './sort-harness-filters';\n\n/** Harness for interacting with a standard Angular Material sort header in tests. */\nexport class MatSortHeaderHarness extends ComponentHarness {\n static hostSelector = '.mat-sort-header';\n private _container = this.locatorFor('.mat-sort-header-container');\n\n /**\n * Gets a `HarnessPredicate` that can be used to\n * search for a sort header with specific attributes.\n */\n static with(options: SortHeaderHarnessFilters = {}): HarnessPredicate<MatSortHeaderHarness> {\n return new HarnessPredicate(MatSortHeaderHarness, options)\n .addOption('label', options.label,\n (harness, label) => HarnessPredicate.stringMatches(harness.getLabel(), label))\n .addOption('sortDirection', options.sortDirection, (harness, sortDirection) => {\n return HarnessPredicate.stringMatches(harness.getSortDirection(), sortDirection);\n });\n }\n\n /** Gets the label of the sort header. */\n async getLabel(): Promise<string> {\n return (await this._container()).text();\n }\n\n /** Gets the sorting direction of the header. */\n async getSortDirection(): Promise<SortDirection> {\n const host = await this.host();\n const ariaSort = await host.getAttribute('aria-sort');\n\n if (ariaSort === 'ascending') {\n return 'asc';\n } else if (ariaSort === 'descending') {\n return 'desc';\n }\n\n return '';\n }\n\n /** Gets whether the sort header is currently being sorted by. */\n async isActive(): Promise<boolean> {\n return !!(await this.getSortDirection());\n }\n\n /** Whether the sort header is disabled. */\n async isDisabled(): Promise<boolean> {\n return (await this.host()).hasClass('mat-sort-header-disabled');\n }\n\n /** Clicks the header to change its sorting direction. Only works if the header is enabled. */\n async click(): Promise<void> {\n return (await this.host()).click();\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\nimport {ComponentHarness, HarnessPredicate} from '@angular/cdk/testing';\nimport {SortHarnessFilters, SortHeaderHarnessFilters} from './sort-harness-filters';\nimport {MatSortHeaderHarness} from './sort-header-harness';\n\n/** Harness for interacting with a standard `mat-sort` in tests. */\nexport class MatSortHarness extends ComponentHarness {\n static hostSelector = '.mat-sort';\n\n /**\n * Gets a `HarnessPredicate` that can be used to search for a `mat-sort` with specific attributes.\n * @param options Options for narrowing the search.\n * @return a `HarnessPredicate` configured with the given options.\n */\n static with(options: SortHarnessFilters = {}): HarnessPredicate<MatSortHarness> {\n return new HarnessPredicate(MatSortHarness, options);\n }\n\n /** Gets all of the sort headers in the `mat-sort`. */\n async getSortHeaders(filter: SortHeaderHarnessFilters = {}): Promise<MatSortHeaderHarness[]> {\n return this.locatorForAll(MatSortHeaderHarness.with(filter))();\n }\n\n /** Gets the selected header in the `mat-sort`. */\n async getActiveHeader(): Promise<MatSortHeaderHarness|null> {\n const headers = await this.getSortHeaders();\n for (let i = 0; i < headers.length; i++) {\n if (await headers[i].isActive()) {\n return headers[i];\n }\n }\n return null;\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 * from './sort-harness';\nexport * from './sort-header-harness';\nexport * from './sort-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;;;;;;;AAYA;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