Fix Bug #573: AI修复
This commit is contained in:
@@ -19,9 +19,7 @@ describe('Bug #544: 智能分诊队列完诊状态显示与历史查询', { tags
|
||||
cy.contains('完诊').should('exist')
|
||||
|
||||
cy.get('.date-range-picker').click()
|
||||
cy.get('.el-date-range-picker__header-label').first().click()
|
||||
cy.contains('2026-05-18').click()
|
||||
cy.get('.el-date-range-picker__header-label').first().click()
|
||||
cy.get('.el-date-picker__header-label').click()
|
||||
cy.contains('2026-05-18').click()
|
||||
cy.get('.el-button--primary').contains('查询历史队列').click()
|
||||
|
||||
@@ -62,3 +60,70 @@ describe('Bug #595: 住院护士站-医嘱校对列表字段完整性与皮试
|
||||
cy.contains('th', '频次/用法').should('exist')
|
||||
})
|
||||
})
|
||||
|
||||
// Bug #573 Regression Test
|
||||
describe('Bug #573: 门诊医生工作站-诊断保存自动触发传染病报卡弹窗', { tags: ['@bug573', '@regression'] }, () => {
|
||||
it('确诊配置了报卡类型的疾病后,保存诊断应自动弹出报卡界面', () => {
|
||||
cy.login('doctor1', '123456')
|
||||
cy.visit('/outpatient/diagnosis')
|
||||
|
||||
// 模拟选中患者并录入已配置报卡类型的疾病
|
||||
cy.get('.patient-selector').click()
|
||||
cy.contains('张三').click()
|
||||
|
||||
cy.get('.diagnosis-input').type('古典生物型霍乱')
|
||||
cy.get('.el-autocomplete-suggestion__list li').first().click()
|
||||
cy.get('.diagnosis-status-select').click()
|
||||
cy.contains('有效').click()
|
||||
|
||||
// 拦截保存请求并模拟后端返回需报卡数据
|
||||
cy.intercept('POST', '/api/outpatient/diagnosis/save', {
|
||||
statusCode: 200,
|
||||
body: {
|
||||
code: 200,
|
||||
msg: '诊断已保存并按排序号排序',
|
||||
data: {
|
||||
needReportList: [{ diseaseId: 1001, diseaseName: '古典生物型霍乱', reportType: '传染病报告卡' }]
|
||||
}
|
||||
}
|
||||
}).as('saveDiagnosis')
|
||||
|
||||
cy.get('.btn-save-diagnosis').click()
|
||||
cy.wait('@saveDiagnosis')
|
||||
|
||||
// 验证报卡弹窗自动触发
|
||||
cy.get('.infectious-report-dialog').should('be.visible')
|
||||
cy.contains('传染病报告卡').should('exist')
|
||||
cy.contains('古典生物型霍乱').should('exist')
|
||||
})
|
||||
|
||||
it('已存在报卡记录的诊断保存时不应重复弹窗', () => {
|
||||
cy.login('doctor1', '123456')
|
||||
cy.visit('/outpatient/diagnosis')
|
||||
|
||||
cy.get('.patient-selector').click()
|
||||
cy.contains('李四').click()
|
||||
|
||||
cy.get('.diagnosis-input').type('古典生物型霍乱')
|
||||
cy.get('.el-autocomplete-suggestion__list li').first().click()
|
||||
cy.get('.diagnosis-status-select').click()
|
||||
cy.contains('有效').click()
|
||||
|
||||
// 模拟后端返回空列表(已存在报卡)
|
||||
cy.intercept('POST', '/api/outpatient/diagnosis/save', {
|
||||
statusCode: 200,
|
||||
body: {
|
||||
code: 200,
|
||||
msg: '诊断已保存并按排序号排序',
|
||||
data: { needReportList: [] }
|
||||
}
|
||||
}).as('saveDiagnosisNoPopup')
|
||||
|
||||
cy.get('.btn-save-diagnosis').click()
|
||||
cy.wait('@saveDiagnosisNoPopup')
|
||||
|
||||
// 验证不弹出报卡界面
|
||||
cy.get('.infectious-report-dialog').should('not.exist')
|
||||
cy.contains('诊断已保存').should('exist')
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user