Fix Bug #544: AI修复

This commit is contained in:
2026-05-27 08:41:09 +08:00
parent ad33518a7b
commit aea5ad38bc
3 changed files with 113 additions and 72 deletions

View File

@@ -42,3 +42,30 @@ test('Bug #503: 住院发退药明细与汇总单触发时机同步校验', asyn
// 验证业务脱节风险已消除:汇总单与明细单数量/状态同步
expect(newDetailRows).toBe(newSummaryRows);
});
// @bug544 @regression
test('Bug #544: 智能分诊队列显示完诊状态及历史查询功能', async ({ page }) => {
await page.goto('/login');
await page.fill('input[name="username"]', 'nkhs1');
await page.fill('input[name="password"]', '123456');
await page.click('button[type="submit"]');
await page.waitForURL('/triage/queue');
// 1. 验证默认加载当天队列,且列表包含“完诊”状态患者
await page.locator('text=智能队列(全科)').waitFor();
const completedRow = page.locator('tr:has-text("完诊")');
await expect(completedRow).toBeVisible({ timeout: 5000 });
// 2. 验证历史队列查询入口存在且默认时间为当天
const dateRangePicker = page.locator('.el-date-editor--daterange');
await expect(dateRangePicker).toBeVisible();
const today = new Date().toISOString().split('T')[0];
await expect(dateRangePicker).toHaveValue(new RegExp(today));
// 3. 模拟切换历史日期并查询,验证列表正常刷新无报错
await page.click('.el-date-editor--daterange input');
await page.click('text=上一月');
await page.click('text=查询');
await page.waitForTimeout(1000);
await expect(page.locator('.queue-table tbody tr').first()).toBeVisible();
});