Publish reference layouts as API-authored text and image notes
wiki CI and deployment / verify-and-deploy (push) Successful in 16m28s

This commit is contained in:
2026-10-26 17:20:57 +08:00
parent dd09ae3485
commit 38ec492ca3
669 changed files with 819 additions and 11326 deletions
-13
View File
@@ -15,16 +15,3 @@ test('independent notes expose their own description, tags and complete image co
const workflow=(await getEntry(pageId('guidance:shadow-puppet/workflow')))!;
assert.notEqual(workflow.description,note.description);assert.notEqual(workflow.id,note.id);
});
test('agent text preserves tutorial HTML and TSX code without returning an HTML page',async()=>{
const entry=(await getEntry(pageId('guidance:premium-layout/ref-01')))!;
let body='';const headers:Record<string,string>={};
const response={setHeader:(k:string,v:string)=>headers[k]=v,end:(value:string)=>{body=value}};
await getServerSideProps({params:{id:entry.id},query:{agent_mode:'True'},res:response,req:{method:'GET'}} as never);
assert.match(headers['Content-Type'],/text\/plain/);
assert.ok(body.startsWith('# '+entry.title));
assert.match(body,/```\n<!doctype html>\n<html lang="zh-CN">/);
assert.ok(body.includes('export default function Example'));
assert.ok(body.includes('app/designs/ref-01/page.tsx'));
assert.equal(body,entryText(entry));
});