Fix E2E tests. Add Playwright (#698)

This commit is contained in:
Steve Faulkner
2021-04-19 22:08:25 -05:00
committed by GitHub
parent 914e969083
commit 2fd6305944
25 changed files with 3818 additions and 1494 deletions

11
test/utils/safeClick.ts Normal file
View File

@@ -0,0 +1,11 @@
import { Frame } from "playwright";
export async function safeClick(page: Frame, selector: string): Promise<void> {
// TODO: Remove. Playwright does this for you... mostly.
// But our knockout+react setup sometimes leaves dom nodes detached and even playwright can't recover.
// Resource tree is particually bad.
// Ideally this should only be added as a last resort
await page.waitForSelector(selector);
await page.waitForTimeout(5000);
await page.click(selector);
}