mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
Add category discriminator to notification content fixtures
The generated MessageNotificationContent schema now includes the category: "message" discriminator, so content literals in Partial<UserNotification> overrides no longer narrow without it.
This commit is contained in:
@@ -34,7 +34,7 @@ function makeNotificationFixture(overrides: Partial<UserNotification> = {}): Use
|
||||
expiration_time: null,
|
||||
seen_time: null,
|
||||
deleted: false,
|
||||
content: { subject: "hello", message: "welcome" },
|
||||
content: { category: "message", subject: "hello", message: "welcome" },
|
||||
...overrides,
|
||||
} as UserNotification;
|
||||
}
|
||||
@@ -136,7 +136,7 @@ describe("notificationsStore — config-driven SSE vs polling", () => {
|
||||
|
||||
const pushed = makeNotificationFixture({
|
||||
id: "notif-2",
|
||||
content: { subject: "pushed via sse", message: "hi" },
|
||||
content: { category: "message", subject: "pushed via sse", message: "hi" },
|
||||
});
|
||||
emitSse(sseState, "notification_update", pushed);
|
||||
await flushPromises();
|
||||
|
||||
Reference in New Issue
Block a user