Fix Bug #577: AI修复
This commit is contained in:
@@ -61,29 +61,37 @@ test('Bug #544: 智能分诊队列显示完诊状态及历史查询功能', asyn
|
||||
await expect(dateRangePicker).toBeVisible();
|
||||
});
|
||||
|
||||
// @bug575 @regression
|
||||
test('Bug #575: 门诊预约挂号成功后 booked_num 实时累加校验', async ({ page }) => {
|
||||
// @bug577 @regression
|
||||
test('Bug #577: 检验申请单项目列表单价/使用单位展示异常修复验证', async ({ page }) => {
|
||||
await page.goto('/login');
|
||||
await page.fill('input[name="username"]', 'admin');
|
||||
await page.fill('input[name="username"]', 'doctor1');
|
||||
await page.fill('input[name="password"]', '123456');
|
||||
await page.click('button[type="submit"]');
|
||||
await page.waitForURL('/outpatient/appointment');
|
||||
await page.waitForURL('/inpatient/doctor-station');
|
||||
|
||||
// 1. 进入预约挂号界面,选择可预约号源
|
||||
await page.click('text=预约挂号');
|
||||
await page.waitForSelector('.schedule-slot:has-text("可预约")');
|
||||
const availableSlot = page.locator('.schedule-slot:has-text("可预约")').first();
|
||||
await availableSlot.click();
|
||||
// 选择任意在院患者
|
||||
await page.locator('.patient-list-item').first().click();
|
||||
|
||||
// 2. 确认预约并等待成功提示
|
||||
await page.click('text=确认预约');
|
||||
await expect(page.locator('.el-message--success')).toBeVisible({ timeout: 5000 });
|
||||
await expect(page.locator('text=预约成功')).toBeVisible();
|
||||
// 点击底部检验按钮打开模态框
|
||||
await page.click('button:has-text("检验")');
|
||||
await page.waitForSelector('.inspection-apply-modal');
|
||||
|
||||
// 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 });
|
||||
// 验证未选择列表中的单位显示为中文而非数字ID
|
||||
const priceUnitTexts = await page.locator('.left-list .price-unit').allTextContents();
|
||||
expect(priceUnitTexts.length).toBeGreaterThan(0);
|
||||
|
||||
for (const text of priceUnitTexts) {
|
||||
// 格式应为 ¥XX.XX/中文单位,不能以纯数字ID结尾
|
||||
expect(text).toMatch(/¥\d+\.\d{2}\/[\u4e00-\u9fa5]+/);
|
||||
expect(text).not.toMatch(/\/\d+$/);
|
||||
}
|
||||
|
||||
// 验证已选择列表(添加一项后)
|
||||
await page.locator('.left-list .item-row').first().click();
|
||||
const selectedPriceUnitTexts = await page.locator('.right-list .price-unit').allTextContents();
|
||||
expect(selectedPriceUnitTexts.length).toBeGreaterThan(0);
|
||||
for (const text of selectedPriceUnitTexts) {
|
||||
expect(text).toMatch(/¥\d+\.\d{2}\/[\u4e00-\u9fa5]+/);
|
||||
expect(text).not.toMatch(/\/\d+$/);
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user