68 lines
2.7 KiB
TypeScript
Executable File
68 lines
2.7 KiB
TypeScript
Executable File
import { describe, it, cy } from 'cypress';
|
|
|
|
// 假设文件原有内容在此处保留...
|
|
|
|
// @bug550 @regression
|
|
describe('Bug #550 Regression: 门诊检查申请项目选择交互优化', () => {
|
|
beforeEach(() => {
|
|
cy.visit('/outpatient/check-application');
|
|
cy.intercept('GET', '/api/outpatient/check/categories', { fixture: 'check-categories.json' }).as('getCategories');
|
|
cy.intercept('GET', '/api/outpatient/check/projects', { fixture: 'check-projects.json' }).as('getProjects');
|
|
});
|
|
|
|
it('应解耦项目与检查方法勾选,卡片显示完整名称且默认收起,层级结构清晰', () => {
|
|
cy.get('.category-tree').contains('彩超').click();
|
|
cy.wait('@getProjects');
|
|
cy.get('.project-list').contains('128线排').click();
|
|
|
|
// 1. 联动解耦:勾选项目时,检查方法不应自动勾选
|
|
cy.get('.method-panel input[type="checkbox"]').should('not.be.checked');
|
|
|
|
// 2. 卡片显示:无“套餐”前缀,支持完整名称提示,默认收起明细
|
|
cy.get('.selected-card').should('be.visible');
|
|
cy.get('.selected-card .card-title').should('contain', '128线排');
|
|
cy.get('.selected-card .card-title').should('not.contain', '套餐');
|
|
cy.get('.selected-card .card-title').should('have.attr', 'title');
|
|
cy.get('.selected-card .details-wrapper').should('not.be.visible');
|
|
|
|
// 3. 展开后层级清晰,无冗余标签,方法可独立勾选
|
|
cy.get('.selected-card .expand-toggle').click();
|
|
cy.get('.selected-card .details-wrapper').should('be.visible');
|
|
cy.get('.details-wrapper').should('contain', '检查项目 > 检查方法');
|
|
cy.get('.redundant-label').should('not.exist');
|
|
cy.get('.details-wrapper').contains('常规扫查').click();
|
|
cy.get('.details-wrapper input[type="checkbox"]').first().should('be.checked');
|
|
});
|
|
});
|
|
|
|
// @bug562 @regression
|
|
describe('Bug #562 Regression: 门诊医生工作站-待写病历加载性能优化', () => {
|
|
beforeEach(() => {
|
|
cy.visit('/outpatient/doctor/pending-records');
|
|
cy.intercept('GET', '/api/outpatient/medical-records/pending*', {
|
|
statusCode: 200,
|
|
delay: 800,
|
|
body: {
|
|
code: 200,
|
|
data: {
|
|
list: Array(15).fill(null).map((_, i) => ({
|
|
id: i + 1,
|
|
patientName: `患者${i + 1}`,
|
|
visitDate: '2026-05-20',
|
|
status: 'PENDING'
|
|
})),
|
|
total: 15
|
|
}
|
|
}
|
|
}).as('getRecords');
|
|
});
|
|
|
|
it('分页加载耗时应在2秒内且无OOM风险', () => {
|
|
cy.clock();
|
|
cy.get('.pending-records-table').should('be.visible');
|
|
cy.tick(1000);
|
|
cy.get('.el-pagination').should('be.visible');
|
|
cy.get('.pending-records-table tbody tr').should('have.length', 15);
|
|
});
|
|
});
|