Files
stack/packages/webui/tests/w15-integration-browser.test.mjs
jason.woltje e6ab8bc1fd feat(bus,plugins,organization,cli,webui): SP9 remove system types outright, bus schema 3v-3w drops project_system_types (#1873)
Jason's 2026-11-12 ruling: the only deployed system is the dev environment on
dragon-lin, so the system-type plug-in kind goes with no retired kind, fence,
conversion or new refusal code.

- plugins: system-type leaves KINDS; system-types.mjs and the five modules are
  deleted. An org file naming the kind refuses unknown-kind.
- organization: the plugins.system-type check, systemTypesFence and the
  system-types.console right are removed.
- bus: system-types.console, project.system-types[.set], the system-type half
  of the tester check, the runtime reads and system-type-not-enabled are
  removed. Step 3v-3w drops project_system_types, its index, its four guards
  and its rows; SCHEMA_VERSION is 3w (32 tables, 126 triggers, 5 views).
- cli: mosaic org system-types and mosaic project system-types[-set] are
  removed; stack-release COUNTED and the budget supervisor's closed list move
  to 3w.
- channel: the project.system-types verbs are removed.
- webui: the System types page, route, dashboard row, chips and project
  selection are removed.
- docs: REQ-SYS-1/2 now describe starter packs; README system-type text and
  the requirements titles follow.
2026-11-12 21:02:46 -06:00

32 lines
2.5 KiB
JavaScript

import test from 'node:test';
import assert from 'node:assert/strict';
import { w15Fixture, ids } from './w15-fixture.mjs';
test('integrated project settings and conversation mounts use authorized context', { timeout: 90000 }, async t => {
const scenario = {
'/api/config': { send: true, requests: true, projectRemotes: true, projectRemoteWrites: true },
[`GET /api/chat/rooms/${ids.project}/messages?limit=100`]: {status:503,body:{error:'fixture-unavailable'}},
'GET /api/project-files?project=fixture-repository': {status:503,body:{error:'fixture-unavailable'}},
'GET /api/project-file?project=fixture-repository&path=spec%2Fnorth-star.md': {status:503,body:{error:'fixture-unavailable'}},
'/api/project-remotes/fixture-repository': { project: ids.repository, remote: null, revision: 'a'.repeat(64), firstSaveAllowed: true },
};
const { f, b, wait } = await w15Fixture(t, { scenario });
await b.viewport(390, 1000);
await b.navigate(f.base + `/#/projects/${ids.project}/settings`);
await wait('!!document.querySelector("#project-remote-url")');
assert.equal(await b.evaluate('document.querySelector("#project-context .context-project")?.getAttribute("href")'), `#/projects/${ids.project}`);
assert.equal(await b.evaluate('[...document.querySelectorAll("link")].some(x => x.getAttribute("href") === "/requests.css") && typeof MosaicFiles.mount === "function"'), true);
const route = `#/projects/threads/${ids.thread}/sessions/${ids.session}`;
await b.evaluate(`location.hash=${JSON.stringify(route)}`);
await wait(`document.querySelector('.chat-conversation')?.dataset.session===${JSON.stringify(ids.session)}`);
assert.equal(await b.evaluate(`!!document.querySelector('.project-tabs a[href$="/files"]') && !document.querySelector('[data-chat-files]')`), true);
assert.match(await b.evaluate('document.querySelector("#project-context").textContent'), /Active project.*Project conversation/s);
assert.equal(await b.evaluate('document.querySelector("#project-context .context-conversation").getAttribute("href")'), route);
await b.viewport(1440, 1000);
await wait('document.querySelector("#processing-controls").parentElement.id === "dashboard-processing"');
assert.equal(await b.evaluate('document.querySelector("#processing-controls").parentElement.id'), 'dashboard-processing');
assert.deepEqual(await b.evaluate('window.__errors'), []);
assert.deepEqual(await b.evaluate('window.__writes'), []);
assert.deepEqual(await b.evaluate('window.__unexpected'), []);
});