push to maple-street
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
import { test, expect } from "@playwright/test";
|
||||
import { signInAs, resetDb, BASE } from "./dev";
|
||||
|
||||
/** Admin email identity settings persist in the database, not env files. */
|
||||
test.describe("email settings", () => {
|
||||
test.beforeAll(async ({ browser }) => {
|
||||
const context = await browser.newContext();
|
||||
const page = await context.newPage();
|
||||
await resetDb(page);
|
||||
await context.close();
|
||||
});
|
||||
|
||||
test("admin can edit the sender and notification inbox", async ({ page }) => {
|
||||
await page.setViewportSize({ width: 1024, height: 900 });
|
||||
await signInAs(page, "admin@glenloch.local");
|
||||
await page.goto(`${BASE}/settings`);
|
||||
|
||||
await page.getByLabel("From address").fill("notifications@glenloch.local");
|
||||
await page
|
||||
.getByLabel("Admin notifications (optional)")
|
||||
.fill("ops@glenloch.local");
|
||||
await page.getByRole("button", { name: "Save email settings" }).click();
|
||||
|
||||
await expect(page.getByText(/Saved\. New notifications/)).toBeVisible();
|
||||
|
||||
await page.reload();
|
||||
await expect(page.getByLabel("From address")).toHaveValue(
|
||||
"notifications@glenloch.local",
|
||||
);
|
||||
await expect(page.getByLabel("Admin notifications (optional)")).toHaveValue(
|
||||
"ops@glenloch.local",
|
||||
);
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user