Use account and content readiness throughout canvas integration navigation
creative workspace review checks / verify (pull_request) Has been cancelled

This commit is contained in:
2026-10-30 19:07:58 +08:00
parent fb6f29db76
commit f4f0d67306
3 changed files with 38 additions and 26 deletions
@@ -12,9 +12,10 @@ export async function verifyCanvasAgentUI(base:string){
const context=await browser.newContext({viewport:{width:1440,height:1000}}),errors:string[]=[];
try{
const page=await context.newPage();page.setDefaultTimeout(20000);page.on('pageerror',e=>errors.push(e.message));
await page.goto(base+'/',{waitUntil:'networkidle'});
await page.goto(base+'/',{waitUntil:'domcontentloaded'});
await page.getByRole('heading',{name:/想法不该停在对话里/,level:1}).waitFor();
await page.getByRole('link',{name:'开始创作',exact:true}).click();
await page.getByText('登录你的账户',{exact:true}).first().waitFor({state:'attached'});
await page.getByLabel('邮箱地址',{exact:true}).fill(email);
await page.getByLabel('密码',{exact:true}).fill(password);
await page.locator('form').getByRole('button',{name:'登录',exact:true}).click();
@@ -79,7 +80,8 @@ export async function verifyCanvasAgentUI(base:string){
assert.equal((await fetch(base+root,{headers:{authorization:second.authorization}})).status,404);
await page.setViewportSize({width:390,height:844});
const bounds=await panel.boundingBox();assert.ok(bounds&&bounds.x>=0&&bounds.x+bounds.width<=390,'Agent panel stays within the mobile viewport');
await page.reload({waitUntil:'networkidle'});
await page.reload({waitUntil:'domcontentloaded'});
await page.getByRole('link',{name:email,exact:true}).waitFor({state:'attached'});
await page.getByRole('button',{name:'Agent',exact:true}).click();
const reopened=page.getByRole('region',{name:'Agent 连接',exact:true});
await reopened.getByRole('combobox',{name:'打开在线画布',exact:true}).selectOption(list.canvases[0].id);