回溯点:保存注册预约客户流程修复进度
This commit is contained in:
@@ -38,6 +38,10 @@ function createPage() {
|
||||
}
|
||||
|
||||
async function run() {
|
||||
const tomorrow = new Date()
|
||||
tomorrow.setDate(tomorrow.getDate() + 2)
|
||||
const futureDate = `${tomorrow.getFullYear()}-${String(tomorrow.getMonth() + 1).padStart(2, '0')}-${String(tomorrow.getDate()).padStart(2, '0')}`
|
||||
planningApi.calendar = async () => ({ businessStartTime: '09:30', businessEndTime: '18:00', artists: [], schedules: [], appointments: [] })
|
||||
const appointmentWxml = fs.readFileSync(path.join(__dirname, 'index.wxml'), 'utf8')
|
||||
const appointmentWxss = fs.readFileSync(path.join(__dirname, 'index.wxss'), 'utf8')
|
||||
assert.match(appointmentWxml, /已选择暂不分配美甲师/)
|
||||
@@ -60,7 +64,7 @@ async function run() {
|
||||
customerName: '测试客户',
|
||||
phone: '13800138000',
|
||||
productId: '41',
|
||||
appointmentDate: '2026-10-13',
|
||||
appointmentDate: futureDate,
|
||||
appointmentTime: '14:00',
|
||||
amount: '120',
|
||||
durationMinutes: '60',
|
||||
@@ -69,6 +73,7 @@ async function run() {
|
||||
|
||||
await page.refreshAvailableTimes()
|
||||
assert.strictEqual(page.data.availableTimeGroups.length > 0, true)
|
||||
assert.strictEqual(page.data.availableTimeGroups[0].times[0].value, '09:30')
|
||||
assert.strictEqual(page.data.timeSelectTip, '请选择预约时间,美甲师可稍后分配')
|
||||
const availability = await page.checkAvailability()
|
||||
assert.strictEqual(availability.ok, true)
|
||||
@@ -121,7 +126,7 @@ async function run() {
|
||||
const walkInPage = createPage()
|
||||
Object.assign(walkInPage.data.form, {
|
||||
productId: '41',
|
||||
appointmentDate: '2026-10-13',
|
||||
appointmentDate: futureDate,
|
||||
appointmentTime: '15:00',
|
||||
amount: '88',
|
||||
durationMinutes: '45',
|
||||
|
||||
Reference in New Issue
Block a user