add playwright for e2e testing (#873)
This commit is contained in:
1 parent
c62e1a0eeb
commit
a9ee2ef9ae
10 files changed
+777
-54
No files matched your search
@@ -0,0 +1,23 @@
|
||||
jest.setTimeout(35e3);
|
||||
|
||||
test("go to /pro", async () => {
|
||||
// Go to http://localhost:3000/auth/login
|
||||
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");
|
||||
|
||||
await page.waitForSelector("[data-testid=event-types]");
|
||||
|
||||
const $eventTypes = await page.$$("[data-testid=event-types] > *");
|
||||
expect($eventTypes.length).toBeGreaterThanOrEqual(2);
|
||||
});
|
||||
|
||||
export {};
|
||||
Reference in new issue
Block a user