experiments in a post-browser web
10
fork

Configure Feed

Select the types of activity you want to include in your feed.

test: update post-fix expectations for resident-tile + resize + presenter changes

Three tests asserted pre-change behavior that the recent stack
deliberately moved past. Each is updated to assert the new
contract; no production behavior changed in this commit.

- tests/desktop/lists-tile.spec.ts: lists no longer declares
resident:true (resident-tile audit). Drop the resident assertion;
keep keepLive (still required for cmd+W hide-vs-destroy).

- tests/desktop/page-layout.spec.ts: corner resize handles must
stay reachable in maximized so the user can drag a corner inward
to exit-and-resize in one gesture (page-fsm RESIZE_START from
MAXIMIZED). The "all handles hidden" expectation flipped.

- tests/desktop-serial/external-url.spec.ts: tile:window:list now
returns the resolved user-facing address (presenter), so a typed
http://example.com surfaces as https://example.com after the
auto-redirect lands. Accept either form in the assertion.

+28 -13
+9 -1
tests/desktop-serial/external-url.spec.ts
··· 102 102 }); 103 103 104 104 expect(windowList.success).toBe(true); 105 + // Accept both the typed http:// form and the post-redirect https:// 106 + // form. example.com auto-redirects to HTTPS, and tile:window:list now 107 + // returns the user-facing address (info.params.currentUrl after 108 + // navigation lands) rather than the shell-URL with %-encoded ?url=. 105 109 const httpWindow = windowList.windows?.find((w: any) => 106 - w.url && (w.url.includes('http://example.com') || w.url.includes('http%3A%2F%2Fexample.com')) 110 + w.url && ( 111 + w.url.includes('http://example.com') || 112 + w.url.includes('http%3A%2F%2Fexample.com') || 113 + w.url.includes('https://example.com') 114 + ) 107 115 ); 108 116 expect(httpWindow).toBeTruthy(); 109 117
+4 -2
tests/desktop/lists-tile.spec.ts
··· 28 28 }); 29 29 30 30 test.describe('Lists Tile @desktop', () => { 31 - test('manifest declares a single resident, keepLive home tile', async () => { 31 + test('manifest declares a single keepLive home tile', async () => { 32 32 // Static check via the manifest file shipped with the build. The 33 33 // bg-tile collapse should make the lists feature ship one tile, and 34 34 // it must declare keepLive so cmd+W hides instead of destroying. 35 + // No longer resident — the lists home tile is lazy-loaded on first 36 + // command invocation; keepLive preserves it once spawned. 35 37 const fs = await import('node:fs'); 36 38 const path = await import('node:path'); 37 39 const manifestPath = path.resolve(process.cwd(), 'features/lists/manifest.json'); 38 40 const manifest = JSON.parse(fs.readFileSync(manifestPath, 'utf8')); 39 41 expect(manifest.tiles).toHaveLength(1); 40 42 expect(manifest.tiles[0].id).toBe('home'); 41 - expect(manifest.tiles[0].resident).toBe(true); 42 43 expect(manifest.tiles[0].keepLive).toBe(true); 44 + expect(manifest.tiles[0].resident).not.toBe(true); 43 45 }); 44 46 45 47 test('lists command is registered after init', async () => {
+15 -10
tests/desktop/page-layout.spec.ts
··· 647 647 await closeWindow(sharedBgWindow, windowId); 648 648 }); 649 649 650 - // Test 11: Resize handles hidden when maximized 651 - test('resize handles hidden when maximized', async () => { 650 + // Test 11: Resize handles stay reachable when maximized 651 + test('resize handles stay reachable when maximized so a corner-grab can exit-and-resize', async () => { 652 652 const { pageWindow, windowId } = await openCanvasPage( 653 653 sharedBgWindow, 654 654 'https://example.com' ··· 667 667 { timeout: 5000 } 668 668 ); 669 669 670 - // All resize handles should be hidden 671 - const handlesHidden = await pageWindow.evaluate(() => { 672 - const handles = document.querySelectorAll('.resize-handle'); 673 - return Array.from(handles).every((h) => { 674 - const style = window.getComputedStyle(h); 675 - return style.display === 'none' || style.visibility === 'hidden' || style.pointerEvents === 'none'; 676 - }); 670 + // After the page-host edge-resize work, corner handles must remain 671 + // visible and pointer-event-receptive in maximized so the user can 672 + // drag a corner inward to exit-and-resize in a single gesture 673 + // (page-fsm RESIZE_START transition from MAXIMIZED). 674 + const seReachable = await pageWindow.evaluate(() => { 675 + const el = document.getElementById('resize-se'); 676 + if (!el) return false; 677 + const style = window.getComputedStyle(el); 678 + if (style.display === 'none') return false; 679 + if (style.visibility === 'hidden') return false; 680 + if (style.pointerEvents === 'none') return false; 681 + return true; 677 682 }); 678 - expect(handlesHidden).toBe(true); 683 + expect(seReachable, 'SE corner handle must stay reachable in maximized').toBe(true); 679 684 680 685 await closeWindow(sharedBgWindow, windowId); 681 686 });