Speeds up subsequent local testing

add_booking_confirmed_webhook_event
zomars 2021-12-29 11:52:43 -07:00
parent 410bc2a87a
commit cd2b279308
1 changed files with 3 additions and 0 deletions

View File

@ -1,6 +1,9 @@
import { Browser, chromium } from "@playwright/test";
import fs from "fs";
async function loginAsUser(username: string, browser: Browser) {
// Skip is file exists
if (fs.existsSync(`playwright/artifacts/${username}StorageState.json`)) return;
const page = await browser.newPage();
await page.goto(`${process.env.PLAYWRIGHT_TEST_BASE_URL}/auth/login`);
// Click input[name="email"]