index.d.ts 1.4 KB

123456789101112131415161718192021222324252627282930313233343536
  1. import { BaseHarnessFilters, ComponentHarness, HarnessPredicate } from '@angular/cdk/testing';
  2. import { a as MatBadgePosition, b as MatBadgeSize } from '../../badge.d-mlaO4g0J.js';
  3. import '@angular/core';
  4. import '../../palette.d-BSSFKjO6.js';
  5. interface BadgeHarnessFilters extends BaseHarnessFilters {
  6. text?: string | RegExp;
  7. }
  8. /** Harness for interacting with a standard Material badge in tests. */
  9. declare class MatBadgeHarness extends ComponentHarness {
  10. static hostSelector: string;
  11. /**
  12. * Gets a `HarnessPredicate` that can be used to search for a badge with specific attributes.
  13. * @param options Options for narrowing the search:
  14. * - `text` finds a badge host with a particular text.
  15. * @return a `HarnessPredicate` configured with the given options.
  16. */
  17. static with(options?: BadgeHarnessFilters): HarnessPredicate<MatBadgeHarness>;
  18. private _badgeElement;
  19. /** Gets a promise for the badge text. */
  20. getText(): Promise<string>;
  21. /** Gets whether the badge is overlapping the content. */
  22. isOverlapping(): Promise<boolean>;
  23. /** Gets the position of the badge. */
  24. getPosition(): Promise<MatBadgePosition>;
  25. /** Gets the size of the badge. */
  26. getSize(): Promise<MatBadgeSize>;
  27. /** Gets whether the badge is hidden. */
  28. isHidden(): Promise<boolean>;
  29. /** Gets whether the badge is disabled. */
  30. isDisabled(): Promise<boolean>;
  31. }
  32. export { MatBadgeHarness };
  33. export type { BadgeHarnessFilters };