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); });