We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1d67959 commit 4f27955Copy full SHA for 4f27955
test/common/util.ts
@@ -16,12 +16,16 @@ export async function sleep(ms = 1500) {
16
});
17
}
18
19
+export async function webComponentsReady(driver: WebDriver) {
20
+ const ready = async () => (await driver.executeScript("return window.WebComponents.ready")) as boolean;
21
+ while (!await ready()) {
22
+ await sleep(100);
23
+ }
24
+}
25
+
26
export async function snapshot(t: TestContext, element: WebElement) {
27
if (process.env.TRAVIS) {
- const ready = async () => (await element.getDriver().executeScript("return window.WebComponents.ready")) as boolean;
- while (!(await ready())) {
- await sleep(100);
- }
28
+ await webComponentsReady(element.getDriver());
29
30
31
t.snapshot(await element.getAttribute("outerHTML"));
0 commit comments