保存客户资料与员工排班改造阶段成果
This commit is contained in:
@@ -38,6 +38,7 @@ async function run() {
|
||||
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',
|
||||
@@ -53,16 +54,19 @@ async function run() {
|
||||
await page.submit()
|
||||
assert.strictEqual(page.data.onboardingVisible, true)
|
||||
assert.strictEqual(emitted, undefined)
|
||||
|
||||
let schedulePayload
|
||||
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')
|
||||
schedulePayload = payload
|
||||
}
|
||||
page.skipFirstSchedule()
|
||||
await new Promise(resolve => setImmediate(resolve))
|
||||
assert.deepStrictEqual(schedulePayload.workDays, [1, 2, 3, 4, 5, 6, 7])
|
||||
assert.strictEqual(schedulePayload.startTime, '00:00')
|
||||
assert.strictEqual(schedulePayload.endTime, '23:59')
|
||||
assert.strictEqual(emitted.name, 'employeeCreated')
|
||||
assert.deepStrictEqual(emitted.value, { id: 88, name: '小周', title: '小周', avatar: '', autoSelect: false, scheduleSaved: false })
|
||||
assert.deepStrictEqual(emitted.value, { id: 88, name: '小周', title: '小周', avatar: '', autoSelect: true, scheduleSaved: true })
|
||||
assert.strictEqual(navigatedBack, true)
|
||||
|
||||
page.data.onboardingVisible = true
|
||||
|
||||
Reference in New Issue
Block a user