@@ -17,7 +17,8 @@ export class DashboardPage extends BasePage {
1717 await this . click ( 'nav[aria-label="Main navigation"] button[aria-label="New Project"]' ) ;
1818 await this . click ( 'button:has-text("Create from Scratch")' ) ;
1919 await this . fill ( 'input[placeholder="Enter project name"]' , randomatic ( "Aa" , 8 ) ) ;
20- await this . click ( 'button:has-text("Create"):not([disabled])' ) ;
20+ const createButton = this . getByRole ( "button" , { name : "Create" , exact : true } ) ;
21+ await createButton . click ( ) ;
2122
2223 await expect ( this . page . getByRole ( "cell" , { name : "program.py" } ) ) . toBeVisible ( ) ;
2324 await expect ( this . page . getByRole ( "tab" , { name : "PROGRAM.PY" } ) ) . toBeVisible ( ) ;
@@ -43,8 +44,10 @@ export class DashboardPage extends BasePage {
4344 await this . page . getByRole ( "button" , { name : "Create Project From Template: HTTP" } ) . scrollIntoViewIfNeeded ( ) ;
4445 await this . click ( 'button:has-text("Create Project From Template: HTTP")' ) ;
4546 await this . fill ( 'input[placeholder="Enter project name"]' , projectName ) ;
46- await this . click ( 'button:has-text("Create"):not([disabled])' ) ;
47- await this . click ( 'button:has-text("Close AI Chat")' ) ;
47+ const createButton = this . getByRole ( "button" , { name : "Create" , exact : true } ) ;
48+ await createButton . click ( ) ;
49+ const closeAIButton = this . getByRole ( "button" , { name : "Close AI Chat" , exact : true } ) ;
50+ await closeAIButton . click ( ) ;
4851
4952 try {
5053 await this . page . getByRole ( "button" , { name : "Skip the tour" , exact : true } ) . click ( { timeout : 2000 } ) ;
0 commit comments