@cosmicdrift/kumiko-bundled-features 0.60.1 → 0.60.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-bundled-features",
3
- "version": "0.60.1",
3
+ "version": "0.60.2",
4
4
  "description": "Built-in features — tenant, user, auth, delivery. The stuff you'd rewrite anyway, already typed.",
5
5
  "license": "BUSL-1.1",
6
6
  "author": "Marc Frost <marc@cosmicdriftgamestudio.com>",
@@ -6,7 +6,7 @@ import {
6
6
  PrimitivesProvider,
7
7
  } from "@cosmicdrift/kumiko-renderer";
8
8
  import { defaultPrimitives } from "@cosmicdrift/kumiko-renderer-web";
9
- import { fireEvent, render, screen } from "@testing-library/react";
9
+ import { fireEvent, render, screen, waitFor } from "@testing-library/react";
10
10
  import type { ReactNode } from "react";
11
11
  import { CustomFieldsFormSection } from "../custom-fields-form-section";
12
12
  import { defaultTranslations } from "../i18n";
@@ -98,11 +98,10 @@ describe("CustomFieldsFormSection", () => {
98
98
 
99
99
  const saveBtn = screen.getByTestId("custom-fields-form-save");
100
100
  fireEvent.click(saveBtn);
101
- // Wait one microtask for the async handleSave loop.
102
- await Promise.resolve();
103
- await Promise.resolve();
101
+ // waitFor statt fester Promise.resolve()-Ticks robust gegen zusätzliche
102
+ // Microtasks im async handleSave-Loop (z.B. ein neuer dispatch-Wrapper).
103
+ await waitFor(() => expect(dispatchSpy).toHaveBeenCalledTimes(1));
104
104
 
105
- expect(dispatchSpy).toHaveBeenCalledTimes(1);
106
105
  expect(dispatchSpy).toHaveBeenCalledWith("custom-fields:write:set-custom-field", {
107
106
  entityName: "component",
108
107
  entityId: "row-42",