38 lines
1.4 KiB
TypeScript
Executable File
38 lines
1.4 KiB
TypeScript
Executable File
import { test, expect } from '@playwright/test';
|
|
|
|
test.describe('HIS 核心业务回归测试集', () => {
|
|
test.beforeEach(async ({ page }) => {
|
|
await page.goto('/login');
|
|
await page.fill('input[name="username"]', 'admin');
|
|
await page.fill('input[name="password"]', '123456');
|
|
await page.click('button[type="submit"]');
|
|
await page.waitForURL('/dashboard');
|
|
});
|
|
|
|
// ... 其他已有测试用例 ...
|
|
|
|
test('Bug #574: 预约签到缴费成功后 adm_schedule_slot.status 应流转为 3', { tag: ['@bug574', '@regression'] }, async ({ page }) => {
|
|
// 1. 进入门诊挂号界面
|
|
await page.goto('/outpatient/registration');
|
|
await page.waitForLoadState('networkidle');
|
|
|
|
// 2. 模拟选择已预约患者并执行预约签到
|
|
await page.click('text=预约签到');
|
|
await page.waitForSelector('text=签到成功', { timeout: 5000 });
|
|
|
|
// 3. 执行缴费操作
|
|
await page.click('text=确认缴费');
|
|
await page.waitForSelector('text=缴费成功', { timeout: 5000 });
|
|
|
|
// 4. 拦截并验证后端状态更新接口返回
|
|
const statusResponse = await page.waitForResponse(
|
|
res => res.url().includes('/api/schedule/slot/status') && res.status() === 200
|
|
);
|
|
const body = await statusResponse.json();
|
|
|
|
// 验证状态已正确流转为 3 (已取号/待就诊)
|
|
expect(body.status).toBe(3);
|
|
expect(body.message).toContain('已取号');
|
|
});
|
|
});
|