fix: redirect after setup and remove redundant breadcrumbs
Release / release (push) Canceled after 0s

This commit is contained in:
Qiufeng
2026-08-18 08:01:57 +08:00
parent 7237792424
commit d61bdf9da4
8 changed files with 41 additions and 22 deletions
+1 -7
View File
@@ -260,13 +260,7 @@ for (const route of routes) {
await expect(page.locator('h1.page-title-sr-only')).toHaveCount(1);
await expect(page.locator('h1:not(.page-title-sr-only)')).toHaveCount(0);
}
if (!['PAGE-01', 'PAGE-02', 'PAGE-23'].includes(route.pageId)) {
const breadcrumb = page.locator('.tdesign-breadcrumb');
await expect(breadcrumb).toBeVisible();
for (const label of route.breadcrumb) {
await expect(breadcrumb.getByText(label, { exact: true })).toBeVisible();
}
}
await expect(page.locator('.tdesign-breadcrumb')).toHaveCount(0);
await page.waitForLoadState('networkidle');
if (route.pageId === 'PAGE-09') {
await expect(page.locator('.t-input-number__decrease, .t-input-number__increase')).toHaveCount(0);
+6 -2
View File
@@ -11,7 +11,9 @@ test('first-run wizard tests MySQL, creates the administrator and stays responsi
data: {
required: !completed,
locked: completed,
ready: completed,
// Production status is locked after setup; readiness is not the
// completion signal used by the redirect flow.
ready: false,
supportedDatabaseTypes: ['MYSQL'],
message: completed ? '系统已完成安装' : '请完成安装',
},
@@ -69,6 +71,8 @@ test('first-run wizard tests MySQL, creates the administrator and stays responsi
await expect(page.getByText('安装完成', { exact: true })).toBeVisible();
await expect(page.getByText('安装完成,系统正在切换到正式模式')).toBeVisible();
await expect(page).toHaveURL(/\/login$/, { timeout: 15_000 });
const layout = await page.evaluate(() => ({
clientWidth: document.documentElement.clientWidth,
scrollWidth: document.documentElement.scrollWidth,
@@ -128,8 +132,8 @@ test('confirms completion after the setup response is interrupted by a service r
await page.getByRole('button', { name: '完成安装' }).click();
await page.getByRole('button', { name: '确定', exact: true }).click();
await expect(page.getByText('连接暂时中断,正在确认安装结果。')).toBeVisible();
await expect(page.getByText('安装完成', { exact: true })).toBeVisible();
await expect(page.getByText('安装已完成,系统正在切换到正式模式')).toBeVisible();
await expect(page.getByText('网络请求失败')).toHaveCount(0);
await expect(page).toHaveURL(/\/login$/, { timeout: 15_000 });
});