Skip to content

Commit

Permalink
fixup! fix(cdk/testing): fix webdriver zone support
Browse files Browse the repository at this point in the history
  • Loading branch information
mmalerba committed Mar 31, 2021
1 parent 80e384a commit 67a0200
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 7 deletions.
8 changes: 4 additions & 4 deletions src/cdk/testing/tests/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -87,13 +87,13 @@ ts_library(
testonly = 1,
srcs = ["webdriver.e2e.spec.ts"],
deps = [
":cross_environment_specs",
":test_harnesses",
"//src/cdk/testing",
"//src/cdk/testing/webdriver",
"@npm//@types/jasmine",
"@npm//@types/node",
"@npm//@types/selenium-webdriver",
"//src/cdk/testing",
"//src/cdk/testing/webdriver",
":test_harnesses",
":cross_environment_specs",
],
)

Expand Down
12 changes: 9 additions & 3 deletions tools/public_api_guard/cdk/testing/webdriver.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
export declare class WebDriverElement implements TestElement {
constructor(_webElement: () => webdriver.WebElement);
readonly element: () => webdriver.WebElement;
constructor(element: () => webdriver.WebElement, _stabilize: () => Promise<void>);
blur(): Promise<void>;
clear(): Promise<void>;
click(...args: [ModifierKeys?] | ['center', ModifierKeys?] | [
Expand Down Expand Up @@ -31,12 +32,17 @@ export declare class WebDriverElement implements TestElement {
}

export declare class WebDriverHarnessEnvironment extends HarnessEnvironment<() => webdriver.WebElement> {
protected constructor(rawRootElement: () => webdriver.WebElement);
protected constructor(rawRootElement: () => webdriver.WebElement, options?: WebDriverHarnessEnvironmentOptions);
protected createEnvironment(element: () => webdriver.WebElement): HarnessEnvironment<() => webdriver.WebElement>;
protected createTestElement(element: () => webdriver.WebElement): TestElement;
forceStabilize(): Promise<void>;
protected getAllRawElements(selector: string): Promise<(() => webdriver.WebElement)[]>;
protected getDocumentRoot(): () => webdriver.WebElement;
waitForTasksOutsideAngular(): Promise<void>;
static loader(driver: webdriver.WebDriver): HarnessLoader;
static getNativeElement(el: TestElement): webdriver.WebElement;
static loader(driver: webdriver.WebDriver, options?: WebDriverHarnessEnvironmentOptions): HarnessLoader;
}

export interface WebDriverHarnessEnvironmentOptions {
queryFn: (selector: string, root: () => webdriver.WebElement) => Promise<webdriver.WebElement[]>;
}

0 comments on commit 67a0200

Please sign in to comment.