完善店员申请关联与预约页面
This commit is contained in:
@@ -5,6 +5,7 @@ const path = require('path')
|
||||
const modalChoices = []
|
||||
const toasts = []
|
||||
const modals = []
|
||||
const navigations = []
|
||||
global.wx = {
|
||||
getAccountInfoSync: () => ({ miniProgram: { envVersion: 'develop' } }),
|
||||
getDeviceInfo: () => ({ platform: 'devtools' }),
|
||||
@@ -12,7 +13,8 @@ global.wx = {
|
||||
showModal: options => {
|
||||
modals.push(options)
|
||||
options.success({ confirm: modalChoices.shift() !== false })
|
||||
}
|
||||
},
|
||||
navigateTo: options => navigations.push(options.url)
|
||||
}
|
||||
global.getApp = () => ({ globalData: { userInfo: { type: 2 }, openEmployeeReview: false } })
|
||||
|
||||
@@ -83,7 +85,8 @@ async function run() {
|
||||
page.data.reviewApplications = [application]
|
||||
await page.approveApplication({ currentTarget: { dataset: { id: 12 } } })
|
||||
assert.strictEqual(page.data.associationSheetVisible, false)
|
||||
assert(modals.some(item => String(item.content || '').includes('当前门店没有未关联微信的美甲师档案')))
|
||||
assert(modals.some(item => item.confirmText === '去新建'))
|
||||
assert.strictEqual(navigations.pop(), '/pages/employee-create/index?applicationId=12&applicationNo=')
|
||||
}
|
||||
|
||||
run().catch(error => {
|
||||
|
||||
Reference in New Issue
Block a user