36 lines
1.3 KiB
TypeScript
Executable File
36 lines
1.3 KiB
TypeScript
Executable File
import { describe, it, beforeEach } from 'cypress'
|
|
|
|
describe('Bug Regression Tests', () => {
|
|
beforeEach(() => {
|
|
cy.clearCookies()
|
|
cy.clearLocalStorage()
|
|
})
|
|
|
|
it('@bug561 @regression 医嘱总量单位应正确显示诊疗目录配置值而非null', () => {
|
|
// 1. 登录门诊医生站
|
|
cy.visit('/login')
|
|
cy.get('[data-cy="username-input"]').type('doctor1')
|
|
cy.get('[data-cy="password-input"]').type('123456')
|
|
cy.get('[data-cy="login-btn"]').click()
|
|
cy.url().should('include', '/outpatient')
|
|
|
|
// 2. 选择患者并进入医嘱开立
|
|
cy.get('[data-cy="patient-select"]').click()
|
|
cy.get('.el-select-dropdown__item').first().click()
|
|
cy.get('[data-cy="order-tab"]').click()
|
|
|
|
// 3. 开立手术/诊疗项目
|
|
cy.get('[data-cy="add-order-btn"]').click()
|
|
cy.get('[data-cy="catalog-search-input"]').type('超声切骨刀辅助操作')
|
|
cy.get('.el-autocomplete-suggestion__list li').first().click()
|
|
cy.get('[data-cy="submit-order-btn"]').click()
|
|
cy.get('.el-message--success').should('be.visible')
|
|
|
|
// 4. 验证总量单位显示
|
|
cy.get('[data-cy="order-table"] .el-table__body tr').first().within(() => {
|
|
cy.get('[data-cy="total-quantity-cell"]').should('not.contain', 'null')
|
|
cy.get('[data-cy="total-quantity-cell"]').should('contain', '次')
|
|
})
|
|
})
|
|
})
|