source: trip-planner-front/node_modules/@angular/material/fesm2015/expansion/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: 11.6 KB
Line 
1{"version":3,"file":"expansion__testing.js","sources":["../../../../../../src/material/expansion/testing/expansion-harness.ts","../../../../../../src/material/expansion/testing/accordion-harness.ts","../../../../../../src/material/expansion/testing/expansion-harness-filters.ts","../../../../../../src/material/expansion/testing/public-api.ts","../../../../../../src/material/expansion/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 {\n ContentContainerComponentHarness,\n HarnessLoader,\n HarnessPredicate,\n} from '@angular/cdk/testing';\nimport {ExpansionPanelHarnessFilters} from './expansion-harness-filters';\n\n/** Selectors for the various `mat-expansion-panel` sections that may contain user content. */\nexport const enum MatExpansionPanelSection {\n HEADER = '.mat-expansion-panel-header',\n TITLE = '.mat-expansion-panel-header-title',\n DESCRIPTION = '.mat-expansion-panel-header-description',\n CONTENT = '.mat-expansion-panel-content'\n}\n\n/** Harness for interacting with a standard mat-expansion-panel in tests. */\nexport class MatExpansionPanelHarness extends\n ContentContainerComponentHarness<MatExpansionPanelSection> {\n static hostSelector = '.mat-expansion-panel';\n\n private _header = this.locatorFor(MatExpansionPanelSection.HEADER);\n private _title = this.locatorForOptional(MatExpansionPanelSection.TITLE);\n private _description = this.locatorForOptional(MatExpansionPanelSection.DESCRIPTION);\n private _expansionIndicator = this.locatorForOptional('.mat-expansion-indicator');\n private _content = this.locatorFor(MatExpansionPanelSection.CONTENT);\n\n /**\n * Gets a `HarnessPredicate` that can be used to search for an expansion-panel\n * with specific attributes.\n * @param options Options for narrowing the search:\n * - `title` finds an expansion-panel with a specific title text.\n * - `description` finds an expansion-panel with a specific description text.\n * - `expanded` finds an expansion-panel that is currently expanded.\n * - `disabled` finds an expansion-panel that is disabled.\n * @return a `HarnessPredicate` configured with the given options.\n */\n static with(options: ExpansionPanelHarnessFilters = {}):\n HarnessPredicate<MatExpansionPanelHarness> {\n return new HarnessPredicate(MatExpansionPanelHarness, options)\n .addOption(\n 'title', options.title,\n (harness, title) => HarnessPredicate.stringMatches(harness.getTitle(), title))\n .addOption(\n 'description', options.description,\n (harness, description) =>\n HarnessPredicate.stringMatches(harness.getDescription(), description))\n .addOption(\n 'content', options.content,\n (harness, content) => HarnessPredicate.stringMatches(harness.getTextContent(), content))\n .addOption(\n 'expanded', options.expanded,\n async (harness, expanded) => (await harness.isExpanded()) === expanded)\n .addOption(\n 'disabled', options.disabled,\n async (harness, disabled) => (await harness.isDisabled()) === disabled);\n }\n\n /** Whether the panel is expanded. */\n async isExpanded(): Promise<boolean> {\n return (await this.host()).hasClass('mat-expanded');\n }\n\n /**\n * Gets the title text of the panel.\n * @returns Title text or `null` if no title is set up.\n */\n async getTitle(): Promise<string|null> {\n const titleEl = await this._title();\n return titleEl ? titleEl.text() : null;\n }\n\n /**\n * Gets the description text of the panel.\n * @returns Description text or `null` if no description is set up.\n */\n async getDescription(): Promise<string|null> {\n const descriptionEl = await this._description();\n return descriptionEl ? descriptionEl.text() : null;\n }\n\n /** Whether the panel is disabled. */\n async isDisabled(): Promise<boolean> {\n return await (await this._header()).getAttribute('aria-disabled') === 'true';\n }\n\n /**\n * Toggles the expanded state of the panel by clicking on the panel\n * header. This method will not work if the panel is disabled.\n */\n async toggle(): Promise<void> {\n await (await this._header()).click();\n }\n\n /** Expands the expansion panel if collapsed. */\n async expand(): Promise<void> {\n if (!await this.isExpanded()) {\n await this.toggle();\n }\n }\n\n /** Collapses the expansion panel if expanded. */\n async collapse(): Promise<void> {\n if (await this.isExpanded()) {\n await this.toggle();\n }\n }\n\n /** Gets the text content of the panel. */\n async getTextContent(): Promise<string> {\n return (await this._content()).text();\n }\n\n /**\n * Gets a `HarnessLoader` that can be used to load harnesses for\n * components within the panel's content area.\n * @deprecated Use either `getChildLoader(MatExpansionPanelSection.CONTENT)`, `getHarness` or\n * `getAllHarnesses` instead.\n * @breaking-change 12.0.0\n */\n async getHarnessLoaderForContent(): Promise<HarnessLoader> {\n return this.getChildLoader(MatExpansionPanelSection.CONTENT);\n }\n\n /** Focuses the panel. */\n async focus(): Promise<void> {\n return (await this._header()).focus();\n }\n\n /** Blurs the panel. */\n async blur(): Promise<void> {\n return (await this._header()).blur();\n }\n\n /** Whether the panel is focused. */\n async isFocused(): Promise<boolean> {\n return (await this._header()).isFocused();\n }\n\n /** Whether the panel has a toggle indicator displayed. */\n async hasToggleIndicator(): Promise<boolean> {\n return (await this._expansionIndicator()) !== null;\n }\n\n /** Gets the position of the toggle indicator. */\n async getToggleIndicatorPosition(): Promise<'before'|'after'> {\n // By default the expansion indicator will show \"after\" the panel header content.\n if (await (await this._header()).hasClass('mat-expansion-toggle-indicator-before')) {\n return 'before';\n }\n return 'after';\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 {MatExpansionPanelHarness} from './expansion-harness';\nimport {AccordionHarnessFilters, ExpansionPanelHarnessFilters} from './expansion-harness-filters';\n\n/** Harness for interacting with a standard mat-accordion in tests. */\nexport class MatAccordionHarness extends ComponentHarness {\n static hostSelector = '.mat-accordion';\n\n /**\n * Gets a `HarnessPredicate` that can be used to search for an accordion\n * 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: AccordionHarnessFilters = {}): HarnessPredicate<MatAccordionHarness> {\n return new HarnessPredicate(MatAccordionHarness, options);\n }\n\n /** Gets all expansion panels which are part of the accordion. */\n async getExpansionPanels(filter: ExpansionPanelHarnessFilters = {}):\n Promise<MatExpansionPanelHarness[]> {\n return this.locatorForAll(MatExpansionPanelHarness.with(filter))();\n }\n\n /** Whether the accordion allows multiple expanded panels simultaneously. */\n async isMulti(): Promise<boolean> {\n return (await this.host()).hasClass('mat-accordion-multi');\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 {BaseHarnessFilters} from '@angular/cdk/testing';\n\nexport interface AccordionHarnessFilters extends BaseHarnessFilters {}\n\nexport interface ExpansionPanelHarnessFilters extends BaseHarnessFilters {\n title?: string|RegExp|null;\n description?: string|RegExp|null;\n content?: string|RegExp;\n expanded?: boolean;\n disabled?: boolean;\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 './accordion-harness';\nexport * from './expansion-harness';\nexport * from './expansion-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;;;;;;;AAuBA;MACa,wBAAyB,SACpC,gCAA0D;IAD5D;;QAIU,YAAO,GAAG,IAAI,CAAC,UAAU,4CAAiC,CAAC;QAC3D,WAAM,GAAG,IAAI,CAAC,kBAAkB,iDAAgC,CAAC;QACjE,iBAAY,GAAG,IAAI,CAAC,kBAAkB,6DAAsC,CAAC;QAC7E,wBAAmB,GAAG,IAAI,CAAC,kBAAkB,CAAC,0BAA0B,CAAC,CAAC;QAC1E,aAAQ,GAAG,IAAI,CAAC,UAAU,8CAAkC,CAAC;KA+HtE;;;;;;;;;;;IAnHC,OAAO,IAAI,CAAC,UAAwC,EAAE;QAEpD,OAAO,IAAI,gBAAgB,CAAC,wBAAwB,EAAE,OAAO,CAAC;aACzD,SAAS,CACN,OAAO,EAAE,OAAO,CAAC,KAAK,EACtB,CAAC,OAAO,EAAE,KAAK,KAAK,gBAAgB,CAAC,aAAa,C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