89 lines
3.7 KiB
TypeScript
Executable File
89 lines
3.7 KiB
TypeScript
Executable File
import { describe, it, cy } from 'cypress'
|
|
|
|
describe('HIS System Core Regression Tests', () => {
|
|
// 原有回归测试用例占位
|
|
it('should load dashboard successfully', () => {
|
|
cy.visit('/dashboard')
|
|
cy.get('.dashboard-container').should('be.visible')
|
|
})
|
|
})
|
|
|
|
// Bug #544 Regression Test
|
|
describe('Bug #544: 智能分诊队列完诊状态显示与历史查询', { tags: ['@bug544', '@regression'] }, () => {
|
|
it('应显示包含完诊状态的所有患者,并支持按日期查询历史队列', () => {
|
|
cy.login('nkhs1', '123456')
|
|
cy.visit('/triage/queue')
|
|
|
|
cy.get('.el-table__body-wrapper').should('be.visible')
|
|
cy.get('.el-table__row').should('have.length.greaterThan', 0)
|
|
cy.contains('完诊').should('exist')
|
|
|
|
cy.get('.date-range-picker').click()
|
|
cy.get('.el-date-picker__header-label').click()
|
|
cy.contains('2026-05-18').click()
|
|
cy.get('.el-button--primary').contains('查询历史队列').click()
|
|
|
|
cy.intercept('GET', '/api/triage/queue*').as('getQueue')
|
|
cy.wait('@getQueue').its('request.query').should('have.property', 'startDate')
|
|
cy.get('.el-table__body-wrapper').should('be.visible')
|
|
})
|
|
})
|
|
|
|
// Bug #576 Regression Test
|
|
describe('Bug #576: 住院医生工作站-检验申请编辑回显', { tags: ['@bug576', '@regression'] }, () => {
|
|
it('编辑待签发检验申请单时,右侧已选择列表应正确回显关联项目', () => {
|
|
cy.login('doctor1', '123456')
|
|
cy.visit('/inpatient/lab-request')
|
|
|
|
cy.get('.el-table__body-wrapper').should('be.visible')
|
|
cy.contains('tr', '待签发').first().find('.el-button--primary').contains('修改').click()
|
|
cy.get('.el-dialog__body').should('be.visible')
|
|
cy.get('.selected-items-panel .el-table__row').should('have.length.greaterThan', 0)
|
|
cy.contains('肝功能常规检查').should('exist')
|
|
cy.contains('¥31.00').should('exist')
|
|
})
|
|
})
|
|
|
|
// Bug #595 Regression Test
|
|
describe('Bug #595: 住院护士站-医嘱校对列表字段完整性与皮试高亮', { tags: ['@bug595', '@regression'] }, () => {
|
|
it('医嘱校对列表应展示结构化字段,且需皮试医嘱显示红色标签', () => {
|
|
cy.login('wx', '123456')
|
|
cy.visit('/inpatient/order-verification')
|
|
|
|
cy.get('.el-table__body-wrapper').should('be.visible')
|
|
cy.get('.el-table__row').should('have.length.greaterThan', 0)
|
|
|
|
// 验证新增字段列头存在
|
|
cy.contains('th', '开始时间').should('exist')
|
|
cy.contains('th', '单次剂量').should('exist')
|
|
cy.contains('th', '总量').should('exist')
|
|
cy.contains('th', '频次/用法').should('exist')
|
|
})
|
|
})
|
|
|
|
// Bug #570 Regression Test
|
|
describe('Bug #570: 门诊预约挂号-预约成功后状态显示与查询', { tags: ['@bug570', '@regression'] }, () => {
|
|
it('预约成功后号源状态应显示为“已预约”,且按“已预约”筛选可正常查询到数据', () => {
|
|
cy.login('admin', '123456')
|
|
cy.visit('/outpatient/appointment')
|
|
|
|
// 1. 执行预约操作
|
|
cy.get('.slot-card').first().find('.btn-appoint').click()
|
|
cy.get('.el-dialog__footer .el-button--primary').click()
|
|
cy.contains('预约成功').should('be.visible')
|
|
|
|
// 2. 验证状态显示已修正为“已预约”,且无“已锁定”
|
|
cy.get('.slot-card').first().contains('已预约').should('be.visible')
|
|
cy.get('.slot-card').first().contains('已锁定').should('not.exist')
|
|
|
|
// 3. 验证状态筛选查询功能正常
|
|
cy.get('.status-filter .el-select').click()
|
|
cy.get('.el-select-dropdown__item').contains('已预约').click()
|
|
cy.get('.el-button--primary').contains('查询').click()
|
|
|
|
cy.get('.el-table__body-wrapper').should('be.visible')
|
|
cy.get('.el-table__row').should('have.length.greaterThan', 0)
|
|
cy.contains('已预约').should('exist')
|
|
})
|
|
})
|