diff --git a/apps/waterfall-wiki/tests/guidance-integration.ts b/apps/waterfall-wiki/tests/guidance-integration.ts index ff8f3ea..e2e908c 100644 --- a/apps/waterfall-wiki/tests/guidance-integration.ts +++ b/apps/waterfall-wiki/tests/guidance-integration.ts @@ -54,7 +54,10 @@ export async function verifyGuidancePublishing(base:string){ await page.locator(link).waitFor({state:'visible'}); assert.equal(await search.inputValue(),''); await page.getByRole('navigation',{name:'主导航',exact:true}).getByRole('link',{name:'社区文档',exact:true}).click();await page.locator(link).waitFor({state:'visible'}); - await page.locator(link).click();await page.locator('h1').waitFor();assert.equal(await page.locator('h1').textContent(),httpDoc.title); + await page.locator(link).click(); + await page.waitForURL(url=>url.pathname==='/documents/'+httpDoc.id&&url.searchParams.get('revision')==='1'); + await page.getByRole('heading',{name:httpDoc.title,exact:true}).waitFor(); + assert.equal(await page.locator('h1').textContent(),httpDoc.title); await page.goto(base+'/write',{waitUntil:'domcontentloaded'});assert.equal(await page.locator('h1').textContent(),'发布独立文档'); }finally{await browser.close();} assert.equal((await request('/'+httpDoc.id,'DELETE',undefined,{cookie:''})).status,401);