Update hivegrid-cloud reference to latest main
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
e98d38e716
commit
7b21524c86
3781 files changed
+373484
-225607
No files matched your search
+47
@@ -0,0 +1,47 @@
|
||||
/* eslint-disable no-restricted-syntax -- test fixtures use real display strings, not i18n UI descriptors */
|
||||
import { describe, expect, test } from "vitest";
|
||||
import type { AuditListModel } from "@hivegrid/view-models";
|
||||
|
||||
import { renderAuditListMock } from "./index.js";
|
||||
|
||||
const model: AuditListModel = {
|
||||
titleKey: "audit.viewer.title",
|
||||
emptyHeadlineKey: "audit.viewer.empty.headline",
|
||||
emptyBodyKey: "audit.viewer.empty.body",
|
||||
canExport: true,
|
||||
page: 1,
|
||||
totalPages: 2,
|
||||
rows: [
|
||||
{
|
||||
id: "audit-1",
|
||||
createdAtIso: "2026-07-06T08:00:00.000Z",
|
||||
actorKindLabelKey: "audit.actorKind.user",
|
||||
actorLabel: "akeshan@example.test",
|
||||
action: "kontakt.updated",
|
||||
outcome: "success",
|
||||
summaryText: "Kontakt umbenannt",
|
||||
summaryKey: "audit.summary.updated",
|
||||
diffCount: 2,
|
||||
hasDetail: true,
|
||||
},
|
||||
],
|
||||
rowCount: 1,
|
||||
};
|
||||
|
||||
describe("renderAuditListMock (mock impl)", () => {
|
||||
test("carries the impl marker, row data-attributes and the persisted summary", () => {
|
||||
const html = renderAuditListMock(model);
|
||||
expect(html).toContain('data-ui-impl="mock"');
|
||||
expect(html).toContain('data-ui-id="ui.audit.list"');
|
||||
expect(html).toContain('data-row-id="audit-1"');
|
||||
expect(html).toContain('data-diff-count="2"');
|
||||
expect(html).toContain("Kontakt umbenannt");
|
||||
expect(html).toContain('data-i18n-key="audit.viewer.title"');
|
||||
});
|
||||
|
||||
test("renders the empty marker without rows", () => {
|
||||
const html = renderAuditListMock({ ...model, rows: [], rowCount: 0 });
|
||||
expect(html).toContain('data-empty="true"');
|
||||
expect(html).toContain('data-i18n-key="audit.viewer.empty.headline"');
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user