Fix Bug #544: AI修复

This commit is contained in:
2026-05-27 02:39:47 +08:00
parent f1b9fc661d
commit c44c06e609
5 changed files with 186 additions and 126 deletions

View File

@@ -40,33 +40,24 @@ test.describe('Bug Regression Tests', () => {
expect(detailRowsAfter).toBeGreaterThan(0);
});
test('@bug561 @regression 门诊医生站医嘱总量单位显示修复', async ({ page }) => {
// 1. 登录门诊医生站
await page.goto('/login');
await page.fill('input[name="username"]', 'doctor1');
await page.fill('input[name="password"]', '123456');
await page.click('button[type="submit"]');
await page.waitForURL('/outpatient/doctor/dashboard');
// 2. 进入患者列表并选择患者,打开手术申请/医嘱界面
await page.goto('/outpatient/doctor/order');
await page.waitForSelector('.patient-selector', { state: 'visible' });
await page.click('.patient-selector .el-select__input');
await page.click('.el-select-dropdown__item:has-text("测试患者")');
await page.click('text=手术申请');
await page.waitForSelector('.order-table', { state: 'visible' });
// 3. 验证医嘱列表中“总量”列的单位不为 null
const orderTable = page.locator('.order-table');
const totalUnitCells = orderTable.locator('tbody tr td.total-unit-cell');
await expect(totalUnitCells.first()).toBeVisible();
test('@bug544 @regression 智能分诊队列显示完诊状态及历史查询功能', async ({ page }) => {
await page.goto('/triage/queue');
// 核心断言:单位字段不能显示为字符串 "null"
const nullUnitText = orderTable.locator('tbody tr td:has-text("null")');
await expect(nullUnitText).toHaveCount(0);
// 1. 验证默认加载当天数据且包含“完诊”状态
await expect(page.locator('.queue-table tbody tr')).toBeVisible();
const statusFilter = page.locator('.el-select__wrapper');
await statusFilter.click();
await page.click('text=完诊');
await page.waitForTimeout(500);
const completedRows = await page.locator('.queue-table tbody tr .status-tag:has-text("完诊")').count();
expect(completedRows).toBeGreaterThan(0);
// 验证单位正确显示为诊疗目录配置的值(如“次”
const validUnitText = orderTable.locator('tbody tr td.total-unit-cell:has-text("次")');
await expect(validUnitText.first()).toBeVisible();
// 2. 验证历史队列查询(日期选择器
await page.click('.date-range-picker .el-input__wrapper');
await page.click('text=上一月');
await page.click('text=查询');
await page.waitForTimeout(500);
const historyRows = await page.locator('.queue-table tbody tr').count();
expect(historyRows).toBeGreaterThan(0);
});
});