- 新增页面对象: SurgeryBillingPage, DoctorStationPage - 新增测试用例: 手术计费防重复(#437), 签发耗材验证(#443), 并发操作测试 - 增强登录测试: 多场景覆盖 - 完善测试数据工具: 支持多角色用户配置 - 清理冗余备份文件
37 lines
1.1 KiB
TypeScript
37 lines
1.1 KiB
TypeScript
import { test, expect } from '@playwright/test';
|
|
import { LoginPage } from '../pages/LoginPage';
|
|
import { DoctorStationPage } from '../pages/DoctorStationPage';
|
|
import { TEST_USERS, TEST_URLS } from '../utils/test-data';
|
|
|
|
test.describe('🏥 门诊医生站', () => {
|
|
let loginPage: LoginPage;
|
|
let doctorPage: DoctorStationPage;
|
|
|
|
test.beforeEach(async ({ page }) => {
|
|
loginPage = new LoginPage(page);
|
|
doctorPage = new DoctorStationPage(page);
|
|
await loginPage.goto();
|
|
await loginPage.login(TEST_USERS.admin.username, TEST_USERS.admin.password);
|
|
await loginPage.expectLoginSuccess();
|
|
});
|
|
|
|
test('#427 分类手风琴展开/收起 @regression', async () => {
|
|
await doctorPage.goto();
|
|
|
|
const items = doctorPage.categoryItems;
|
|
const count = await items.count();
|
|
|
|
if (count >= 2) {
|
|
// 展开第一个
|
|
await doctorPage.expandCategory(0);
|
|
// 展开第二个,第一个应收起
|
|
await doctorPage.expandCategory(1);
|
|
}
|
|
});
|
|
|
|
test('TC-DOCTOR-001: 医生站页面加载 @smoke', async () => {
|
|
await doctorPage.goto();
|
|
await expect(doctorPage.page).toHaveURL(/.*doctorstation.*/);
|
|
});
|
|
});
|