回溯点:保存注册预约客户流程修复进度

This commit is contained in:
2026-10-30 13:02:38 +08:00
parent 7b40ee1650
commit 53b6fcaa11
45 changed files with 960 additions and 132 deletions
@@ -10,6 +10,14 @@ global.wx = { showToast: () => {} }
const profileCache = require('../../utils/profile-cache')
profileCache.getProfile = async () => currentProfile
const shopApi = require('../../api/shop')
shopApi.appointmentSettings = async () => ({
shopName: '薄荷美甲',
businessHours: '09:30-21:30',
defaultAppointmentDurationMinutes: 75,
shopNameModerationStatus: 'PENDING',
pendingShopName: '薄荷指尖'
})
require('./index')
async function loadProfile(profile) {
@@ -24,7 +32,7 @@ async function loadProfile(profile) {
})
}
}
await pageDefinition.loadProfile.call(page)
await pageDefinition.loadProfileAndSettings.call(page)
return page.data
}
@@ -54,11 +62,19 @@ async function run() {
shopBusinessRemainingDays: 0
})
assert.strictEqual(expired.businessExpiryStatusText, '已过期,暂不能新增预约')
assert.strictEqual(expired.form.startTime, '09:30')
assert.strictEqual(expired.form.endTime, '21:30')
assert.strictEqual(expired.form.defaultDuration, 75)
assert.strictEqual(expired.nameModerationText, '名称审核中')
assert.strictEqual(expired.form.pendingShopName, '薄荷指尖')
const shopSettingsWxml = fs.readFileSync(path.join(__dirname, 'index.wxml'), 'utf8')
const accountSettingsWxml = fs.readFileSync(path.join(__dirname, '../account-settings/index.wxml'), 'utf8')
assert(shopSettingsWxml.includes('wx:if="{{profile.type == 2}}" class="card business-expiry-card"'))
assert(!accountSettingsWxml.includes('business-expiry-card'))
assert(!shopSettingsWxml.includes('预约规则'))
assert(shopSettingsWxml.includes('提交名称审核'))
assert(shopSettingsWxml.includes('保存预约设置'))
}
run().catch(error => {