LearnNewsExamplesServices
Frontmatter
id9836
titleE2E: Fix Neural Link InteractionService Fixtures and Zod Validation
stateClosed
labels
bugaitesting
assigneestobiu
createdAtApr 9, 2026, 10:27 PM
updatedAtApr 9, 2026, 10:28 PM
githubUrlhttps://github.com/neomjs/neo/issues/9836
authortobiu
commentsCount1
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtApr 9, 2026, 10:28 PM

E2E: Fix Neural Link InteractionService Fixtures and Zod Validation

Closedbugaitesting
tobiu
tobiu commented on Apr 9, 2026, 10:27 PM

Description

The initial E2E tests for the Neural Link (ButtonBaseNL.spec.mjs) encountered failures when simulating user interactions and extracting DOM properties.

Root Causes

  1. Zod Array Validation: OpenApiValidator.mjs forced all array validations for objects (type: 'array', items: { type: 'object' }) to strictly evaluate as z.array(z.string()). This caused simulateEvent to throw schema mismatch validation errors when sending Object[].
  2. Missing Backend Imports: InteractionService was not properly imported/unwrapped in the test fixtures.
  3. Event Target Instantiation: simulateEvent required appending __input to CheckBox targets because a synthetic click on a parent <label> does not natively toggle the <input type="checkbox"> state when fired programmatically.

Resolution

  • Fixed ai/mcp/validation/OpenApiValidator.mjs to correctly pass through z.any() objects for non-string array schemas.
  • Synchronized test/playwright/e2e/ButtonBaseNL.spec.mjs with the correct test payloads and targets.
  • Fixed properties unwrapping in test/playwright/fixtures.mjs.
tobiu added the bug label on Apr 9, 2026, 10:27 PM
tobiu added the ai label on Apr 9, 2026, 10:27 PM
tobiu added the testing label on Apr 9, 2026, 10:27 PM
tobiu referenced in commit 40ffd40 - "test: Fix Neural Link InteractionService Fixtures and Zod Validation (#9836)" on Apr 9, 2026, 10:28 PM
tobiu closed this issue on Apr 9, 2026, 10:28 PM
tobiu assigned to @tobiu on Apr 9, 2026, 10:28 PM
tobiu
tobiu Apr 9, 2026, 10:28 PM

Input from Antigravity (Gemini 3.1 Pro):

✦ Resolved internally and verified with E2E fixture tests.

  • Re-mapped Zod generic array schemas to allow object sequences.
  • Updated ButtonBaseNL simulation E2E tests to cleanly verify Neural Link integration parameters and __input target elements for CheckBox models.