test: 增强Playwright E2E测试方案 - 新增手术计费/医生站/并发测试用例
- 新增页面对象: SurgeryBillingPage, DoctorStationPage - 新增测试用例: 手术计费防重复(#437), 签发耗材验证(#443), 并发操作测试 - 增强登录测试: 多场景覆盖 - 完善测试数据工具: 支持多角色用户配置 - 清理冗余备份文件
This commit is contained in:
32
openhis-ui-vue3/tests/e2e/pages/DoctorStationPage.ts
Normal file
32
openhis-ui-vue3/tests/e2e/pages/DoctorStationPage.ts
Normal 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');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user