{"version":3,"file":"testing.mjs","sources":["../../../../../../../src/material/toolbar/testing/toolbar-harness.ts","../../../../../../../src/material/toolbar/testing/toolbar-harness-filters.ts","../../../../../../../src/material/toolbar/testing/public-api.ts","../../../../../../../src/material/toolbar/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\n\nimport {ContentContainerComponentHarness, HarnessPredicate, parallel} from '@angular/cdk/testing';\nimport {ToolbarHarnessFilters} from './toolbar-harness-filters';\n\n/** Selectors for different sections of the mat-toolbar that contain user content. */\nexport const enum MatToolbarSection {\n  ROW = '.mat-toolbar-row'\n}\n\n/** Harness for interacting with a standard mat-toolbar in tests. */\nexport class MatToolbarHarness extends ContentContainerComponentHarness<MatToolbarSection> {\n  static hostSelector = '.mat-toolbar';\n\n  private _getRows = this.locatorForAll(MatToolbarSection.ROW);\n\n  /**\n   * Gets a `HarnessPredicate` that can be used to search for a `MatToolbarHarness` 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: ToolbarHarnessFilters = {}): HarnessPredicate<MatToolbarHarness> {\n    return new HarnessPredicate(MatToolbarHarness, options)\n      .addOption('text', options.text,\n        (harness, text) => HarnessPredicate.stringMatches(harness._getText(), text));\n  }\n\n  /** Whether the toolbar has multiple rows. */\n  async hasMultipleRows(): Promise<boolean> {\n    return (await this.host()).hasClass('mat-toolbar-multiple-rows');\n  }\n\n  /** Gets all of the toolbar's content as text. */\n  private async _getText(): Promise<string> {\n    return (await this.host()).text();\n  }\n\n  /** Gets the text of each row in the toolbar. */\n  async getRowsAsText(): Promise<string[]> {\n    const rows = await this._getRows();\n    return parallel(() => rows.length ? rows.map(r => r.text()) : [this._getText()]);\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 `MatToolbarHarness` instances. */\nexport interface ToolbarHarnessFilters extends BaseHarnessFilters {\n  /** Only find instances whose text matches the given value. */\n  text?: 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 './toolbar-harness';\nexport * from './toolbar-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;;;;;;;AAiBA;MACa,iBAAkB,SAAQ,gCAAmD;IAA1F;;QAGU,aAAQ,GAAG,IAAI,CAAC,aAAa,8BAAuB,CAAC;KA6B9D;;;;;;;IArBC,OAAO,IAAI,CAAC,UAAiC,EAAE;QAC7C,OAAO,IAAI,gBAAgB,CAAC,iBAAiB,EAAE,OAAO,CAAC;aACpD,SAAS,CAAC,MAAM,EAAE,OAAO,CAAC,IAAI,EAC7B,CAAC,OAAO,EAAE,IAAI,KAAK,gBAAgB,CAAC,aAAa,CAAC,OAAO,CAAC,QAAQ,EAAE,EAAE,IAAI,CAAC,CAAC,CAAC;KAClF;;IAGD,MAAM,eAAe;QACnB,OAAO,CAAC,MAAM,IAAI,CAAC,IAAI,EAAE,EAAE,QAAQ,CAAC,2BAA2B,CAAC,CAAC;KAClE;;IAGO,MAAM,QAAQ;QACpB,OAAO,CAAC,MAAM,IAAI,CAAC,IAAI,EAAE,EAAE,IAAI,EAAE,CAAC;KACnC;;IAGD,MAAM,aAAa;QACjB,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,QAAQ,EAAE,CAAC;QACnC,OAAO,QAAQ,CAAC,MAAM,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC;KAClF;;AA9BM,8BAAY,GAAG,cAAc;;ACnBtC;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;;;"}