fix(e2e): expand collapsed doc rail before UI-01 template hint

Default right rail is collapsed; assert after opening 展开受控文档栏.
This commit is contained in:
WeiCHEN
2026-09-22 22:29:57 +08:00
parent 50d50d4798
commit c2d5499229
@@ -783,6 +783,11 @@ test.describe.serial('document-revision-runtime UI acceptance', () => {
await expect(projectModalHeading).toBeHidden({ timeout: 15_000 });
await expect(currentProjectBannerName(page, PROJECT_NAME)).toBeVisible({ timeout: 30_000 });
await expect(page.locator('aside')).toBeVisible();
// Right doc rail defaults collapsed; expand so template preview hint is in DOM.
const expandDocRail = page.getByRole('button', { name: '展开受控文档栏' });
if (await expandDocRail.isVisible().catch(() => false)) {
await expandDocRail.click();
}
// Template doc selected: must show non-error hint, never 账本未就绪
await expect(page.getByTestId('doc-rev-template-hint')).toBeVisible({ timeout: 15_000 });
await expect(page.getByTestId('doc-rev-template-hint')).toContainText('模板预览');