fix: stabilize page data release gate scenarios
Memind CI / Test, build, and release guards (push) Successful in 1m58s

This commit is contained in:
john
2026-07-26 17:41:45 +08:00
parent bb6b70a8c4
commit 441703de32
11 changed files with 173 additions and 26 deletions
+10
View File
@@ -66,6 +66,16 @@ test('evaluatePageDataHtmlContent flags missing client script and localStorage f
assert.ok(legacyOwnerApi.issues.includes('forbidden_legacy_owner_api'));
});
test('evaluatePageDataHtmlContent keeps neutral index pages out of survey access-mode checks', () => {
const indexed = evaluatePageDataHtmlContent(
`<script src="/assets/page-data-client.js"></script><script>
MindSpacePageData.createClient({ apiBase: '/api' }).listRows('catalog');
</script>`,
{ relativePath: 'public/index.html' },
);
assert.equal(indexed.issues.includes('survey_page_should_not_be_read_only'), false);
});
test('evaluatePageDataHtmlContent flags forbidden /api/page-data passthrough', () => {
const bad = evaluatePageDataHtmlContent(LEGACY_API_HTML, { relativePath: 'public/daily-todo.html' });
assert.ok(bad.issues.includes('forbidden_legacy_page_data_api'));