Files
mission-control/tests/helpers/fixtures.ts
teernisse d4b8a4baea feat(bd-318): implement QueueView container with filtering and batch support
QueueView now supports:
- Filtering items via CommandPalette (Cmd+K)
- Hide snoozed items by default (showSnoozed prop)
- Show snooze count indicator when items are hidden
- Support batch mode entry for sections with 2+ items
- Filter by type prop for programmatic filtering

Added snoozedUntil field to FocusItem type and updated fixtures.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-26 11:00:16 -05:00

43 lines
1.1 KiB
TypeScript

/**
* Shared test fixtures for Mission Control frontend tests.
*
* Centralized here to avoid duplication across test files.
*/
import type { FocusItem, InboxItem } from "@/lib/types";
/** Create a FocusItem with sensible defaults, overridable per field. */
export function makeFocusItem(
overrides: Partial<FocusItem> = {}
): FocusItem {
return {
id: "mr_review:platform/core:847",
title: "Fix authentication token refresh logic",
type: "mr_review",
project: "platform/core",
url: "https://gitlab.com/platform/core/-/merge_requests/847",
iid: 847,
updatedAt: new Date().toISOString(),
contextQuote: null,
requestedBy: null,
snoozedUntil: null,
...overrides,
};
}
/** Create an InboxItem with sensible defaults, overridable per field. */
export function makeInboxItem(
overrides: Partial<InboxItem> = {}
): InboxItem {
return {
id: "inbox-item-1",
title: "You were mentioned in #312",
type: "mention",
triaged: false,
createdAt: new Date().toISOString(),
snippet: "@user can you look at this?",
actor: "alice",
...overrides,
};
}