@cosmicdrift/kumiko-renderer-web 0.34.1 → 0.34.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cosmicdrift/kumiko-renderer-web",
|
|
3
|
-
"version": "0.34.
|
|
3
|
+
"version": "0.34.2",
|
|
4
4
|
"description": "Web-platform bindings for @cosmicdrift/kumiko-renderer. HTML default-primitives, browser history-based navigation, EventSource-backed live events, and a one-call createKumikoApp that mounts the whole stack via react-dom.",
|
|
5
5
|
"license": "BUSL-1.1",
|
|
6
6
|
"author": "Marc Frost <marc@cosmicdriftgamestudio.com>",
|
|
@@ -197,20 +197,31 @@ describe("KumikoScreen", () => {
|
|
|
197
197
|
const TaskCustomFields = ({
|
|
198
198
|
entityName,
|
|
199
199
|
entityId,
|
|
200
|
+
initialValues,
|
|
200
201
|
}: {
|
|
201
202
|
entityName: string;
|
|
202
203
|
entityId: string | null;
|
|
204
|
+
initialValues?: Readonly<Record<string, unknown>>;
|
|
203
205
|
}) => (
|
|
204
206
|
<div data-testid="task-custom-fields">
|
|
205
|
-
{entityName}:{entityId ?? "(create)"}
|
|
207
|
+
{entityName}:{entityId ?? "(create)"}:{String(initialValues?.["vendor"] ?? "(no-value)")}
|
|
206
208
|
</div>
|
|
207
209
|
);
|
|
208
210
|
const dispatcher = makeDispatcher({
|
|
209
|
-
// detail liefert die row MIT id
|
|
210
|
-
// den Form-values
|
|
211
|
+
// detail liefert die row MIT id + customFields-jsonb. Update-Form
|
|
212
|
+
// filtert id aus den Form-values (Section darf nicht create-mode
|
|
213
|
+
// sein) UND die Section muss den gespeicherten customFields-Bestand
|
|
214
|
+
// bekommen (sonst write-only → Read-Back leer).
|
|
211
215
|
query: (async () => ({
|
|
212
216
|
isSuccess: true,
|
|
213
|
-
data: {
|
|
217
|
+
data: {
|
|
218
|
+
id: "task-1",
|
|
219
|
+
version: 7,
|
|
220
|
+
title: "loaded",
|
|
221
|
+
count: 0,
|
|
222
|
+
done: false,
|
|
223
|
+
customFields: { vendor: "Hetzner" },
|
|
224
|
+
},
|
|
214
225
|
})) as unknown as Dispatcher["query"],
|
|
215
226
|
});
|
|
216
227
|
|
|
@@ -224,8 +235,9 @@ describe("KumikoScreen", () => {
|
|
|
224
235
|
|
|
225
236
|
await waitFor(() => expect(screen.queryByTestId("kumiko-screen-loading")).toBeNull());
|
|
226
237
|
const section = screen.getByTestId("task-custom-fields");
|
|
227
|
-
//
|
|
228
|
-
|
|
238
|
+
// Anker: (1) echte route-id statt "(create)" [create-mode-Bug],
|
|
239
|
+
// (2) gespeicherter customFields-Wert statt "(no-value)" [write-only-Bug].
|
|
240
|
+
expect(section.textContent).toBe("task:task-1:Hetzner");
|
|
229
241
|
});
|
|
230
242
|
|
|
231
243
|
test("entityList onRowClick → Callback feuert mit Row-Viewmodel", async () => {
|