Update hivegrid-cloud reference to latest main

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
davidandClaude Fable 5 committed 2026-07-08 16:15:37 +02:00
1 parent e98d38e716
commit 7b21524c86
3781 files changed
+373484 -225607

No files matched your search

@@ -0,0 +1,50 @@
import { describe, expect, test } from "vitest";
import type { NotificationCenterModel } from "@hivegrid/view-models";
import { renderNotificationCenterMock } from "./index.js";
const model: NotificationCenterModel = {
titleKey: "notifications.center.title",
emptyHeadlineKey: "notifications.center.empty",
emptyBodyKey: "notifications.center.emptyHelper",
totalCount: 2,
unreadCount: 1,
items: [
{
id: "delivery-1",
messageKey: "team.invite.created",
statusKey: "notifications.center.statuses.sent",
categoryKey: "notifications.center.categories.team",
isRead: false,
bounceKey: null,
deeplinkHref: "/acme/settings/members",
},
{
id: "delivery-2",
messageKey: "billing.invoice.failed",
statusKey: "notifications.center.statuses.read",
categoryKey: "notifications.center.categories.billing",
isRead: true,
bounceKey: "notifications.center.bounce.rateLimited",
deeplinkHref: null,
},
],
};
describe("renderNotificationCenterMock (mock impl)", () => {
test("carries the impl marker, unread count, deeplink and bounce key attributes", () => {
const html = renderNotificationCenterMock(model);
expect(html).toContain('data-ui-impl="mock"');
expect(html).toContain('data-ui-id="ui.notifications.center"');
expect(html).toContain('data-unread-count="1"');
expect(html).toContain('data-deeplink="/acme/settings/members"');
expect(html).toContain('data-bounce-key="notifications.center.bounce.rateLimited"');
expect(html).toContain('data-i18n-key="team.invite.created"');
});
test("renders the empty marker without items", () => {
const html = renderNotificationCenterMock({ ...model, items: [], totalCount: 0, unreadCount: 0 });
expect(html).toContain('data-empty="true"');
expect(html).toContain('data-i18n-key="notifications.center.empty"');
});
});