保存客户与美甲师表单改造检查点

This commit is contained in:
2026-10-29 17:02:57 +08:00
parent bb3d00c51e
commit b3a8c7e01c
24 changed files with 425 additions and 60 deletions
@@ -34,19 +34,33 @@ const page = {
async function run() {
page.onInput({ currentTarget: { dataset: { field: 'phone' } }, detail: { value: '13800138000' } })
assert.strictEqual(page.data.form.account, '13800138000')
page.onInput({ currentTarget: { dataset: { field: 'account' } }, detail: { value: 'staff_zhou' } })
page.onInput({ currentTarget: { dataset: { field: 'phone' } }, detail: { value: '13900139000' } })
assert.strictEqual(page.data.form.account, 'staff_zhou')
assert.strictEqual(page.data.form.color, '#8FB89A')
Object.assign(page.data.form, {
nickname: '小周',
phone: '13800138000',
account: '13800138000',
password: 'Fingertip@123',
wechatId: 'wx_zhou'
wechatId: ''
})
employeesApi.createUser = async () => 88
employeesApi.createUser = async payload => {
assert.strictEqual(payload.wechatId, '')
assert.strictEqual(payload.color, '#8FB89A')
return 88
}
await page.submit()
assert.strictEqual(page.data.onboardingVisible, true)
assert.strictEqual(emitted, undefined)
page.data.pickerMode = true
employeesApi.saveScheduleRule = async payload => {
assert.deepStrictEqual(payload.workDays, [1, 2, 3, 4, 5, 6, 7])
assert.strictEqual(payload.startTime, '00:00')
assert.strictEqual(payload.endTime, '23:59')
}
page.skipFirstSchedule()
await new Promise(resolve => setImmediate(resolve))
assert.strictEqual(emitted.name, 'employeeCreated')
assert.deepStrictEqual(emitted.value, { id: 88, name: '小周', title: '小周', avatar: '', autoSelect: false, scheduleSaved: false })
assert.strictEqual(navigatedBack, true)