/
tooltip-harness.ts
34 lines (31 loc) · 1.43 KB
/
tooltip-harness.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
import {HarnessPredicate} from '@angular/cdk/testing';
import {_MatTooltipHarnessBase, TooltipHarnessFilters} from '@angular/material/tooltip/testing';
/**
* Harness for interacting with a standard mat-tooltip in tests.
* @deprecated Use `MatTooltipHarness` from `@angular/material/tooltip/testing` instead. See https://material.angular.io/guide/mdc-migration for information about migrating.
* @breaking-change 17.0.0
*/
export class MatLegacyTooltipHarness extends _MatTooltipHarnessBase {
protected _optionalPanel = this.documentRootLocatorFactory().locatorForOptional('.mat-tooltip');
protected _hiddenClass = 'mat-tooltip-hide';
protected _disabledClass = 'mat-tooltip-disabled';
protected _showAnimationName = 'mat-tooltip-show';
protected _hideAnimationName = 'mat-tooltip-hide';
static hostSelector = '.mat-tooltip-trigger';
/**
* Gets a `HarnessPredicate` that can be used to search
* for a tooltip trigger with specific attributes.
* @param options Options for narrowing the search.
* @return a `HarnessPredicate` configured with the given options.
*/
static with(options: TooltipHarnessFilters = {}): HarnessPredicate<MatLegacyTooltipHarness> {
return new HarnessPredicate(MatLegacyTooltipHarness, options);
}
}