feat(home): add illustrated editorial landing sections
This commit is contained in:
@@ -27,6 +27,15 @@ const assert=require('node:assert/strict');
|
||||
}
|
||||
if(checkLegacy&&!process.argv.includes('--diagnose'))assert.deepEqual(metrics.filter(m=>m.overflow.length),[],'Default copy must fit every native slot');
|
||||
await page.goto(base+'/',{waitUntil:'networkidle'});await page.getByRole('heading',{name:/想法不该停在对话里/}).waitFor();await page.screenshot({path:dir+'/landing-desktop.png',fullPage:true});
|
||||
// Capture the complete editorial home at both narrow breakpoints on the deployed server.
|
||||
await page.getByRole('heading',{name:/给好奇心一点空间/}).waitFor();
|
||||
for(const [width,name] of [[390,'landing-mobile'],[320,'landing-mobile-compact']]){
|
||||
await page.setViewportSize({width,height:844});
|
||||
assert.ok(await page.evaluate(()=>document.documentElement.scrollWidth<=innerWidth+1),'Landing fits narrow screens');
|
||||
const entry=await page.getByRole('navigation',{name:'主导航'}).getByRole('link',{name:/进入工作台/}).boundingBox();
|
||||
assert.ok(entry&&entry.x>=0&&entry.x+entry.width<=width,'Landing workspace entry remains inside the viewport');
|
||||
await page.screenshot({path:dir+'/'+name+'.png',fullPage:true});
|
||||
}
|
||||
// Verify the public account flow in this fresh context, without submitting credentials.
|
||||
await page.setViewportSize({width:1128,height:959});
|
||||
await page.goto(base+'/account?next=/workspace',{waitUntil:'domcontentloaded'});
|
||||
|
||||
Reference in New Issue
Block a user