Files
his/openhis-ui-vue3/tests/e2e/specs/bug-regression.spec.ts
2026-05-27 04:54:12 +08:00

42 lines
1.7 KiB
TypeScript
Executable File

import { describe, it, cy } from 'cypress';
// 原有回归测试用例...
describe('基础功能回归', () => {
it('应能正常加载门诊医生站首页', () => {
cy.visit('/outpatient/doctor');
cy.get('.doctor-workbench').should('exist');
});
});
/**
* @bug550 @regression
* 验证检查申请项目选择交互优化:解耦勾选、卡片显示优化、明细结构化展示
*/
describe('Bug #550: 检查申请项目选择交互优化', () => {
it('应解耦项目与方法勾选,优化卡片显示并结构化展示明细', () => {
cy.visit('/outpatient/doctor/exam-apply');
// 1. 展开分类并勾选项目
cy.contains('检查项目分类').parent().find('.el-tree-node__content').first().click();
cy.contains('128线排').click();
// 2. 验证检查方法未自动勾选(解耦验证)
cy.get('.method-checkbox-group').find('.el-checkbox__input.is-checked').should('not.exist');
// 3. 验证已选卡片显示完整名称且无“套餐”前缀
cy.get('.selected-card .item-title').should('contain.text', '128线排').and('not.contain.text', '套餐');
cy.get('.selected-card .item-title').should('have.attr', 'title', '128线排');
// 4. 验证明细默认收起
cy.get('.selected-card .card-detail').should('not.be.visible');
// 5. 点击展开验证层级结构(项目 > 检查方法)
cy.get('.selected-card .card-header').click();
cy.get('.selected-card .card-detail').should('be.visible');
cy.get('.selected-card .hierarchy-row').should('exist');
// 6. 验证无冗余“项目套餐明细”标签
cy.get('.selected-card').should('not.contain.text', '项目套餐明细');
});
});