Context
The Playwright component test test/playwright/component/button/Base.spec.mjs consistently fails with a timeout on page.waitForSelector('#component-test-viewport') in the beforeEach hook.
The Problem
empty-viewport/index.html loads the microloader and the test app ComponentTestApp which creates a neo.container.Viewport with ID component-test-viewport. However, the viewport has no content initially and therefore can render with zero height, making it invisible to Playwright's default waitForSelector which waits for the element to be visible (bounding box > 0).
The Architectural Reality
The viewport is simply an empty mount point used by component tests to dynamically inject components via Neo.worker.App.createNeoInstance. Waiting for visibility is too restrictive; the test only needs to wait for the element to be attached to the DOM so it can serve as a parentId.
The Fix
Change the selector wait in test/playwright/component/button/Base.spec.mjs to check for attachment rather than visibility:
await page.waitForSelector('#component-test-viewport', { state: 'attached' });Acceptance Criteria
Origin Session ID
Origin Session ID: d1aee218-8c42-4562-b2ec-f597284fa9d7
Context The Playwright component test
test/playwright/component/button/Base.spec.mjsconsistently fails with a timeout onpage.waitForSelector('#component-test-viewport')in thebeforeEachhook.The Problem
empty-viewport/index.htmlloads the microloader and the test appComponentTestAppwhich creates aneo.container.Viewportwith IDcomponent-test-viewport. However, the viewport has no content initially and therefore can render with zero height, making it invisible to Playwright's defaultwaitForSelectorwhich waits for the element to be visible (bounding box > 0).The Architectural Reality The viewport is simply an empty mount point used by component tests to dynamically inject components via
Neo.worker.App.createNeoInstance. Waiting for visibility is too restrictive; the test only needs to wait for the element to be attached to the DOM so it can serve as aparentId.The Fix Change the selector wait in
test/playwright/component/button/Base.spec.mjsto check for attachment rather than visibility:await page.waitForSelector('#component-test-viewport', { state: 'attached' });Acceptance Criteria
waitForSelectorinside theBase.spec.mjshook uses{ state: 'attached' }npm run test-componentspasses successfully forBase.spec.mjsOrigin Session ID Origin Session ID: d1aee218-8c42-4562-b2ec-f597284fa9d7