Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pipeline/tests/test_schema_contract.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ def tearDownClass(cls) -> None:
sys.modules[name] = mod

def test_extract_stories_event_row_keys(self) -> None:
row = self.extract_stories._to_event_row(
row, _superseded_id = self.extract_stories._to_event_row(
{
"id": "3894795737410658765",
"handle": "cyber_ucr",
Expand Down
1 change: 1 addition & 0 deletions src/components/events/EventCalendarMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ export function EventCalendarMenu({
return (
<details className={details}>
<summary
role="button"
aria-label={`${calendarLabel}: choose calendar app`}
className={summary}
>
Expand Down
20 changes: 10 additions & 10 deletions tests/e2e/events-browser-contract.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,20 +62,22 @@ test("calendar shows loading state while month events refresh", async ({
const calendarRail = page.locator(
'aside[aria-label="Calendar and time filter"]'
);
await expect(calendarRail.getByRole("heading")).toBeVisible();
const calendarHeading = calendarRail.getByRole("heading", { level: 2 });
await expect(calendarRail).toBeVisible();
// The calendar follows the feed's first visible day, so it settles on the
// observed month (May 2026) shortly after load. Wait for that initial sync to
// finish before testing a navigation fetch — otherwise the stray sync request
// races the click and the displayed month reads as already-loaded on slow CI.
await expect(calendarHeading).toHaveText(/may 2026/i);

let releaseCalendarResponse!: () => void;
const calendarResponse = new Promise<void>((resolve) => {
releaseCalendarResponse = resolve;
});

let blockCalendarFetch = false;
// Installed only after the initial sync settled, so the single request it holds
// open is the one triggered by the Next-month click below.
await page.route("**/api/events/calendar**", async (route) => {
if (!blockCalendarFetch) {
await route.continue();
return;
}

await calendarResponse;
await route.fulfill({
status: 200,
Expand All @@ -85,10 +87,8 @@ test("calendar shows loading state while month events refresh", async ({
});

const calendarGrid = calendarRail.locator("[aria-busy]").first();
blockCalendarFetch = true;
const fetchStarted = page.waitForRequest("**/api/events/calendar**");
await calendarRail.getByRole("button", { name: "Next month" }).click();
await fetchStarted;
await expect(calendarHeading).toHaveText(/june 2026/i);
await expect(calendarGrid).toHaveAttribute("aria-busy", "true");

releaseCalendarResponse();
Expand Down
Loading