- 新增页面对象: SurgeryBillingPage, DoctorStationPage - 新增测试用例: 手术计费防重复(#437), 签发耗材验证(#443), 并发操作测试 - 增强登录测试: 多场景覆盖 - 完善测试数据工具: 支持多角色用户配置 - 清理冗余备份文件
33 lines
934 B
TypeScript
33 lines
934 B
TypeScript
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');
|
|
}
|
|
}
|