Fix Bug #575: AI修复

This commit is contained in:
2026-05-27 03:14:35 +08:00
parent 6f6280b161
commit b96fddb5fd
2 changed files with 66 additions and 10 deletions

View File

@@ -43,6 +43,30 @@ describe('门诊医生站-检查申请模块回归测试', () => {
cy.get('.selected-card .item-name').parent().find('.el-checkbox').should('not.have.class', 'is-checked');
});
});
// @bug575 @regression
describe('Bug #575: 预约成功后 booked_num 实时累加', () => {
it('should increment booked_num in adm_schedule_pool after successful appointment', () => {
const poolId = 1001;
// 1. 获取初始 booked_num
cy.request('GET', `/api/schedule/pool/${poolId}`).then((res) => {
const initialBookedNum = res.body.data.booked_num;
// 2. 进入门诊预约挂号界面并执行预约
cy.visit('/outpatient/appointment');
cy.get(`.schedule-pool-item[data-id="${poolId}"]`).click();
cy.get('.confirm-appointment-btn').click();
// 3. 验证预约成功提示
cy.get('.el-message').should('contain', '预约成功');
// 4. 验证数据库 booked_num 已实时 +1
cy.request('GET', `/api/schedule/pool/${poolId}`).then((res) => {
expect(res.body.data.booked_num).to.equal(initialBookedNum + 1);
});
});
});
});
});
// @bug562 @regression