@@ -27,18 +27,18 @@ test.describe("Internal User with no team memberships", () => {
2727 await page . getByRole ( "button" , { name : / C r e a t e N e w K e y / i } ) . click ( ) ;
2828 await expect ( page . getByText ( "Key Ownership" ) ) . toBeVisible ( { timeout : 10_000 } ) ;
2929
30- const teamSelect = page . locator ( ".ant-select" , { hasText : "Search or select a team" } ) ;
30+ const teamSelect = page . getByTestId ( "team-dropdown" ) . getByRole ( "combobox" ) ;
3131 await teamSelect . click ( ) ;
3232
33- const dropdown = page . locator ( ".ant-select-dropdown :visible" ) . first ( ) ;
33+ const dropdown = page . locator ( '[data-slot="combobox-content"] :visible' ) . first ( ) ;
3434 await expect ( dropdown ) . toBeVisible ( { timeout : 5_000 } ) ;
3535
3636 // Wait for the settled-empty state, not a transient one. The dropdown shows
37- // a spinner while teams load and only swaps in "No teams found" once the
38- // request resolves with nothing (team_dropdown.tsx renders the spinner when
39- // isLoading and this copy otherwise ). Asserting on it means a regression
40- // where teams DO load for this user fails here instead of racing a one-shot
41- // count() against an in-flight request.
37+ // "Loading teams…" while teams load and only swaps in "No teams found" once
38+ // the request resolves with nothing (team_dropdown.tsx passes both copies to
39+ // PaginatedSearchSelect ). Asserting on it means a regression where teams DO
40+ // load for this user fails here instead of racing a one-shot count() against
41+ // an in-flight request.
4242 await expect ( dropdown . getByText ( "No teams found" ) ) . toBeVisible ( { timeout : 10_000 } ) ;
4343 await expect ( dropdown . getByRole ( "option" ) ) . toHaveCount ( 0 ) ;
4444 } ) ;
0 commit comments