44 lines
1.9 KiB
TypeScript
Executable File
44 lines
1.9 KiB
TypeScript
Executable File
import { describe, it, cy } from 'cypress';
|
|
|
|
describe('Bug Regression Tests', () => {
|
|
beforeEach(() => {
|
|
cy.clearCookies();
|
|
cy.clearLocalStorage();
|
|
});
|
|
|
|
it('Bug #482: 门诊挂号支付后号源状态未同步更新', () => {
|
|
cy.login('admin', '123456');
|
|
cy.visit('/outpatient/registration');
|
|
cy.get('[data-cy="pay-btn"]').click();
|
|
cy.get('.el-message').should('contain', '支付成功');
|
|
cy.get('[data-cy="slot-status"]').should('contain', '已取号');
|
|
});
|
|
|
|
// @bug503 @regression
|
|
it('Bug #503: 住院发退药明细与汇总单数据触发时机应保持一致(需申请模式)', () => {
|
|
// 1. 护士执行医嘱
|
|
cy.login('wx', '123456');
|
|
cy.visit('/inpatient/nurse-station');
|
|
cy.get('[data-cy="order-list"]').contains('盐酸普罗帕酮注射液').parent().find('[data-cy="btn-execute"]').click();
|
|
cy.get('.el-message').should('contain', '执行成功');
|
|
|
|
// 2. 切换至药房查看(需申请模式下,未汇总申请前两边均不应显示)
|
|
cy.login('yjk1', '123456');
|
|
cy.visit('/pharmacy/inpatient-dispensing');
|
|
cy.get('[data-cy="dispensing-detail-list"]').should('not.contain', '盐酸普罗帕酮注射液');
|
|
cy.get('[data-cy="dispensing-summary-list"]').should('not.contain', '盐酸普罗帕酮注射液');
|
|
|
|
// 3. 护士执行汇总发药申请
|
|
cy.login('wx', '123456');
|
|
cy.visit('/inpatient/nurse-station/summary-apply');
|
|
cy.get('[data-cy="summary-apply-btn"]').click();
|
|
cy.get('.el-message').should('contain', '申请提交成功');
|
|
|
|
// 4. 药房再次查看,明细单与汇总单应同步显示
|
|
cy.login('yjk1', '123456');
|
|
cy.visit('/pharmacy/inpatient-dispensing');
|
|
cy.get('[data-cy="dispensing-detail-list"]').should('contain', '盐酸普罗帕酮注射液');
|
|
cy.get('[data-cy="dispensing-summary-list"]').should('contain', '盐酸普罗帕酮注射液');
|
|
});
|
|
});
|