chore(nx/server): set up e2e

This commit is contained in:
Elian Doran
2025-04-28 22:58:00 +03:00
parent 546bb52abe
commit e18613148b
33 changed files with 40 additions and 172 deletions

View File

@@ -0,0 +1,18 @@
import { test, expect, Page } from "@playwright/test";
import App from "./support/app";
test("Goes to share root", async ({ page, context }) => {
const app = new App(page, context);
await app.goto({ url: "/share" });
const noteTitle = "Shared notes";
await expect(page).toHaveTitle(noteTitle);
await expect(page.locator("h1")).toHaveText(noteTitle);
});
test("Goes to parent share root page", async ({ page, context }) => {
const app = new App(page, context);
await app.goto({ url: "/share/bKMn5EFv9KS2" });
await expect(page.locator("h1")).toHaveText("Child note");
await page.locator("#parentLink a").click();
await page.waitForURL("/share/");
});