Skip to content

Fix Playwright Teleportation Tests for Fixed-DOM-Order Grid #9019

@tobiu

Description

@tobiu

Objective:
Update test/playwright/unit/grid/Teleportation.spec.mjs to align with the new "Fixed-DOM-Order" Row Pooling architecture. The current tests fail because they expect behaviors (DOM moves, direct VDOM structure access) that have been intentionally obsoleted by recent refactorings (#9012, #9017).

Issue 1: Expectation Mismatch (Zero Moves)

  • Failure: expect(moveNodes.length).toBe(3) received 0.
  • Reason: The Fixed-DOM-Order strategy eliminates moveNode operations for rows during scrolling.
  • Fix: Update the test to expect 0 move deltas for rows. Verify text updates count and adjust if necessary.

Issue 2: VDOM Traversal Failure

  • Failure: TypeError: Cannot read properties of undefined (reading '1') when accessing firstRenderedRow.cn[1].
  • Reason: GridBody now contains Neo.grid.Row references (placeholders) in its vdom.cn, not the full VDOM tree of the rows. The test tries to access cell cn[1] directly from the Body's VDOM, which is no longer valid.
  • Fix:
    • Resolve the Neo.grid.Row instance from the Body's items (using getComponent).
    • Access the Row's own vdom property to inspect cells and content.

Plan:

  1. Modify Teleportation.spec.mjs to assert moveNodes.length is 0.
  2. Refactor the DOM inspection logic to retrieve the Row component instance before inspecting its VDOM structure.
  3. Run the test to verify stability.

Related:

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions