Skip to content

Commit b69fa35

Browse files
committed
Removed unused utils (DH-18428-2)
1 parent e7b1e90 commit b69fa35

File tree

1 file changed

+6
-17
lines changed

1 file changed

+6
-17
lines changed

e2e-testing/src/util/testUtils.ts

+6-17
Original file line numberDiff line numberDiff line change
@@ -52,28 +52,17 @@ export async function disconnectFromServer(title: string): Promise<void> {
5252
await disconnectAction?.click();
5353
}
5454

55+
/**
56+
* Check if an element exists in the current context. This is needed since the
57+
* default Selenium driver `findElement` methods throw if element not found.
58+
* @param locator Locator of element to check
59+
* @returns True if element exists, false otherwise
60+
*/
5561
export async function elementExists(locator: Locator): Promise<boolean> {
5662
const { driver } = VSBrowser.instance;
5763
return (await driver.findElements(locator)).length > 0;
5864
}
5965

60-
export async function elementExistsEventually(
61-
locator: Locator
62-
): Promise<boolean> {
63-
const { driver } = VSBrowser.instance;
64-
await driver.wait(until.elementLocated(locator));
65-
return true;
66-
}
67-
68-
export async function elementIsLazyLoaded(locator: Locator): Promise<boolean> {
69-
const existsInitially = await elementExists(locator);
70-
if (existsInitially) {
71-
throw new Error('Element is already present before lazy loading');
72-
}
73-
74-
return elementExistsEventually(locator);
75-
}
76-
7766
/**
7867
* We don't have access to some of the underlying error classes from
7968
* vscode-extension-tester, but we can approximate the type of error by grabbing

0 commit comments

Comments
 (0)