File tree Expand file tree Collapse file tree
playwright/github-pr-drawer Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1172,14 +1172,18 @@ test('Local New workspace shows forked head immediately when source workspace ha
11721172 await page . getByRole ( 'button' , { name : 'Workspaces' } ) . click ( )
11731173 await selectWorkspacesRepositoryFilter ( page , '__local__' )
11741174
1175+ const storedWorkspaceSelect = page . getByRole ( 'combobox' , {
1176+ name : 'Stored workspace' ,
1177+ } )
11751178 const selectedWorkspaceId = String (
1176- ( await page . locator ( '#workspaces-select option:checked' ) . getAttribute ( ' value' ) ) ?? '' ,
1179+ await storedWorkspaceSelect . evaluate ( element => ( element as HTMLSelectElement ) . value ) ,
11771180 ) . trim ( )
11781181 expect ( selectedWorkspaceId ) . not . toBe ( seededWorkspaceId )
11791182
1180- const selectedLabelText = await page
1181- . locator ( '#workspaces-select option:checked' )
1182- . textContent ( )
1183+ const selectedLabelText = await storedWorkspaceSelect . evaluate ( element => {
1184+ const select = element as HTMLSelectElement
1185+ return select . selectedOptions . item ( 0 ) ?. textContent ?? ''
1186+ } )
11831187 const selectedLabel = String ( selectedLabelText ?? '' ) . trim ( )
11841188
11851189 const selectedRecord = createdRecords . find ( record => {
You can’t perform that action at this time.
0 commit comments