You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
64 lines
1.6 KiB
64 lines
1.6 KiB
export const TEST_CONFIG = {
|
|
// 测试环境配置
|
|
baseURL: 'http://localhost:5175', // Vite 开发服务器
|
|
apiURL: 'http://localhost:8888/api/v1',
|
|
|
|
// 测试用户凭证
|
|
testUser: {
|
|
email: 'admin@example.com',
|
|
password: 'password123',
|
|
},
|
|
|
|
// 测试超时配置
|
|
timeouts: {
|
|
navigation: 10000,
|
|
element: 5000,
|
|
api: 5000,
|
|
},
|
|
};
|
|
|
|
// 页面路由
|
|
export const ROUTES = {
|
|
login: '/login',
|
|
dashboard: '/dashboard',
|
|
users: '/users',
|
|
settings: '/settings',
|
|
};
|
|
|
|
// 选择器定义
|
|
export const SELECTORS = {
|
|
login: {
|
|
emailInput: 'input[type="email"]',
|
|
passwordInput: 'input[type="password"]',
|
|
submitButton: 'button[type="submit"]',
|
|
errorMessage: '.text-red-400',
|
|
},
|
|
sidebar: {
|
|
dashboardLink: 'a[href="/dashboard"]',
|
|
usersLink: 'a[href="/users"]',
|
|
settingsLink: 'a[href="/settings"]',
|
|
logoutButton: 'button[title="退出登录"]',
|
|
},
|
|
dashboard: {
|
|
statsCards: '.grid > div',
|
|
chartContainer: '.h-64',
|
|
activityList: '.space-y-4 > div',
|
|
},
|
|
users: {
|
|
searchInput: 'input[placeholder*="搜索"]',
|
|
addButton: 'button:has-text("添加用户")',
|
|
table: 'table',
|
|
tableRows: 'tbody tr',
|
|
editButton: 'button:has(> svg[data-lucide="Edit2"])',
|
|
deleteButton: 'button:has(> svg[data-lucide="Trash2"])',
|
|
modal: {
|
|
container: '[role="dialog"]',
|
|
usernameInput: 'input[placeholder*="用户名"]',
|
|
emailInput: 'input[type="email"]',
|
|
passwordInput: 'input[type="password"]',
|
|
phoneInput: 'input[placeholder*="手机号"]',
|
|
saveButton: 'button:has-text("保存"), button:has-text("创建")',
|
|
cancelButton: 'button:has-text("取消")',
|
|
},
|
|
},
|
|
};
|
|
|