mirror of
https://github.com/penpot/penpot.git
synced 2026-09-19 02:16:14 +00:00
Move SPA routing out of the URL fragment into the normal query string. The screen travels in a reserved `screen` key holding the route name (`?screen=workspace&team-id=…`); every other param keeps its name. `rt/nav` and `rt/resolve` keep their signatures. This deletes the fragment-mirroring URL surgery, simplifies link-preview (the server sees everything) and nginx (single path, no SPA fallback rules needed), and migrates OIDC redirects, email links, e2e helpers and plugin test utils to the new format. Legacy `#/…` URLs translate client-side for one Penpot version (`legacy-routes`, marked TODO(next-version)); non-SPA paths are untouched. AI-assisted-by: muse-spark-1.3-contributor
47 lines
1.3 KiB
JavaScript
47 lines
1.3 KiB
JavaScript
import { test, expect } from "@playwright/test";
|
|
import { RegisterPage } from "../pages/RegisterPage";
|
|
|
|
test.beforeEach(async ({ page }) => {
|
|
await RegisterPage.initWithLoggedOutUser(page);
|
|
await page.goto("/?screen=auth-register");
|
|
});
|
|
|
|
test.describe("Register form errors", () => {
|
|
test("User gets error message when email does not match invitation", async ({
|
|
page,
|
|
}) => {
|
|
const registerPage = new RegisterPage(page);
|
|
await registerPage.setupMismatchedEmailError();
|
|
|
|
await registerPage.fillRegisterFormInputs(
|
|
"John Doe",
|
|
"john.doe@example.com",
|
|
"password123",
|
|
);
|
|
await registerPage.clickRegisterButton();
|
|
|
|
await expect(
|
|
page.getByText("Email does not match the invitation."),
|
|
).toBeVisible();
|
|
});
|
|
|
|
test("User gets the already used email error on the email input", async ({
|
|
page,
|
|
}) => {
|
|
const registerPage = new RegisterPage(page);
|
|
await registerPage.setupEmailAlreadyExistsError();
|
|
|
|
await registerPage.fillRegisterFormInputs(
|
|
"John Doe",
|
|
"john.doe@example.com",
|
|
"password123",
|
|
);
|
|
await registerPage.clickRegisterButton();
|
|
|
|
await expect(page.getByTestId("email-input-error")).toHaveText(
|
|
"Email already used",
|
|
);
|
|
await expect(page.getByRole("alert")).toHaveCount(0);
|
|
});
|
|
});
|