index.d.ts 1.5 KB

1234567891011121314151617181920212223242526272829303132
  1. import { O as OptionHarnessFilters, M as MatOptionHarness } from '../../option-harness.d-IqsW95GR.js';
  2. import { BaseHarnessFilters, ComponentHarness, ComponentHarnessConstructor, HarnessPredicate } from '@angular/cdk/testing';
  3. interface OptgroupHarnessFilters extends BaseHarnessFilters {
  4. labelText?: string | RegExp;
  5. }
  6. /** Harness for interacting with a `mat-optgroup` in tests. */
  7. declare class MatOptgroupHarness extends ComponentHarness {
  8. /** Selector used to locate option group instances. */
  9. static hostSelector: string;
  10. private _label;
  11. /**
  12. * Gets a `HarnessPredicate` that can be used to search for a option group with specific
  13. * attributes.
  14. * @param options Options for filtering which option instances are considered a match.
  15. * @return a `HarnessPredicate` configured with the given options.
  16. */
  17. static with<T extends MatOptgroupHarness>(this: ComponentHarnessConstructor<T>, options?: OptgroupHarnessFilters): HarnessPredicate<T>;
  18. /** Gets the option group's label text. */
  19. getLabelText(): Promise<string>;
  20. /** Gets whether the option group is disabled. */
  21. isDisabled(): Promise<boolean>;
  22. /**
  23. * Gets the options that are inside the group.
  24. * @param filter Optionally filters which options are included.
  25. */
  26. getOptions(filter?: OptionHarnessFilters): Promise<MatOptionHarness[]>;
  27. }
  28. export { MatOptgroupHarness, MatOptionHarness, OptionHarnessFilters };
  29. export type { OptgroupHarnessFilters };