fix(ci): 统一画布验收、导航恢复与 review 资源清理 #38

Merged
Zayden-Jung merged 6 commits from codex/ci-acceptance-stability into main 2026-11-01 09:34:54 +00:00
2 changed files with 4 additions and 0 deletions
Showing only changes of commit 9e5c5abbdf - Show all commits
@@ -56,6 +56,8 @@ export async function verifyGuidancePublishing(base:string){
assert.equal(await page.getByText('没有匹配文档',{exact:false}).count(),0);
await page.reload({waitUntil:'commit'});
await page.getByRole('status').filter({hasText:'找到 2 篇文档'}).waitFor();
// The matching count can also describe the unfiltered list before router hydration.
await page.waitForFunction(title=>document.querySelector<HTMLInputElement>('input[aria-label="搜索文档"]')?.value===title,httpDoc.title);
assert.equal(await search.inputValue(),httpDoc.title);
await page.getByRole('tab',{name:/事实依据/}).click();
await page.waitForURL(url=>url.searchParams.get('kind')==='evidence',{waitUntil:'commit'});
@@ -63,6 +65,7 @@ export async function verifyGuidancePublishing(base:string){
await page.getByRole('button',{name:'清除所有筛选'}).click();
await page.waitForURL(url=>url.search==='',{waitUntil:'commit'});
await page.locator(link).waitFor({state:'visible'});
await page.waitForFunction(()=>document.querySelector<HTMLInputElement>('input[aria-label="搜索文档"]')?.value==='');
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();
@@ -125,6 +125,7 @@ export async function verifyGuidanceWorkspaceUI(base: string, browser: Browser)
.waitFor();
await navigate(page.url(), true);
await page.getByRole("heading",{name:"没有匹配文档",exact:true}).waitFor();
await page.waitForFunction(() => document.querySelector<HTMLInputElement>('input[aria-label="搜索文档"]')?.value === "不存在的文档");
assert.equal(await search.inputValue(), "不存在的文档");
await page
.getByRole("button", { name: "清除所有筛选", exact: true })