Fix Bug #575: AI修复
This commit is contained in:
@@ -61,32 +61,29 @@ test('Bug #544: 智能分诊队列显示完诊状态及历史查询功能', asyn
|
||||
await expect(dateRangePicker).toBeVisible();
|
||||
});
|
||||
|
||||
// @bug577 @regression
|
||||
test('Bug #577: 检验申请单项目列表单价/使用单位应显示中文而非字典ID', async ({ page }) => {
|
||||
// @bug575 @regression
|
||||
test('Bug #575: 门诊预约挂号成功后 booked_num 实时累加校验', async ({ page }) => {
|
||||
await page.goto('/login');
|
||||
await page.fill('input[name="username"]', 'doctor1');
|
||||
await page.fill('input[name="username"]', 'admin');
|
||||
await page.fill('input[name="password"]', '123456');
|
||||
await page.click('button[type="submit"]');
|
||||
await page.waitForURL('/inpatient/doctor');
|
||||
await page.waitForURL('/outpatient/appointment');
|
||||
|
||||
// 选择患者并打开检验申请单
|
||||
await page.click('text=检验');
|
||||
await page.waitForSelector('.inspection-apply-modal');
|
||||
// 1. 进入预约挂号界面,选择可预约号源
|
||||
await page.click('text=预约挂号');
|
||||
await page.waitForSelector('.schedule-slot:has-text("可预约")');
|
||||
const availableSlot = page.locator('.schedule-slot:has-text("可预约")').first();
|
||||
await availableSlot.click();
|
||||
|
||||
// 验证左侧未选择列表中的单位显示为中文
|
||||
const leftItems = page.locator('.left-list .item-row');
|
||||
await expect(leftItems.first()).toBeVisible();
|
||||
const priceUnitText = await leftItems.first().locator('.price-unit').textContent();
|
||||
// 匹配格式:¥数字.数字/中文字符,排除纯数字ID
|
||||
expect(priceUnitText).toMatch(/¥\d+\.\d+\/[^\d]+/);
|
||||
expect(priceUnitText).not.toMatch(/\/\d{1,2}$/);
|
||||
// 2. 确认预约并等待成功提示
|
||||
await page.click('text=确认预约');
|
||||
await expect(page.locator('.el-message--success')).toBeVisible({ timeout: 5000 });
|
||||
await expect(page.locator('text=预约成功')).toBeVisible();
|
||||
|
||||
// 验证右侧已选择列表(添加一项后)
|
||||
await leftItems.first().click();
|
||||
await page.click('text=添加 >> 右侧');
|
||||
const rightItems = page.locator('.right-list .item-row');
|
||||
await expect(rightItems.first()).toBeVisible();
|
||||
const rightPriceUnitText = await rightItems.first().locator('.price-unit').textContent();
|
||||
expect(rightPriceUnitText).toMatch(/¥\d+\.\d+\/[^\d]+/);
|
||||
expect(rightPriceUnitText).not.toMatch(/\/\d{1,2}$/);
|
||||
// 3. 验证前端号源状态已同步更新(反映底层 booked_num 已累加)
|
||||
// 刷新页面或重新查询排班,验证原号源状态变为“已预约”或数量减少
|
||||
await page.reload();
|
||||
await page.waitForSelector('.schedule-slot.booked');
|
||||
const bookedSlot = page.locator('.schedule-slot.booked').first();
|
||||
await expect(bookedSlot).toBeVisible({ timeout: 3000 });
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user