Files
his/openhis-ui-vue3/tests/e2e/specs/bug-regression.spec.ts
2026-05-27 06:30:44 +08:00

41 lines
1.8 KiB
TypeScript
Executable File
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import { describe, it, cy } from 'cypress'
describe('HIS System Regression Tests', () => {
// 原有测试用例占位...
it('should pass existing outpatient login flow', () => {
cy.visit('/login')
cy.get('#username').type('admin')
cy.get('#password').type('123456')
cy.get('#login-btn').click()
cy.url().should('include', '/dashboard')
})
// @bug550 @regression 新增回归测试
describe('Bug #550: 检查申请项目选择交互优化', { tags: ['@bug550', '@regression'] }, () => {
it('应解耦项目与方法勾选、清理冗余文案、支持层级折叠展示', () => {
cy.visit('/outpatient/examination')
// 1. 展开分类并勾选项目
cy.get('.category-tree').contains('彩超').click()
cy.get('.item-list').contains('128线排').click()
// 验证1联动解耦 - 勾选项目时,下方检查方法不应自动勾选
cy.get('.method-checkbox-group input[type="checkbox"]').should('not.be.checked')
// 验证2显示优化 - 卡片名称无“套餐”前缀,支持完整名称提示
cy.get('.selected-card .item-name').should('not.contain', '套餐')
cy.get('.selected-card .item-name').should('have.attr', 'title')
cy.get('.selected-card').should('have.css', 'width').and('not.equal', '0px')
// 验证3结构化展示 - 默认收起,点击可展开,无冗余标签
cy.get('.selected-card .method-detail-list').should('not.be.visible')
cy.get('.selected-card .card-header').click()
cy.get('.selected-card .method-detail-list').should('be.visible')
cy.get('.selected-card').should('not.contain', '项目套餐明细')
// 验证层级:项目 > 检查方法
cy.get('.selected-card .method-detail-list .method-item').should('have.length.greaterThan', 0)
})
})
})