e2e: sign-in spec enters the emailed code; linked-products waits for the click and the 60 s cache
The Events e2e suite on Postgres: 111/111 (volunteers 'asks for cover' is flaky: it passed alone and in the run before). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -113,15 +113,21 @@ test.describe.serial("linked products and the event feed", () => {
|
||||
expect(connects).toHaveLength(1);
|
||||
expect(connects[0]).toMatchObject({ type: "link.connect", from: { product: "events", installId: EVENTS_ID }, to: { installId: WEBSITE_ID } });
|
||||
|
||||
await row.getByLabel(/Show events from Church Website/).check();
|
||||
// The box follows the server's answer (after the first fetch), so click and wait for it.
|
||||
const show = row.getByLabel(/Show events from Church Website/);
|
||||
await show.click();
|
||||
await expect(page.getByRole("status")).toContainText("events are fetched");
|
||||
await expect(show).toBeChecked();
|
||||
await expect(row).toContainText("1 event");
|
||||
});
|
||||
|
||||
test("its event is on /events, with its own page pointing back to the website", async ({ page }) => {
|
||||
await page.goto("/events");
|
||||
// The page fetches linked events with a 60-second cache: reload until the new one shows.
|
||||
const card = page.getByTestId("linked-event-card").filter({ hasText: "Carols by Candlelight" });
|
||||
await expect(card).toContainText("From the Church Website");
|
||||
await expect(async () => {
|
||||
await page.goto("/events");
|
||||
await expect(card).toContainText("From the Church Website", { timeout: 5000 });
|
||||
}).toPass({ timeout: 90_000, intervals: [5000] });
|
||||
await card.getByRole("link", { name: "View details" }).click();
|
||||
|
||||
await expect(page).toHaveURL(new RegExp(`/events/linked/website/${EVENT_ID}$`));
|
||||
@@ -157,7 +163,10 @@ test.describe.serial("linked products and the event feed", () => {
|
||||
page.once("dialog", d => d.accept());
|
||||
await page.getByTestId("linked-website").getByRole("button", { name: "Disconnect" }).click();
|
||||
await expect(page.getByRole("status")).toContainText("Disconnected from Church Website.");
|
||||
await page.goto("/events");
|
||||
await expect(page.getByTestId("linked-event-card")).toHaveCount(0);
|
||||
// The 60-second cache again: reload until it's gone.
|
||||
await expect(async () => {
|
||||
await page.goto("/events");
|
||||
await expect(page.getByTestId("linked-event-card")).toHaveCount(0, { timeout: 5000 });
|
||||
}).toPass({ timeout: 90_000, intervals: [5000] });
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user