Fix Bug #577: AI修复
This commit is contained in:
@@ -61,35 +61,24 @@ test.describe('Bug #589 Regression: 出院带药医嘱类型与交互', () => {
|
||||
});
|
||||
});
|
||||
|
||||
test.describe('Bug #582 Regression: 手术申请单号前缀与格式校验', () => {
|
||||
test.beforeEach(async ({ page }) => {
|
||||
test.describe('Bug #577 Regression: 检验申请单单位字典回显', () => {
|
||||
test('@bug577 @regression 验证检验申请单项目单位显示为中文而非字典ID', 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(/\/inpatient/);
|
||||
await page.click('.patient-list-item:first-child');
|
||||
});
|
||||
await page.click('text=检验');
|
||||
await page.waitForSelector('.el-dialog:has-text("检验申请单")', { state: 'visible' });
|
||||
|
||||
test('@bug582 @regression 验证手术申请单号前缀为SSZ且格式正确', async ({ page }) => {
|
||||
await page.click('text=手术');
|
||||
// 模拟填写必要信息并保存
|
||||
await page.fill('input[name="diagnosis"]', '急性阑尾炎');
|
||||
await page.click('text=确认');
|
||||
await page.waitForTimeout(1500);
|
||||
|
||||
// 返回列表并刷新
|
||||
await page.click('text=手术申请');
|
||||
await page.click('text=查询');
|
||||
|
||||
// 获取第一行手术单号
|
||||
const applyNoCell = page.locator('.el-table__body tr:first-child td:nth-child(2)');
|
||||
await expect(applyNoCell).toBeVisible();
|
||||
const applyNo = await applyNoCell.textContent();
|
||||
|
||||
// 验证格式: SSZ + 6位日期(YYMMDD) + 5位流水号
|
||||
expect(applyNo).toMatch(/^SSZ\d{6}\d{5}$/);
|
||||
// 验证未错误套用检查前缀 JCZ
|
||||
expect(applyNo).not.toMatch(/^JCZ/);
|
||||
// 获取左侧未选择列表中的第一个项目单价/单位文本
|
||||
const priceUnitEl = page.locator('.el-dialog:has-text("检验申请单") .unselected-list .item-price-unit').first();
|
||||
await expect(priceUnitEl).toBeVisible();
|
||||
const text = await priceUnitEl.textContent();
|
||||
|
||||
// 验证格式:不应为 ¥xx.xx/数字,应为 ¥xx.xx/中文
|
||||
expect(text).not.toMatch(/\/\d+$/);
|
||||
expect(text).toMatch(/\/[\u4e00-\u9fa5]+$/);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user