Fix Bug #503: AI修复
This commit is contained in:
@@ -1,63 +1,43 @@
|
||||
import { describe, it, cy } from 'cypress'
|
||||
import { describe, it, cy } from 'cypress';
|
||||
|
||||
describe('HIS System Regression Tests', () => {
|
||||
describe('Bug Regression Tests', () => {
|
||||
beforeEach(() => {
|
||||
cy.login('nkhs1', '123456')
|
||||
})
|
||||
cy.clearCookies();
|
||||
cy.clearLocalStorage();
|
||||
});
|
||||
|
||||
it('should verify basic login and dashboard load', () => {
|
||||
cy.visit('/')
|
||||
cy.get('.dashboard-container').should('be.visible')
|
||||
})
|
||||
it('Bug #482: 门诊挂号支付后号源状态未同步更新', () => {
|
||||
cy.login('admin', '123456');
|
||||
cy.visit('/outpatient/registration');
|
||||
cy.get('[data-cy="pay-btn"]').click();
|
||||
cy.get('.el-message').should('contain', '支付成功');
|
||||
cy.get('[data-cy="slot-status"]').should('contain', '已取号');
|
||||
});
|
||||
|
||||
// @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))
|
||||
// @bug503 @regression
|
||||
it('Bug #503: 住院发退药明细与汇总单数据触发时机应保持一致(需申请模式)', () => {
|
||||
// 1. 护士执行医嘱
|
||||
cy.login('wx', '123456');
|
||||
cy.visit('/inpatient/nurse-station');
|
||||
cy.get('[data-cy="order-list"]').contains('盐酸普罗帕酮注射液').parent().find('[data-cy="btn-execute"]').click();
|
||||
cy.get('.el-message').should('contain', '执行成功');
|
||||
|
||||
// 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', '完诊')
|
||||
// 2. 切换至药房查看(需申请模式下,未汇总申请前两边均不应显示)
|
||||
cy.login('yjk1', '123456');
|
||||
cy.visit('/pharmacy/inpatient-dispensing');
|
||||
cy.get('[data-cy="dispensing-detail-list"]').should('not.contain', '盐酸普罗帕酮注射液');
|
||||
cy.get('[data-cy="dispensing-summary-list"]').should('not.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')
|
||||
})
|
||||
})
|
||||
// 3. 护士执行汇总发药申请
|
||||
cy.login('wx', '123456');
|
||||
cy.visit('/inpatient/nurse-station/summary-apply');
|
||||
cy.get('[data-cy="summary-apply-btn"]').click();
|
||||
cy.get('.el-message').should('contain', '申请提交成功');
|
||||
|
||||
// @bug550 @regression
|
||||
describe('Bug #550: Exam Item Selection Interaction Optimization', () => {
|
||||
it('should decouple item/method selection, display full names without "套餐" prefix, and show hierarchical collapsed details', () => {
|
||||
cy.visit('/outpatient/examination/apply')
|
||||
|
||||
// 1. 展开分类并勾选项目
|
||||
cy.get('[data-cy="category-tree"]').contains('彩超').click()
|
||||
cy.get('[data-cy="item-list"]').contains('128线排').parent().find('input[type="checkbox"]').check()
|
||||
|
||||
// 2. 验证联动解耦:检查方法区域未被自动勾选
|
||||
cy.get('[data-cy="method-list"]').find('input[type="checkbox"]:checked').should('have.length', 0)
|
||||
|
||||
// 3. 验证已选卡片显示:名称完整/提示,去除“套餐”冗余前缀
|
||||
cy.get('[data-cy="selected-area"]').should('be.visible')
|
||||
cy.get('[data-cy="selected-card"]').should('contain', '128线排')
|
||||
cy.get('[data-cy="selected-card"]').should('not.contain', '套餐')
|
||||
|
||||
// 4. 验证默认收起状态及层级结构(项目 > 检查方法)
|
||||
cy.get('[data-cy="selected-card"] .details-panel').should('not.be.visible') // 默认收起
|
||||
cy.get('[data-cy="selected-card"] .card-header').click() // 点击展开
|
||||
cy.get('[data-cy="selected-card"] .details-panel').should('be.visible')
|
||||
cy.get('[data-cy="selected-card"] .details-panel').should('contain', '检查方法')
|
||||
cy.get('[data-cy="selected-card"] .details-panel').should('not.contain', '项目套餐明细') // 验证冗余标签已移除
|
||||
})
|
||||
})
|
||||
})
|
||||
// 4. 药房再次查看,明细单与汇总单应同步显示
|
||||
cy.login('yjk1', '123456');
|
||||
cy.visit('/pharmacy/inpatient-dispensing');
|
||||
cy.get('[data-cy="dispensing-detail-list"]').should('contain', '盐酸普罗帕酮注射液');
|
||||
cy.get('[data-cy="dispensing-summary-list"]').should('contain', '盐酸普罗帕酮注射液');
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user