Problem
The unit tests for Neo.draggable.container.SortZone were failing due to two missing pieces of context:
- Missing
appName: The container created in the test did not define appName. This caused Neo.create to initialize the component without an associated app, leading to a crash in VdomLifecycle mixin when it tried to access app.vnodeInitialized.
- Missing Mock Method: The component code calls
Neo.main.addon.DragDrop.setDragProxyElement, but the test's mock for DragDrop did not define this method, causing a TypeError.
Solution
- Update
test/playwright/unit/draggable/container/SortZone.spec.mjs to pass appName when creating the test container.
- Update the
Neo.main.addon.DragDrop mock in test.beforeEach to include setDragProxyElement: () => Promise.resolve().
These changes ensure the test environment correctly simulates the runtime conditions required by SortZone.
Problem
The unit tests for
Neo.draggable.container.SortZonewere failing due to two missing pieces of context:appName: The container created in the test did not defineappName. This causedNeo.createto initialize the component without an associated app, leading to a crash inVdomLifecyclemixin when it tried to accessapp.vnodeInitialized.Neo.main.addon.DragDrop.setDragProxyElement, but the test's mock forDragDropdid not define this method, causing aTypeError.Solution
test/playwright/unit/draggable/container/SortZone.spec.mjsto passappNamewhen creating the test container.Neo.main.addon.DragDropmock intest.beforeEachto includesetDragProxyElement: () => Promise.resolve().These changes ensure the test environment correctly simulates the runtime conditions required by
SortZone.