1 | /**
|
---|
2 | * @license
|
---|
3 | * Copyright Google LLC All Rights Reserved.
|
---|
4 | *
|
---|
5 | * Use of this source code is governed by an MIT-style license that can be
|
---|
6 | * found in the LICENSE file at https://angular.io/license
|
---|
7 | */
|
---|
8 | import { HarnessEnvironment, HarnessLoader, TestElement } from '@angular/cdk/testing';
|
---|
9 | import { ElementArrayFinder, ElementFinder } from 'protractor';
|
---|
10 | /**
|
---|
11 | * Options to configure the environment.
|
---|
12 | * @deprecated
|
---|
13 | * @breaking-change 13.0.0
|
---|
14 | */
|
---|
15 | export interface ProtractorHarnessEnvironmentOptions {
|
---|
16 | /** The query function used to find DOM elements. */
|
---|
17 | queryFn: (selector: string, root: ElementFinder) => ElementArrayFinder;
|
---|
18 | }
|
---|
19 | /**
|
---|
20 | * A `HarnessEnvironment` implementation for Protractor.
|
---|
21 | * @deprecated
|
---|
22 | * @breaking-change 13.0.0
|
---|
23 | */
|
---|
24 | export declare class ProtractorHarnessEnvironment extends HarnessEnvironment<ElementFinder> {
|
---|
25 | /** The options for this environment. */
|
---|
26 | private _options;
|
---|
27 | protected constructor(rawRootElement: ElementFinder, options?: ProtractorHarnessEnvironmentOptions);
|
---|
28 | /** Creates a `HarnessLoader` rooted at the document root. */
|
---|
29 | static loader(options?: ProtractorHarnessEnvironmentOptions): HarnessLoader;
|
---|
30 | /** Gets the ElementFinder corresponding to the given TestElement. */
|
---|
31 | static getNativeElement(el: TestElement): ElementFinder;
|
---|
32 | /**
|
---|
33 | * Flushes change detection and async tasks captured in the Angular zone.
|
---|
34 | * In most cases it should not be necessary to call this manually. However, there may be some edge
|
---|
35 | * cases where it is needed to fully flush animation events.
|
---|
36 | */
|
---|
37 | forceStabilize(): Promise<void>;
|
---|
38 | /** @docs-private */
|
---|
39 | waitForTasksOutsideAngular(): Promise<void>;
|
---|
40 | /** Gets the root element for the document. */
|
---|
41 | protected getDocumentRoot(): ElementFinder;
|
---|
42 | /** Creates a `TestElement` from a raw element. */
|
---|
43 | protected createTestElement(element: ElementFinder): TestElement;
|
---|
44 | /** Creates a `HarnessLoader` rooted at the given raw element. */
|
---|
45 | protected createEnvironment(element: ElementFinder): HarnessEnvironment<ElementFinder>;
|
---|
46 | /**
|
---|
47 | * Gets a list of all elements matching the given selector under this environment's root element.
|
---|
48 | */
|
---|
49 | protected getAllRawElements(selector: string): Promise<ElementFinder[]>;
|
---|
50 | }
|
---|