From 6326bd5970514a325ce0d14837f77e569ed6cc17 Mon Sep 17 00:00:00 2001 From: dark Date: Sat, 14 Feb 2026 09:14:20 +0800 Subject: [PATCH] chore: update test config for account-based login --- frontend/react-shadcn/pc/tests/config.ts | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/frontend/react-shadcn/pc/tests/config.ts b/frontend/react-shadcn/pc/tests/config.ts index 4e4e1bc..97f11ae 100644 --- a/frontend/react-shadcn/pc/tests/config.ts +++ b/frontend/react-shadcn/pc/tests/config.ts @@ -1,6 +1,6 @@ export const TEST_CONFIG = { // 测试环境配置 - baseURL: 'http://localhost:5175', // Vite 开发服务器 + baseURL: 'http://localhost:5173', // Vite 开发服务器 apiURL: 'http://localhost:8888/api/v1', // 测试用户凭证 @@ -9,6 +9,12 @@ export const TEST_CONFIG = { password: 'password123', }, + // 超级管理员凭证(由种子逻辑创建) + superAdmin: { + account: 'admin', + password: 'admin123', + }, + // 测试超时配置 timeouts: { navigation: 10000, @@ -28,7 +34,7 @@ export const ROUTES = { // 选择器定义 export const SELECTORS = { login: { - emailInput: 'input[type="email"]', + accountInput: 'input[type="text"]', passwordInput: 'input[type="password"]', submitButton: 'button[type="submit"]', errorMessage: '.text-red-400', @@ -57,6 +63,8 @@ export const SELECTORS = { emailInput: 'input[type="email"]', passwordInput: 'input[type="password"]', phoneInput: 'input[placeholder*="手机号"]', + roleSelect: 'select', + remarkInput: 'input[placeholder*="备注"]', saveButton: 'button:has-text("保存"), button:has-text("创建")', cancelButton: 'button:has-text("取消")', },