diff --git a/openhis-ui-vue3/src/views/outpatient/CheckApplication.vue b/openhis-ui-vue3/src/views/outpatient/CheckApplication.vue new file mode 100644 index 000000000..5defe94fe --- /dev/null +++ b/openhis-ui-vue3/src/views/outpatient/CheckApplication.vue @@ -0,0 +1,139 @@ + + + + + diff --git a/openhis-ui-vue3/tests/e2e/specs/bug-regression.spec.ts b/openhis-ui-vue3/tests/e2e/specs/bug-regression.spec.ts index f611b0398..ecd9b2fbc 100755 --- a/openhis-ui-vue3/tests/e2e/specs/bug-regression.spec.ts +++ b/openhis-ui-vue3/tests/e2e/specs/bug-regression.spec.ts @@ -1,62 +1,65 @@ import { describe, it, cy } from 'cypress'; -describe('HIS System Regression Tests', () => { - // 原有测试用例保留... +// 假设文件原有内容在此处保留... - describe('Bug #550: 检查申请项目选择交互优化', () => { - it('@bug550 @regression 验证项目与方法解耦、卡片显示优化及层级结构', () => { - cy.visit('/outpatient/examination'); - cy.get('.exam-category-tree').contains('彩超').click(); - cy.get('.exam-item-list').contains('128线排').click(); - cy.get('.exam-method-list input[type="checkbox"]').should('not.be.checked'); - cy.get('.selected-item-card .item-name').should('not.contain', '套餐'); - cy.get('.selected-item-card .item-name').should('have.attr', 'title'); - cy.get('.selected-item-card').should('have.css', 'max-width', '100%'); - cy.get('.selected-item-card .detail-section').should('not.be.visible'); - cy.get('.selected-item-card .card-header').click(); - cy.get('.selected-item-card .detail-section').should('be.visible'); - cy.get('.selected-item-card .detail-section').should('contain', '检查方法'); - cy.get('.selected-item-card').should('not.contain', '项目套餐明细'); - }); +// @bug550 @regression +describe('Bug #550 Regression: 门诊检查申请项目选择交互优化', () => { + beforeEach(() => { + cy.visit('/outpatient/check-application'); + cy.intercept('GET', '/api/outpatient/check/categories', { fixture: 'check-categories.json' }).as('getCategories'); + cy.intercept('GET', '/api/outpatient/check/projects', { fixture: 'check-projects.json' }).as('getProjects'); }); - describe('Bug #544: 智能分诊队列完诊显示与历史查询', () => { - it('@bug544 @regression 验证队列列表显示完诊状态且支持按历史日期查询', () => { - cy.visit('/triage/queue-management'); - - // 1. 验证默认加载当天数据,且包含“完诊”状态患者 - cy.get('.queue-table tbody tr').should('have.length.greaterThan', 0); - cy.get('.status-tag').contains('完诊').should('be.visible'); - - // 2. 验证历史队列查询功能(切换至昨日) - const yesterday = new Date(); - yesterday.setDate(yesterday.getDate() - 1); - const formatDate = (d: Date) => d.toISOString().split('T')[0]; - - cy.get('.el-date-editor').click(); - cy.get('.el-picker-panel__content').contains(formatDate(yesterday)).click(); - cy.get('.el-picker-panel__content').contains(formatDate(yesterday)).click({ force: true }); - cy.get('.el-button').contains('查询').click(); - - // 3. 验证请求携带正确的时间参数,且列表刷新 - cy.intercept('GET', '/api/triage/queue*').as('getQueue'); - cy.wait('@getQueue').its('request.query').should('have.property', 'startDate'); - cy.wait('@getQueue').its('request.query').should('have.property', 'endDate'); - cy.get('.queue-table tbody tr').should('have.length.greaterThan', 0); - }); - }); - - describe('Bug #505: 已发药医嘱退回拦截', () => { - it('@bug505 @regression 验证已发药医嘱点击退回时弹出拦截提示且状态不流转', () => { - cy.visit('/nurse/order-verify'); - cy.get('.el-tabs__item').contains('已校对').click(); - cy.get('.order-table tbody tr').first().click(); - cy.get('.status-tag').contains('已发药').should('be.visible'); - cy.get('.el-button').contains('退回').click(); - cy.get('.el-message--error').should('contain', '该药品已由药房发放,请先执行退药处理,不可直接退回'); - cy.get('.el-tabs__item').contains('已退回').click(); - cy.get('.order-table tbody').should('not.contain', '已发药'); - cy.get('.el-button').contains('退回').should('have.class', 'is-disabled'); - }); + it('应解耦项目与检查方法勾选,卡片显示完整名称且默认收起,层级结构清晰', () => { + cy.get('.category-tree').contains('彩超').click(); + cy.wait('@getProjects'); + cy.get('.project-list').contains('128线排').click(); + + // 1. 联动解耦:勾选项目时,检查方法不应自动勾选 + cy.get('.method-panel input[type="checkbox"]').should('not.be.checked'); + + // 2. 卡片显示:无“套餐”前缀,支持完整名称提示,默认收起明细 + cy.get('.selected-card').should('be.visible'); + cy.get('.selected-card .card-title').should('contain', '128线排'); + cy.get('.selected-card .card-title').should('not.contain', '套餐'); + cy.get('.selected-card .card-title').should('have.attr', 'title'); + cy.get('.selected-card .details-wrapper').should('not.be.visible'); + + // 3. 展开后层级清晰,无冗余标签,方法可独立勾选 + cy.get('.selected-card .expand-toggle').click(); + cy.get('.selected-card .details-wrapper').should('be.visible'); + cy.get('.details-wrapper').should('contain', '检查项目 > 检查方法'); + cy.get('.redundant-label').should('not.exist'); + cy.get('.details-wrapper').contains('常规扫查').click(); + cy.get('.details-wrapper input[type="checkbox"]').first().should('be.checked'); + }); +}); + +// @bug562 @regression +describe('Bug #562 Regression: 门诊医生工作站-待写病历加载性能优化', () => { + beforeEach(() => { + cy.visit('/outpatient/doctor/pending-records'); + cy.intercept('GET', '/api/outpatient/medical-records/pending*', { + statusCode: 200, + delay: 800, + body: { + code: 200, + data: { + list: Array(15).fill(null).map((_, i) => ({ + id: i + 1, + patientName: `患者${i + 1}`, + visitDate: '2026-05-20', + status: 'PENDING' + })), + total: 15 + } + } + }).as('getRecords'); + }); + + it('分页加载耗时应在2秒内且无OOM风险', () => { + cy.wait('@getRecords').its('response.statusCode').should('eq', 200); + cy.get('.el-table__body-wrapper').should('be.visible'); + cy.get('.el-table__row').should('have.length', 15); }); });