62 lines
2.5 KiB
TypeScript
Executable File
62 lines
2.5 KiB
TypeScript
Executable File
import { describe, it, cy } from 'cypress'
|
|
|
|
describe('HIS System Regression Tests', () => {
|
|
beforeEach(() => {
|
|
cy.login('nkhs1', '123456')
|
|
})
|
|
|
|
it('should verify basic login and dashboard load', () => {
|
|
cy.visit('/')
|
|
cy.get('.dashboard-container').should('be.visible')
|
|
})
|
|
|
|
// @bug544 @regression
|
|
describe('Bug #544: Triage Queue List & Historical Query', () => {
|
|
it('should display completed status patients and support historical date query', () => {
|
|
cy.visit('/triage/queue')
|
|
|
|
// 1. 验证默认加载当天数据
|
|
cy.get('[data-cy="queue-table"]').should('exist')
|
|
cy.get('[data-cy="date-range-picker"]').should('contain', new Date().toISOString().slice(0, 10))
|
|
|
|
// 2. 验证可筛选“完诊”状态患者
|
|
cy.get('[data-cy="status-select"]').select('完诊')
|
|
cy.get('[data-cy="search-btn"]').click()
|
|
cy.get('[data-cy="queue-table"] tbody tr').should('have.length.greaterThan', 0)
|
|
cy.get('[data-cy="queue-table"] .status-tag').should('contain', '完诊')
|
|
|
|
// 3. 验证历史队列查询功能(按时间范围检索)
|
|
cy.get('[data-cy="start-date"]').clear().type('2026-05-01')
|
|
cy.get('[data-cy="end-date"]').clear().type('2026-05-02')
|
|
cy.get('[data-cy="search-btn"]').click()
|
|
cy.get('[data-cy="queue-table"]').should('exist')
|
|
cy.url().should('include', 'startDate=2026-05-01')
|
|
cy.url().should('include', 'endDate=2026-05-02')
|
|
})
|
|
})
|
|
|
|
// @bug576 @regression
|
|
describe('Bug #576: Lab Request Edit Item Echo', () => {
|
|
it('should correctly echo selected lab items when editing a pending sign request', () => {
|
|
cy.login('doctor1', '123456')
|
|
cy.visit('/inpatient/doctor-station')
|
|
|
|
// 进入检验申请页签
|
|
cy.get('[data-cy="tab-inspection"]').click()
|
|
cy.wait(500)
|
|
|
|
// 点击第一条待签发记录的修改按钮
|
|
cy.get('[data-cy="inspection-table"] tbody tr').first().find('[data-cy="btn-edit"]').click()
|
|
cy.get('[data-cy="edit-inspection-dialog"]').should('be.visible')
|
|
|
|
// 验证主表字段回显正常
|
|
cy.get('[data-cy="symptom-input"]').should('not.be.empty')
|
|
|
|
// 验证右侧已选择列表回显,不应显示“无数据”
|
|
cy.get('[data-cy="selected-items-panel"]').should('not.contain', '无数据')
|
|
cy.get('[data-cy="selected-items-list"]').should('contain', '肝功能常规检查')
|
|
cy.get('[data-cy="selected-items-list"]').should('contain', '¥31.00')
|
|
})
|
|
})
|
|
})
|