source: trip-planner-front/node_modules/@angular/material/fesm2015/card/testing.js.map@ 6c1585f

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

initial commit

  • Property mode set to 100644
File size: 4.8 KB
Line 
1{"version":3,"file":"card__testing.js","sources":["../../../../../../src/material/card/testing/card-harness.ts","../../../../../../src/material/card/testing/card-harness-filters.ts","../../../../../../src/material/card/testing/public-api.ts","../../../../../../src/material/card/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, ContentContainerComponentHarness} from '@angular/cdk/testing';\nimport {CardHarnessFilters} from './card-harness-filters';\n\n/** Selectors for different sections of the mat-card that can container user content. */\nexport const enum MatCardSection {\n HEADER = '.mat-card-header',\n CONTENT = '.mat-card-content',\n ACTIONS = '.mat-card-actions',\n FOOTER = '.mat-card-footer'\n}\n\n/** Harness for interacting with a standard mat-card in tests. */\nexport class MatCardHarness extends ContentContainerComponentHarness<MatCardSection> {\n /** The selector for the host element of a `MatCard` instance. */\n static hostSelector = '.mat-card';\n\n /**\n * Gets a `HarnessPredicate` that can be used to search for a `MatCardHarness` that meets\n * certain criteria.\n * @param options Options for filtering which card instances are considered a match.\n * @return a `HarnessPredicate` configured with the given options.\n */\n static with(options: CardHarnessFilters = {}): HarnessPredicate<MatCardHarness> {\n return new HarnessPredicate(MatCardHarness, options)\n .addOption('text', options.text,\n (harness, text) => HarnessPredicate.stringMatches(harness.getText(), text))\n .addOption('title', options.title,\n (harness, title) => HarnessPredicate.stringMatches(harness.getTitleText(), title))\n .addOption('subtitle', options.subtitle,\n (harness, subtitle) =>\n HarnessPredicate.stringMatches(harness.getSubtitleText(), subtitle));\n }\n\n private _title = this.locatorForOptional('.mat-card-title');\n private _subtitle = this.locatorForOptional('.mat-card-subtitle');\n\n /** Gets all of the card's content as text. */\n async getText(): Promise<string> {\n return (await this.host()).text();\n }\n\n /** Gets the cards's title text. */\n async getTitleText(): Promise<string> {\n return (await this._title())?.text() ?? '';\n }\n\n /** Gets the cards's subtitle text. */\n async getSubtitleText(): Promise<string> {\n return (await this._subtitle())?.text() ?? '';\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\n/** A set of criteria that can be used to filter a list of `MatCardHarness` instances. */\nexport interface CardHarnessFilters extends BaseHarnessFilters {\n /** Only find instances whose text matches the given value. */\n text?: string | RegExp;\n /** Only find instances whose title matches the given value. */\n title?: string | RegExp;\n /** Only find instances whose subtitle matches the given value. */\n subtitle?: string | RegExp;\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 './card-harness';\nexport * from './card-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;;;;;;;AAmBA;MACa,cAAe,SAAQ,gCAAgD;IAApF;;QAqBU,WAAM,GAAG,IAAI,CAAC,kBAAkB,CAAC,iBAAiB,CAAC,CAAC;QACpD,cAAS,GAAG,IAAI,CAAC,kBAAkB,CAAC,oBAAoB,CAAC,CAAC;KAgBnE;;;;;;;IA5BC,OAAO,IAAI,CAAC,UAA8B,EAAE;QAC1C,OAAO,IAAI,gBAAgB,CAAC,cAAc,EAAE,OAAO,CAAC;aAC/C,SAAS,CAAC,MAAM,EAAE,OAAO,CAAC,IAAI,EAC3B,CAAC,OAAO,EAAE,IAAI,KAAK,gBAAgB,CAAC,aAAa,CAAC,OAAO,CAAC,OAAO,EAAE,EAAE,IAAI,CAAC,CAAC;aAC9E,SAAS,CAAC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