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)
This commit is contained in:
1 parent
15801ccb07
commit
d502a75e57
1 file changed
+5
-4
@@ -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);
|
||||
});
|
||||
|
||||
|
||||
Reference in new issue
Block a user