E2E tests refactoring (#1318)

* Adds test todos

* Can't seem to change locales

* WIP playwright test refactoring

* jest-playwright cleanup

* Test fixes

* Test fixes

* More test fixes

* WIP: Testing fixes

* More test fixes

* Removes unused files

* Installs missing browsers for e2e

* ts-node fixes

* ts-check fixes

* Type fixes

* Fixes e2e

* FFS

* Renamex webhook snapshot

* Fixes webhook cross-platform

* Renamed webhook snapshot

* Apply suggestions from code review

Co-authored-by: Max Schmitt <[email protected]>

* Removes kont dependency

* Cleanup playwright options

* Next.js cache optimizations on CI

* Uses cache on e2e as well

* Fixme is introducing side-effects

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
Co-authored-by: Bailey Pumfleet <[email protected]>
Co-authored-by: Max Schmitt <[email protected]>
This commit is contained in:
authored and GitHub committed 2021-12-15 16:25:49 +00:00
1 parent 972402be2c
commit e6f71c81bb
21 files changed
+521 -847

No files matched your search

+7 -19
View File
@@ -1,23 +1,11 @@
jest.setTimeout(60e3);
import { test } from "@playwright/test";
test("login with [email protected]", async () => {
const context = await browser.newContext();
const page = await context.newPage();
await page.goto("http://localhost:3000/auth/login");
// Click input[name="email"]
await page.click('input[name="email"]');
// Fill input[name="email"]
await page.fill('input[name="email"]', `[email protected]`);
// Press Tab
await page.press('input[name="email"]', "Tab");
// Fill input[name="password"]
await page.fill('input[name="password"]', `pro`);
// Press Enter
await page.press('input[name="password"]', "Enter");
// Using logged in state from globalSteup
test.use({ storageState: "playwright/artifacts/proStorageState.json" });
test("login with [email protected]", async ({ page }) => {
// Try to go homepage
await page.goto("/");
// It should redirect you to the event-types page
await page.waitForSelector("[data-testid=event-types]");
await context.close();
});
export {};