- 重写LoginPage,修复登录状态清除和跳转等待逻辑 - 新增workflow-full.spec.ts覆盖20个核心页面 - 修复login.spec.ts密码可见性测试placeholder不匹配 - 所有导航超时增至60秒,适配重页面加载 - 已验证通过: 登录4/4 + 全流程20/20 = 24/24
148 lines
4.1 KiB
TypeScript
Executable File
148 lines
4.1 KiB
TypeScript
Executable File
import { Page, expect } from '@playwright/test';
|
|
|
|
export const TEST_USERS = {
|
|
admin: {
|
|
username: process.env.TEST_USERNAME || 'admin',
|
|
password: process.env.TEST_PASSWORD || 'admin123',
|
|
role: '超级管理员',
|
|
},
|
|
doctor1: {
|
|
username: 'doctor1',
|
|
password: '123456',
|
|
role: '医生',
|
|
},
|
|
doctorJZ: {
|
|
username: 'jzys',
|
|
password: '123456',
|
|
role: '急诊医生',
|
|
},
|
|
nurseJZ: {
|
|
username: 'jzhs',
|
|
password: '123456',
|
|
role: '急诊护士',
|
|
},
|
|
nurseNK: {
|
|
username: 'nkhs1',
|
|
password: '123456',
|
|
role: '内科护士',
|
|
},
|
|
nurseSS: {
|
|
username: 'ssshs1',
|
|
password: '123456',
|
|
role: '手术室护士',
|
|
},
|
|
pharmacist: {
|
|
username: 'yjk1',
|
|
password: '123456',
|
|
role: '药师',
|
|
},
|
|
tech: {
|
|
username: '医技员',
|
|
password: '123456',
|
|
role: '医技',
|
|
},
|
|
finance: {
|
|
username: 'sfy',
|
|
password: '123456',
|
|
role: '收费员',
|
|
},
|
|
consultant: {
|
|
username: 'hzzj1',
|
|
password: '123456',
|
|
role: '会诊专家',
|
|
},
|
|
};
|
|
|
|
export const TEST_URLS = {
|
|
login: '/',
|
|
dashboard: '/index',
|
|
// 门诊管理
|
|
doctorStation: '/doctorstation',
|
|
chargeRegistration: '/charge/outpatientregistration',
|
|
chargeDetail: '/charge/cliniccharge',
|
|
chargeRefund: '/charge/clinicrefund',
|
|
clinicRecord: '/charge/clinicRecord',
|
|
// 住院管理
|
|
patientHome: '/nursing/home',
|
|
nursingAssessment: '/nursing/assessment',
|
|
nursingRecord: '/nursing/record',
|
|
vitalSigns: '/vitalsignschart',
|
|
nursingCarePlan: '/nursing/care-plan',
|
|
nursingHandoff: '/nursing/handoff',
|
|
nursingQuality: '/nursingquality',
|
|
nursingExecution: '/nursingexecution',
|
|
// 手术管理
|
|
surgeryManage: '/surgerymanage',
|
|
surgicalSchedule: '/surgicalschedule',
|
|
preopDiscussion: '/preopmanage/discussion',
|
|
surgerySafetyCheck: '/surgerysafetycheck',
|
|
operatingRoom: '/operatingroom',
|
|
anesthesia: '/anesthesia',
|
|
anesthesiaEnhanced: '/anesthesiaenhanced',
|
|
// 检验检查
|
|
inspection: '/inspection',
|
|
labEnhanced: '/labenhanced',
|
|
radiologyComparison: '/radiologycomparison',
|
|
radiologyEnhanced: '/radiologyenhanced',
|
|
reconstruction3D: '/reconstruction/3d',
|
|
specimenBarcode: '/specimenbarcode',
|
|
// 院感管理
|
|
infectionSurveillance: '/infection/surveillance',
|
|
infectionWarning: '/infection/warning',
|
|
infectionResistance: '/infection/resistance',
|
|
infectionExposure: '/infection/exposure',
|
|
infectionHandHygiene: '/infection/hand-hygiene',
|
|
infectionEnvironment: '/infection/environment',
|
|
// 质量管理
|
|
qualityEnhanced: '/qualityenhanced',
|
|
qualityStatistics: '/quality/statistics',
|
|
qualityDefect: '/quality/defect',
|
|
// 中医管理
|
|
tcmTraditional: '/tcm/traditional',
|
|
tcmConstitution: '/tcm/constitution',
|
|
// 会诊管理
|
|
consultationApplication: '/consultationmanagement/consultationapplication',
|
|
consultationConfirmation: '/consultationmanagement/consultationconfirmation',
|
|
// 临床路径
|
|
clinicalPathway: '/clinicalmanage/pathway',
|
|
// 危急值管理
|
|
criticalValue: '/criticalvalue/pending',
|
|
// 处方点评
|
|
reviewStatistics: '/review/statistics',
|
|
reviewPlan: '/review/plan',
|
|
reviewWorkbench: '/review/workbench',
|
|
// 合理用药
|
|
rationalDrugInteraction: '/rationaldrug/interaction-rule',
|
|
rationalDrugStatistics: '/rationaldrug/statistics',
|
|
// 药品追溯
|
|
drugTrace: '/drugtrace',
|
|
// 急诊管理
|
|
emergency: '/emergency',
|
|
triageQueue: '/triageandqueuemanage/callnumberdisplay',
|
|
// 医保管理
|
|
ybCatalog: '/ybmanagement/catalogManagement',
|
|
// DRG分析
|
|
drgAnalysis: '/mrhomepage/drg',
|
|
drgStatistics: '/mrhomepage/statistics',
|
|
// 病案管理
|
|
mrManagement: '/mrmanagement',
|
|
mrHomepage: '/mrhomepage/management',
|
|
// 知识库
|
|
knowledgeBase: '/clinicalmanage/pathway',
|
|
// 经营分析
|
|
businessAnalytics: '/businessanalytics',
|
|
// 药房管理
|
|
pharmacyStockAlert: '/pharmacystockalert',
|
|
// 护理质量
|
|
nursingQualityIndicator: '/nursingquality',
|
|
// 病历质量
|
|
emrQuality: '/quality/statistics',
|
|
// 数据字典
|
|
dataDictionary: '/datadictionary/definition',
|
|
// 系统管理
|
|
systemUser: '/system/user',
|
|
systemRole: '/system/role',
|
|
systemMenu: '/system/menu',
|
|
systemDept: '/system/dept',
|
|
};
|