index.d.ts 1.4 KB

1234567891011121314151617181920212223242526272829303132333435
  1. import { BaseHarnessFilters, ComponentHarness, ComponentHarnessConstructor, HarnessPredicate } from '@angular/cdk/testing';
  2. /** A set of criteria that can be used to filter a list of `MatTooltipHarness` instances. */
  3. interface TooltipHarnessFilters extends BaseHarnessFilters {
  4. }
  5. /** Harness for interacting with a mat-tooltip in tests. */
  6. declare class MatTooltipHarness extends ComponentHarness {
  7. static hostSelector: string;
  8. private _optionalPanel;
  9. private _hiddenClass;
  10. private _disabledClass;
  11. private _showAnimationName;
  12. private _hideAnimationName;
  13. /**
  14. * Gets a `HarnessPredicate` that can be used to search for a tooltip trigger with specific
  15. * attributes.
  16. * @param options Options for narrowing the search.
  17. * @return a `HarnessPredicate` configured with the given options.
  18. */
  19. static with<T extends MatTooltipHarness>(this: ComponentHarnessConstructor<T>, options?: TooltipHarnessFilters): HarnessPredicate<T>;
  20. /** Shows the tooltip. */
  21. show(): Promise<void>;
  22. /** Hides the tooltip. */
  23. hide(): Promise<void>;
  24. /** Gets whether the tooltip is open. */
  25. isOpen(): Promise<boolean>;
  26. /** Gets whether the tooltip is disabled */
  27. isDisabled(): Promise<boolean>;
  28. /** Gets a promise for the tooltip panel's text. */
  29. getTooltipText(): Promise<string>;
  30. }
  31. export { MatTooltipHarness };
  32. export type { TooltipHarnessFilters };