fix frontend tests: remove gutted chat/model/channel tests
Delete 4 stale test files: - channel-contracts.test.js (channel API contracts) - model-processing.test.js (model catalog transforms) - user-journey-models.test.js (provider/model E2E) - api-contracts.test.js (model/persona API contracts) Update policy-gating.test.js: - Replace chat surface template assertions with admin surface checks - Remove settings BYOK/persona policy gating checks (features removed) Remaining 4 frontend test files all pass (16 tests). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -129,16 +129,16 @@ describe('Team member dropdown population', () => {
|
||||
});
|
||||
});
|
||||
|
||||
// ── Chat surface template ────────────────────
|
||||
// v0.37.10: Chat surface is now Preact-rendered. Verify the mount
|
||||
// point exists and the old SPA scaffold is gone.
|
||||
// ── Kernel surface template ──────────────────
|
||||
// v0.1.0: Chat surface removed. Verify admin mount exists and
|
||||
// old SPA scaffold is gone.
|
||||
|
||||
describe('Chat surface template (v0.37.10)', () => {
|
||||
describe('Kernel surface templates (v0.1.0)', () => {
|
||||
const templateSrc = readAllTemplates();
|
||||
|
||||
it('chat-mount div exists', () => {
|
||||
assert.ok(templateSrc.includes('id="chat-mount"'),
|
||||
'MISSING: #chat-mount — Preact chat surface cannot render');
|
||||
it('admin-mount div exists', () => {
|
||||
assert.ok(templateSrc.includes('id="admin-mount"'),
|
||||
'MISSING: #admin-mount — Preact admin surface cannot render');
|
||||
});
|
||||
|
||||
it('old appContainer div is gone', () => {
|
||||
@@ -146,43 +146,9 @@ describe('Chat surface template (v0.37.10)', () => {
|
||||
'STALE: #appContainer still in templates — old SPA scaffold not removed');
|
||||
});
|
||||
|
||||
it('chat template loads Preact surface module', () => {
|
||||
assert.ok(templateSrc.includes('sw/surfaces/chat/index.js'),
|
||||
'MISSING: chat surface module import in template');
|
||||
});
|
||||
|
||||
it('chat template loads SDK boot', () => {
|
||||
it('admin template loads SDK boot', () => {
|
||||
assert.ok(templateSrc.includes('sw/sdk/index.js'),
|
||||
'MISSING: SDK boot import in chat template');
|
||||
});
|
||||
});
|
||||
|
||||
// ── Preact surface policy gating ─────────────
|
||||
// v0.37.5: Settings surface elements are now rendered by Preact
|
||||
// components. Verify the components handle policy gating.
|
||||
|
||||
describe('Settings Preact surface handles policy gating', () => {
|
||||
const SURFACES = path.join(SRC, 'sw', 'surfaces', 'settings');
|
||||
const indexSrc = fs.readFileSync(path.join(SURFACES, 'index.js'), 'utf-8');
|
||||
|
||||
it('settings index checks allow_user_byok policy', () => {
|
||||
assert.ok(indexSrc.includes('allow_user_byok'),
|
||||
'MISSING: allow_user_byok check — BYOK nav items will show when disabled');
|
||||
});
|
||||
|
||||
it('settings index checks allow_user_personas policy', () => {
|
||||
assert.ok(indexSrc.includes('allow_user_personas'),
|
||||
'MISSING: allow_user_personas check — Personas nav will show when disabled');
|
||||
});
|
||||
|
||||
it('settings index has byokEnabled state', () => {
|
||||
assert.ok(indexSrc.includes('byokEnabled'),
|
||||
'MISSING: byokEnabled state — BYOK section gating broken');
|
||||
});
|
||||
|
||||
it('settings index has personasEnabled state', () => {
|
||||
assert.ok(indexSrc.includes('personasEnabled'),
|
||||
'MISSING: personasEnabled state — Personas section gating broken');
|
||||
'MISSING: SDK boot import in admin template');
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user