29 lines
1.5 KiB
TypeScript
Executable File
29 lines
1.5 KiB
TypeScript
Executable File
import { describe, it, cy } from 'cypress';
|
|
|
|
describe('HIS System Regression Tests', () => {
|
|
// 原有测试用例保留...
|
|
|
|
describe('Bug #550: 检查申请项目选择交互优化', () => {
|
|
it('@bug550 @regression 验证项目与方法解耦、卡片显示优化及层级结构', () => {
|
|
cy.visit('/outpatient/examination');
|
|
|
|
// 1. 解耦验证:勾选分类下的项目,不应自动勾选下方的检查方法
|
|
cy.get('.exam-category-tree').contains('彩超').click();
|
|
cy.get('.exam-item-list').contains('128线排').click();
|
|
cy.get('.exam-method-list input[type="checkbox"]').should('not.be.checked');
|
|
|
|
// 2. 卡片显示验证:去除“套餐”冗余前缀,宽度自适应且悬停显示完整名称
|
|
cy.get('.selected-item-card .item-name').should('not.contain', '套餐');
|
|
cy.get('.selected-item-card .item-name').should('have.attr', 'title');
|
|
cy.get('.selected-item-card').should('have.css', 'max-width', '100%');
|
|
|
|
// 3. 层级与默认状态验证:默认收起,点击展开显示明细,严格遵循 项目 > 检查方法 层级,无冗余标签
|
|
cy.get('.selected-item-card .detail-section').should('not.be.visible');
|
|
cy.get('.selected-item-card .card-header').click();
|
|
cy.get('.selected-item-card .detail-section').should('be.visible');
|
|
cy.get('.selected-item-card .detail-section').should('contain', '检查方法');
|
|
cy.get('.selected-item-card').should('not.contain', '项目套餐明细');
|
|
});
|
|
});
|
|
});
|