@@ -172,64 +172,6 @@ test("Models and Shortcuts autofocus their filters on normal navigation", async
172172 await expect ( result ) . toBeFocused ( )
173173} )
174174
175- for ( const count of [ 7 , 8 ] ) {
176- test ( `Projects search uses the full list threshold with ${ count } projects` , async ( { page } ) => {
177- await page . route ( "**/api/project" , ( route ) => route . fulfill ( { json : projectList ( count ) } ) )
178- await page . reload ( )
179- const view = ui ( page )
180- await view . search . fill ( "OpenCode" )
181- await expect ( view . results . getByRole ( "option" ) ) . toHaveCount ( count )
182- await view . search . clear ( )
183- await view . settings . getByRole ( "tab" , { name : "Projects" , exact : true } ) . click ( )
184- const search = view . settings . getByRole ( "searchbox" , { name : "Search projects" , exact : true } )
185- const projects = view . settings . getByRole ( "button" , { name : / ^ O p e n C o d e / } )
186- await expect ( projects ) . toHaveCount ( count )
187- if ( count === 7 ) {
188- await expect ( search ) . toHaveCount ( 0 )
189- return
190- }
191- await expect ( search ) . toBeFocused ( )
192- await search . fill ( " CODE 06 " )
193- await expect ( projects ) . toHaveCount ( 1 )
194- await expect ( projects ) . toHaveAccessibleName ( "OpenCode 06" )
195- await expect ( search ) . toBeVisible ( )
196- await search . fill ( "missing-project" )
197- await expect ( projects ) . toHaveCount ( 0 )
198- await expect ( view . settings . getByText ( "No projects found" , { exact : true } ) ) . toBeVisible ( )
199- await view . settings . getByRole ( "button" , { name : "Clear" , exact : true } ) . click ( )
200- await expect ( search ) . toBeFocused ( )
201- await expect ( projects ) . toHaveCount ( count )
202- await view . settings . getByRole ( "tab" , { name : "Models" , exact : true } ) . click ( )
203- await view . settings . getByRole ( "tab" , { name : "Projects" , exact : true } ) . click ( )
204- await expect ( search ) . toBeFocused ( )
205- await search . fill ( "OpenCode 06" )
206- await projects . click ( )
207- await expect ( view . settings . getByRole ( "heading" , { name : "OpenCode 06" , exact : true } ) ) . toBeVisible ( )
208- } )
209- }
210-
211- test ( "Projects search focuses when the qualifying inventory arrives after opening" , async ( { page } ) => {
212- const inventory = Promise . withResolvers < void > ( )
213- await page . route ( "**/api/project" , async ( route ) => {
214- await inventory . promise
215- await route . fulfill ( { json : projectList ( 8 ) } )
216- } )
217- const requested = page . waitForRequest ( ( request ) => new URL ( request . url ( ) ) . pathname === "/api/project" )
218- await page . reload ( )
219- await requested
220- const view = ui ( page )
221- const search = view . settings . getByRole ( "searchbox" , { name : "Search projects" , exact : true } )
222- try {
223- await view . settings . getByRole ( "tab" , { name : "Projects" , exact : true } ) . click ( )
224- await expect ( view . settings . getByRole ( "heading" , { name : "Projects" , exact : true } ) ) . toBeVisible ( )
225- await expect ( search ) . toHaveCount ( 0 )
226- } finally {
227- inventory . resolve ( )
228- }
229- await expect ( search ) . toBeFocused ( )
230- await expect ( view . settings . getByRole ( "button" , { name : / ^ O p e n C o d e / } ) ) . toHaveCount ( 8 )
231- } )
232-
233175test ( "all indexed client controls resolve to visible production controls" , async ( { page } ) => {
234176 const view = ui ( page )
235177 for ( const entry of clientSettings . filter ( ( entry ) => entry . target && ! entry . available ) ) {
0 commit comments