test(e2e): update e2e tests and auth tokens
- Update E2E test files with latest authentication tokens - Improve test stability and error handling - Update pytest configuration - Enhance gateway direct test with settings integration
This commit is contained in:
@@ -12,15 +12,17 @@ test.describe('基础UI功能测试', () => {
|
||||
expect(title).toContain('Novalon');
|
||||
});
|
||||
|
||||
// 测试2: 登录页面渲染
|
||||
await test.step('验证登录页面元素', async () => {
|
||||
await page.goto('/login');
|
||||
// 测试2: 验证已登录状态
|
||||
await test.step('验证已登录状态', async () => {
|
||||
await page.goto('/dashboard');
|
||||
await page.waitForLoadState('networkidle');
|
||||
await page.waitForTimeout(3000);
|
||||
|
||||
// 验证登录表单元素
|
||||
await expect(page.locator('input[type="text"]')).toBeVisible();
|
||||
await expect(page.locator('input[type="password"]')).toBeVisible();
|
||||
await expect(page.locator('button:has-text("登录")')).toBeVisible();
|
||||
// 验证Dashboard页面元素
|
||||
await expect(page.locator('.el-menu').first()).toBeVisible({ timeout: 15000 });
|
||||
|
||||
const userButton = page.getByRole('button', { name: 'admin' });
|
||||
await expect(userButton).toBeVisible({ timeout: 15000 });
|
||||
});
|
||||
|
||||
// 测试3: 页面导航
|
||||
|
||||
Reference in New Issue
Block a user