Events 3.3.0, Accounts 1.3.0, contracts 1.11.0: Accounts looks like Events, backups; sign-out and upload fixes
- Accounts: account and admin pages in Cross Events' layout (top bar, sidebar, a page per section, dark footer); quick links to the church's sites (GET /me/apps); nightly pg_dump backups with Admin -> Backups (run, keep, download, audited; heartbeat lastBackupAt); a fuller built-in privacy notice with headings and bullets; a fixed favicon. /backups/ ignored (anchored, so src/backups is kept). - Contracts 1.11.0: people.removeDemo (only @example.com, never an admin). - Events: uploads served from the folder they're saved in (a backend started outside backend/ answered 404 for a logo it had just saved); Branding checks the file loads before saving; logout waits for the sign-out call so Accounts signs out too; set-demo removes the last demo's people from Accounts. Tests: Accounts 62 + e2e 8, Events 782, contracts 225; npm run check passes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -76,13 +76,17 @@ test("a product asking for two-step sign-in: set up with an app, recovery codes,
|
||||
await expect(page.locator("#amr")).toHaveText("pwd otp mfa");
|
||||
});
|
||||
|
||||
test("the account page: signs in first, then saves details", async ({ page }) => {
|
||||
test("the account page: signs in first, links to the church's sites, then saves details", async ({ page }) => {
|
||||
await page.goto("/account");
|
||||
await expect(page.getByRole("heading", { name: "Sign in to Hope Family Church" })).toBeVisible();
|
||||
await page.getByLabel("Email address").fill("new@hope.test");
|
||||
await page.getByLabel("Password").fill("Correct-horse-2");
|
||||
await page.getByRole("button", { name: "Sign in" }).click();
|
||||
await expect(page.getByRole("heading", { name: "Your account" })).toBeVisible();
|
||||
await expect(page.getByRole("heading", { name: "Hi, New" })).toBeVisible();
|
||||
// 1.3.0: a quick link to each site that signs in here (the test product is a website).
|
||||
await expect(page.getByRole("link", { name: /Website/ })).toHaveAttribute("href", "http://localhost:5211/");
|
||||
await page.getByRole("navigation", { name: "Your account" }).getByRole("link", { name: "Your details" }).click();
|
||||
await expect(page).toHaveURL(/\/account\/details$/);
|
||||
await page.getByLabel("Name").fill("New Person-Smith");
|
||||
await page.getByRole("button", { name: "Save", exact: true }).click();
|
||||
await expect(page.getByRole("status")).toContainText("Your details are saved");
|
||||
@@ -98,6 +102,10 @@ test("admin: needs two-step sign-in, then lists people", async ({ page }) => {
|
||||
await page.getByLabel("Code").fill(await helper(page, `/test/totp?secret=${key}`));
|
||||
await page.getByRole("button", { name: "Turn on" }).click();
|
||||
await page.getByRole("button", { name: "I've saved them" }).click();
|
||||
await expect(page.getByRole("heading", { name: "Accounts admin" })).toBeVisible();
|
||||
await expect(page.getByRole("heading", { name: "People", level: 1 })).toBeVisible();
|
||||
await expect(page.getByText("thandi@hope.test")).toBeVisible();
|
||||
// 1.3.0: every admin section has its own address, down the side; Backups is one.
|
||||
await page.getByRole("navigation", { name: "Admin" }).getByRole("link", { name: "Backups" }).click();
|
||||
await expect(page.getByRole("heading", { name: "Database backups" })).toBeVisible();
|
||||
await expect(page.getByRole("button", { name: "Back up now" })).toBeVisible();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user