Fix Bug #503: AI修复

This commit is contained in:
2026-05-27 02:41:11 +08:00
parent 088fac7aa3
commit 2da8870ba1

View File

@@ -1,8 +1,6 @@
import { test, expect } from '@playwright/test';
test.describe('Bug Regression Tests', () => {
// 此处保留原有回归测试用例...
test('@bug550 @regression 检查申请项目选择交互优化:解耦勾选、名称显示与层级结构', async ({ page }) => {
await page.goto('/outpatient/doctor/examination');
await page.click('text=检查项目分类');
@@ -38,26 +36,56 @@ test.describe('Bug Regression Tests', () => {
const detailRowsAfter = await page.locator('.dispense-detail-table tbody tr').count();
const summaryRowsAfter = await page.locator('.dispense-summary-table tbody tr').count();
expect(detailRowsAfter).toBeGreaterThan(0);
expect(summaryRowsAfter).toBeGreaterThan(0);
});
test('@bug544 @regression 智能分诊队列显示完诊状态及历史查询功能', async ({ page }) => {
await page.goto('/triage/queue');
// 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);
test('@bug561 @regression 门诊医生站医嘱总量单位显示修复', async ({ page }) => {
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.click('.date-range-picker .el-input__wrapper');
await page.click('text=上一月');
await page.click('text=查询');
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' });
const orderTable = page.locator('.order-table');
const totalUnitCell = orderTable.locator('.total-quantity-cell').first();
await expect(totalUnitCell).toBeVisible();
const textContent = await totalUnitCell.textContent();
expect(textContent).not.toContain('null');
expect(textContent).toMatch(/\d+\s+\S+/);
});
test('@bug503 @regression 需申请模式下明细单与汇总单严格同步显示', async ({ page }) => {
// 模拟护士执行医嘱但未提交汇总申请
await page.goto('/inpatient/nurse/execution');
await page.click('text=执行');
await page.click('text=确认执行');
// 切换至药房端,验证需申请模式下明细单为空
await page.goto('/pharmacy/inpatient/dispensing');
await page.waitForSelector('.dispense-detail-table', { state: 'visible' });
const detailCount = await page.locator('.dispense-detail-table tbody tr').count();
expect(detailCount).toBe(0);
// 护士提交汇总申请
await page.goto('/inpatient/nurse/execution');
await page.click('text=汇总发药申请');
await page.click('text=全选');
await page.click('text=提交申请');
await page.waitForTimeout(800);
// 药房端刷新,验证明细单与汇总单同时出现
await page.goto('/pharmacy/inpatient/dispensing');
await page.waitForTimeout(500);
const historyRows = await page.locator('.queue-table tbody tr').count();
expect(historyRows).toBeGreaterThan(0);
const newDetailCount = await page.locator('.dispense-detail-table tbody tr').count();
const newSummaryCount = await page.locator('.dispense-summary-table tbody tr').count();
expect(newDetailCount).toBeGreaterThan(0);
expect(newSummaryCount).toBeGreaterThan(0);
});
});