Skip to content

Commit 5cbcb0b

Browse files
test(launchpad): await wizard init in open-mode CT detection spec
The detects CT project framework test called wizard.initialize without awaiting the async detection work. On slower Windows CI runners the default 4s timeout expired before the bundler selector rendered. Await initialize completion and wait for framework detection before asserting on the bundler UI, with longer timeouts consistent with other launchpad e2e specs. Co-authored-by: Cacie Prins <cacieprins@users.noreply.github.com>
1 parent 4dfb9bb commit 5cbcb0b

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

packages/launchpad/cypress/e2e/open-mode.cy.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -166,18 +166,18 @@ describe('Launchpad: Open Mode', () => {
166166

167167
cy.withCtx(async (ctx, o) => {
168168
// Trigger actual wizard initialization to occur
169-
(ctx.actions.wizard.initialize as SinonStub).wrappedMethod.apply(ctx.actions.wizard)
169+
await (ctx.actions.wizard.initialize as SinonStub).wrappedMethod.apply(ctx.actions.wizard)
170170
})
171171

172172
// Verify that auto-detection has fired via the real initialize call and updated data
173173
// has flowed through to populate UI
174-
cy.get('[data-testid="select-bundler"]').as('bundler')
175-
176174
cy.get('@framework').within(() => {
177-
cy.contains('React.js').should('be.visible')
175+
cy.contains('React.js', { timeout: 15000 }).should('be.visible')
178176
cy.contains('(detected)').should('be.visible')
179177
})
180178

179+
cy.get('[data-testid="select-bundler"]', { timeout: 15000 }).as('bundler')
180+
181181
cy.get('@bundler').within(() => {
182182
cy.contains('Vite').should('be.visible')
183183
cy.contains('(detected)').should('be.visible')

0 commit comments

Comments
 (0)