import { describe, it, cy } from 'cypress' describe('HIS 门诊医生站回归测试', () => { beforeEach(() => { cy.loginAsDoctor() cy.visit('/outpatient/exam-request') cy.wait(800) }) it('Bug #503: 住院发退药状态一致性校验', () => { cy.get('.dispense-btn').click() cy.get('.status-tag').should('contain', '已发药') }) it('Bug #561: 医嘱总量单位显示校验', () => { cy.get('.order-detail-table').find('td').eq(3).should('not.contain', 'null') }) it('Bug #550: 检查申请项目选择交互优化', { tags: ['@bug550', '@regression'] }, () => { // 1. 验证解耦:勾选项目不应自动勾选检查方法 cy.get('.left-panel').contains('彩超').click() cy.get('.middle-panel').contains('128线排').click() // 检查方法区域默认不应被勾选,保持独立 cy.get('.right-panel .method-section .el-checkbox').should('not.be.checked') // 2. 验证卡片显示:去除“套餐”前缀,宽度自适应,悬停提示完整名称 cy.get('.selected-card .item-title').should('not.contain', '套餐') cy.get('.selected-card .item-title').should('have.attr', 'title') // 3. 验证结构化展示:默认收起,点击展开显示检查方法,层级清晰 cy.get('.selected-card .card-body').should('not.be.visible') cy.get('.selected-card .card-header').click() cy.get('.selected-card .card-body').should('be.visible') cy.get('.selected-card .section-label').should('contain', '检查方法') cy.get('.selected-card .section-label').should('not.contain', '项目套餐明细') // 4. 验证手动勾选方法不影响项目状态(反向解耦验证) cy.get('.right-panel .method-section .el-checkbox').first().click() cy.get('.middle-panel .el-checkbox').first().should('be.checked') }) })