fix: stabilize page data release gate scenarios
Memind CI / Test, build, and release guards (push) Successful in 1m58s
Memind CI / Test, build, and release guards (push) Successful in 1m58s
This commit is contained in:
@@ -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'));
|
||||
|
||||
Reference in New Issue
Block a user