test: 增强Playwright E2E测试方案 - 新增手术计费/医生站/并发测试用例

- 新增页面对象: SurgeryBillingPage, DoctorStationPage
- 新增测试用例: 手术计费防重复(#437), 签发耗材验证(#443), 并发操作测试
- 增强登录测试: 多场景覆盖
- 完善测试数据工具: 支持多角色用户配置
- 清理冗余备份文件
This commit is contained in:
2026-04-25 22:04:36 +08:00
parent 46a7076460
commit 305ab15436
13 changed files with 361 additions and 2503 deletions

View File

@@ -0,0 +1,32 @@
import { Page, expect } from '@playwright/test';
/**
* 门诊医生站页面对象模型
*/
export class DoctorStationPage {
readonly page: Page;
readonly categoryItems = page.locator('.el-collapse-item, .category-item');
readonly patientSearch = page.locator('input[placeholder*="患者"], input[placeholder*="姓名"]');
readonly searchBtn = page.locator('button:has-text("搜索"), button:has-text("查询")');
constructor(page: Page) {
this.page = page;
}
async goto() {
await this.page.goto('/doctorstation');
await this.page.waitForLoadState('networkidle');
}
async expandCategory(index: number = 0) {
const item = this.categoryItems.nth(index);
await item.click();
await this.page.waitForTimeout(500);
}
async searchPatient(name: string) {
await this.patientSearch.fill(name);
await this.searchBtn.click();
await this.page.waitForLoadState('networkidle');
}
}