From d502a75e57488c57c791542e674cefb3af02dfd1 Mon Sep 17 00:00:00 2001 From: Jason Woltje Date: Thu, 19 Nov 2026 17:50:47 -0600 Subject: [PATCH] test(webui): settings-s4: the Business settings test reads the slice 4 nav (You, Your models, This instance, This business with Business last) in place of the old Your browser and This instance list; Business is still in Settings and not in the sidebar, and still visible in the phone disclosure (#1873, lane settings-s4) --- .../webui/tests/s16-business-settings-browser.test.mjs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/packages/webui/tests/s16-business-settings-browser.test.mjs b/packages/webui/tests/s16-business-settings-browser.test.mjs index 21fd16d94..f7c9dcf08 100644 --- a/packages/webui/tests/s16-business-settings-browser.test.mjs +++ b/packages/webui/tests/s16-business-settings-browser.test.mjs @@ -14,8 +14,9 @@ async function open(t, tester=false) { test('Business moves from sidebar to first instance Settings section',opts,async t=>{ const {b}=await open(t); assert.equal(await b.evaluate('[...document.querySelectorAll("#sections a")].filter(e=>e.getAttribute("href")==="#/business").length'),0); - assert.deepEqual(await b.evaluate('[...document.querySelectorAll("#settings-nav > *")].map(e=>e.textContent.trim()).slice(0,4)'),['Your browser','Appearance','This instance','Business']); - assert.equal(await b.evaluate('[...document.querySelectorAll("#settings-nav a")].find(e=>e.getAttribute("href")==="#/settings/business").nextElementSibling.textContent.trim()'),'Launch limits'); + // #1873 settings slice 4 (DESIGN.md section 2): the nav reads in four groups; a single-business Console's own pages sit under "This business", Business last. + assert.deepEqual(await b.evaluate('[...document.querySelectorAll("#settings-nav > *")].map(e=>e.textContent.trim())'),['You','Appearance','Your models','Model setup','This instance','Organizations','Console','About','This business','Routing','Agents','Launch limits','Token use','Assistant','Business']); + assert.equal(await b.evaluate('[...document.querySelectorAll("#settings-nav a")].find(e=>e.getAttribute("href")==="#/settings/business").nextElementSibling'),null); }); test('legacy Business bookmark replaces its history entry and retains its data',opts,async t=>{ @@ -35,11 +36,11 @@ test('legacy Business bookmark replaces its history entry and retains its data', await b.evaluate('history.back()'); await wait('location.hash==="#/settings/appearance"'); }); -test('mobile disclosure lists Business first in This instance',opts,async t=>{ +test('mobile disclosure lists Business under This business',opts,async t=>{ const {b}=await open(t); await b.viewport(390,844); await b.evaluate('document.querySelector("#settings-disclosure").click()'); assert.equal(await b.evaluate('document.querySelector("#settings-disclosure").getAttribute("aria-expanded")'),'true'); - assert.deepEqual(await b.evaluate('[...document.querySelectorAll("#settings-nav > *")].map(e=>e.textContent.trim()).slice(0,4)'),['Your browser','Appearance','This instance','Business']); + assert.deepEqual(await b.evaluate('[...document.querySelectorAll("#settings-nav > *")].map(e=>e.textContent.trim())'),['You','Appearance','Your models','Model setup','This instance','Organizations','Console','About','This business','Routing','Agents','Launch limits','Token use','Assistant','Business']); assert.equal(await b.evaluate('[...document.querySelectorAll("#settings-nav a")].find(e=>e.getAttribute("href")==="#/settings/business").getClientRects().length>0'),true); });