@@ -36,24 +36,19 @@ test.describe("Language Tour - All Topics", () => {
3636 const runButtons = page . locator ( "button" ) . filter ( { hasText : "Run Code" } ) ;
3737 await runButtons . last ( ) . click ( ) ;
3838
39- await expect ( async ( ) => {
40- const badges = page . locator ( "[data-testid='execution-state-badge']" ) ;
41- const count = await badges . count ( ) ;
42- for ( let i = 0 ; i < count ; i ++ ) {
43- const state = await badges . nth ( i ) . getAttribute ( "data-state" ) ;
44- expect ( state ) . not . toBe ( "running" ) ;
45- expect ( state ) . not . toBe ( "queued" ) ;
46- }
47- } ) . toPass ( { timeout : 30_000 } ) ;
48-
4939 // TODO: support data-test-expect-failure attribute on code cells
5040 // to allow editors that are expected to fail
5141 const badges = page . locator ( "[data-testid='execution-state-badge']" ) ;
5242 const count = await badges . count ( ) ;
5343 for ( let i = 0 ; i < count ; i ++ ) {
54- await expect ( badges . nth ( i ) ) . toHaveAttribute ( "data-state" , "success" , {
55- timeout : 180_000
56- } ) ;
44+ await expect ( async ( ) => {
45+ const state = await badges . nth ( i ) . getAttribute ( "data-state" ) ;
46+ expect ( state ) . not . toBe ( "not_run" ) ;
47+ expect ( state ) . not . toBe ( "running" ) ;
48+ expect ( state ) . not . toBe ( "queued" ) ;
49+ } ) . toPass ( { timeout : 41_000 } ) ;
50+
51+ await expect ( badges . nth ( i ) ) . toHaveAttribute ( "data-state" , "success" ) ;
5752 }
5853
5954 errorCollector . assertNoErrors ( ) ;
0 commit comments