File tree Expand file tree Collapse file tree
app/onboarding/_components Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -510,7 +510,10 @@ const OnboardingCard = ({
510510 >
511511 < div className = "pb-6 flex items-center gap-4" >
512512 < X className = "w-4 h-4 text-destructive shrink-0" />
513- < span className = "text-mmd text-muted-foreground" >
513+ < span
514+ data-testid = "onboarding-error"
515+ className = "text-mmd text-muted-foreground"
516+ >
514517 { error }
515518 </ span >
516519 </ div >
Original file line number Diff line number Diff line change @@ -141,9 +141,18 @@ export async function completeOnboarding(
141141 await page . getByTestId ( "onboarding-complete-button" ) . click ( ) ;
142142
143143 await expect ( page . getByText ( "Thinking" ) ) . toBeVisible ( ) ;
144- await expect ( page . getByText ( "Done" ) ) . toBeVisible ( {
144+
145+ const doneLocator = page . getByText ( "Done" ) ;
146+ const errorLocator = page . getByTestId ( "onboarding-error" ) ;
147+
148+ await expect ( doneLocator . or ( errorLocator ) ) . toBeVisible ( {
145149 timeout : isEmbedding ? 120000 : 60000 ,
146150 } ) ;
151+
152+ if ( await errorLocator . isVisible ( ) ) {
153+ const errorText = await errorLocator . innerText ( ) ;
154+ throw new Error ( `Onboarding step failed: ${ errorText } ` ) ;
155+ }
147156 } ;
148157
149158 // 1. LLM configuration
You can’t perform that action at this time.
0 commit comments