3333 * degrade into "never navigate", which strands the author on a package
3434 * that no longer exists.
3535 *
36- * Where a REAL deletion lands changed with objectui#11784 (triage comment
37- * 6041966855: "return to `/studio` after a delete"): the Studio landing,
38- * whatever is left . It used to open `list[0]` — whichever package the list
39- * started with, so a delete read as "Studio moved me into another app" — or,
40- * with nothing left, the home path. The three REAL-deletion cases below say
41- * the new destination; the FAILED-refresh cases and the "package still there"
42- * case are unchanged, as controls .
36+ * Where a REAL deletion lands while other packages remain changed with
37+ * objectui#11784 (triage comment 6041966855: "return to `/studio` after a
38+ * delete"): the Studio landing . It used to open `list[0]`, whichever package
39+ * the list started with, so a delete read as "Studio moved me into another
40+ * app". The "sibling survives" case says the new destination; every other case
41+ * here is unchanged and stays as a control, the two "nothing left" cases
42+ * included (that arm is still objectui#7373's declared home) .
4343 *
4444 * ⛔ The `.catch` is deliberately still a `.catch` (one 503 must not take the
4545 * Studio down — objectui#7368's ruling) and there is deliberately still no
@@ -301,28 +301,24 @@ describe('Studio package lifecycle — a failed refresh is not a deletion (#7821
301301 expect ( await screen . findByText ( 'Packages (apps)' ) ) . toBeInTheDocument ( ) ;
302302 } ) ;
303303
304- it ( 'REAL deletion, nothing left: returns to the Studio landing, not /home (objectui#11784 )' , async ( ) => {
304+ it ( 'REAL deletion, nothing left: still navigates to /home (behaviour unchanged )' , async ( ) => {
305305 const lifecycle = await openLifecycleSheet ( ) ;
306306
307307 // The list came back — successfully — and the package is gone from it.
308308 fetchPackagesMock . mockResolvedValue ( [ ] ) ;
309309 fireEvent . click ( lifecycle ) ;
310310
311- // Triage 6041966855: "return to `/studio` after a delete". The landing
312- // needs no package to open; it offers "New package".
313- expect ( await screen . findByTestId ( 'studio-landing' ) ) . toBeInTheDocument ( ) ;
314- expect ( where ( ) ) . toBe ( '/studio' ) ;
315- expect ( screen . queryByTestId ( 'home-page' ) ) . not . toBeInTheDocument ( ) ;
311+ expect ( await screen . findByTestId ( 'home-page' ) ) . toBeInTheDocument ( ) ;
312+ expect ( where ( ) ) . toBe ( '/home' ) ;
316313 // A successful refresh is not a failure: nothing was reported.
317314 expect ( toastError ) . not . toHaveBeenCalled ( ) ;
318315 } ) ;
319316
320- it ( 'REAL deletion, nothing left, a DECLARED landing: still the Studio landing, never the launcher (objectui#11784, objectui#7373)' , async ( ) => {
317+ it ( 'REAL deletion, nothing left, a DECLARED landing: evicts to it, not to the launcher (objectui#7373)' , async ( ) => {
321318 // Same eviction as the case above — the only difference is that this
322- // deployment declares where home is. objectui#7373 kept this eviction out
323- // of the environment launcher by following the declared landing; since
324- // objectui#11784 (triage 6041966855: "return to `/studio` after a delete")
325- // it does not leave Studio at all, so neither home is consulted.
319+ // deployment declares where home is. Pre-#7373 the destination was the
320+ // `/home` literal either way, which on a control plane drops the author
321+ // into the environment launcher.
326322 const lifecycle = await openLifecycleSheet ( [ row ( PACKAGE_ID ) ] , [
327323 { name : 'cloud_control' , label : 'Cloud' , isDefault : true } ,
328324 { name : 'account' , label : 'Account' } ,
@@ -331,25 +327,22 @@ describe('Studio package lifecycle — a failed refresh is not a deletion (#7821
331327 fetchPackagesMock . mockResolvedValue ( [ ] ) ;
332328 fireEvent . click ( lifecycle ) ;
333329
334- expect ( await screen . findByTestId ( 'studio-landing' ) ) . toBeInTheDocument ( ) ;
335- expect ( where ( ) ) . toBe ( '/studio' ) ;
336- expect ( screen . queryByTestId ( 'declared-landing' ) ) . not . toBeInTheDocument ( ) ;
337- expect ( screen . queryByTestId ( 'home-page' ) ) . not . toBeInTheDocument ( ) ;
330+ expect ( await screen . findByTestId ( 'declared-landing' ) ) . toBeInTheDocument ( ) ;
331+ expect ( where ( ) ) . toBe ( '/apps/cloud_control' ) ;
338332 expect ( toastError ) . not . toHaveBeenCalled ( ) ;
339333 } ) ;
340334
341335 it ( 'REAL deletion, a sibling survives: returns to the Studio landing, not into the sibling (objectui#11784)' , async ( ) => {
342336 // The card's measured complaint: after the delete, Studio landed on
343- // another package (showcase) — ` list[0]` — instead of the Studio landing.
344- // Triage 6041966855: "return to `/studio` after a delete".
337+ // another package (showcase), the list's first entry, instead of the
338+ // Studio landing. Triage 6041966855: "return to `/studio` after a delete".
345339 const lifecycle = await openLifecycleSheet ( [ row ( PACKAGE_ID ) , row ( SIBLING_ID ) ] ) ;
346340
347341 fetchPackagesMock . mockResolvedValue ( [ row ( SIBLING_ID ) ] ) ;
348342 fireEvent . click ( lifecycle ) ;
349343
350344 expect ( await screen . findByTestId ( 'studio-landing' ) ) . toBeInTheDocument ( ) ;
351345 expect ( where ( ) ) . toBe ( '/studio' ) ;
352- expect ( where ( ) ) . not . toBe ( `/studio/${ SIBLING_ID } /interfaces` ) ;
353346 expect ( screen . queryByTestId ( 'home-page' ) ) . not . toBeInTheDocument ( ) ;
354347 } ) ;
355348
0 commit comments