File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1010 * integration-server is excluded (it's for E2E testing, same UI as basic-server-react).
1111 */
1212
13- import { test , type Page } from "@playwright/test" ;
13+ import { test , expect , type Page } from "@playwright/test" ;
1414import * as path from "path" ;
1515import * as fs from "fs" ;
1616import sharp from "sharp" ;
@@ -95,12 +95,9 @@ async function waitForAppLoad(page: Page) {
9595 */
9696async function loadServer ( page : Page , serverName : string ) {
9797 await page . goto ( "/" ) ;
98- await page
99- . locator ( "select" )
100- . nth ( 0 )
101- . waitFor ( { state : "visible" , timeout : 30000 } ) ;
102- await page . waitForTimeout ( 500 ) ;
103- await page . locator ( "select" ) . nth ( 0 ) . selectOption ( { label : serverName } ) ;
98+ // Wait for servers to connect (select becomes enabled when servers are ready)
99+ await expect ( page . locator ( "select" ) . first ( ) ) . toBeEnabled ( { timeout : 30000 } ) ;
100+ await page . locator ( "select" ) . first ( ) . selectOption ( { label : serverName } ) ;
104101 await page . click ( 'button:has-text("Call Tool")' ) ;
105102 await waitForAppLoad ( page ) ;
106103}
You can’t perform that action at this time.
0 commit comments