LearnNewsExamplesServices
Frontmatter
id8337
titleFix Playwright Timing: Wait for Neo.worker.App in Chip.spec.mjs
stateClosed
labels
bugaitesting
assignees[]
createdAtJan 5, 2026, 8:14 PM
updatedAtJan 5, 2026, 8:40 PM
githubUrlhttps://github.com/neomjs/neo/issues/8337
authortobiu
commentsCount1
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtJan 5, 2026, 8:40 PM

Fix Playwright Timing: Wait for Neo.worker.App in Chip.spec.mjs

Closed v11.18.0 bugaitesting
tobiu
tobiu commented on Jan 5, 2026, 8:14 PM

The Playwright component tests are failing with TypeError: Cannot read properties of undefined (reading 'createNeoInstance'). This occurs because the test script executes Neo.worker.App.createNeoInstance inside page.evaluate before the App worker has successfully registered its remote methods in the main thread.

Root Cause: Race condition between the test script execution and the Neo.mjs worker initialization / remote method registration.

Fix: Update the test beforeEach block to explicitly wait for Neo.worker.App to be defined in the window context.

await page.waitForFunction(() => window.Neo && window.Neo.worker && window.Neo.worker.App);

Scope: Apply this fix to test/playwright/component/list/Chip.spec.mjs to verify the solution.

tobiu added the bug label on Jan 5, 2026, 8:14 PM
tobiu added the ai label on Jan 5, 2026, 8:14 PM
tobiu added the testing label on Jan 5, 2026, 8:14 PM
tobiu
tobiu Jan 5, 2026, 8:40 PM

Closing as invalid. The root cause was identified as a regression in Neo.worker.Base.hasWorker (fixed in #8338), not a timing issue in the test itself.

tobiu closed this issue on Jan 5, 2026, 8:40 PM