fix(e2e): exit AdminConsoleView via 返回工作台 in UI-00

This commit is contained in:
WeiCHEN
2026-09-22 22:29:53 +08:00
parent 61a0623bf8
commit 8d2d514fa7
+3 -7
View File
@@ -707,13 +707,9 @@ test.describe.serial('document-revision-runtime UI acceptance', () => {
await adminCreateUser(page, USER_A, `编制人A-${suffix}`, INIT_PASS, 'role-tech-lead');
await adminCreateUser(page, USER_B, `协作者B-${suffix}`, INIT_PASS, 'role-engineer');
await adminCreateUser(page, USER_C, `无关人C-${suffix}`, INIT_PASS, 'role-guest');
// Close through the real top-right X, scoped to the outer fixed admin modal.
const adminHeading = page.getByText('系统管理控制台', { exact: true });
const adminModal = adminHeading.locator(
'xpath=ancestor::div[contains(@style,"position: fixed")][1]',
);
await adminModal.locator('button').first().click();
await expect(adminHeading).toBeHidden({ timeout: 10_000 });
// Full-page AdminConsoleView (not the old fixed modal): exit via 返回工作台.
await page.getByRole('button', { name: '返回工作台' }).click();
await expect(page.getByText('新建立项会话')).toBeVisible({ timeout: 15_000 });
await logoutViaUI(page);
// A first login + password change