fix(admin): 兼容提现金额历史配置
This commit is contained in:
@@ -11,6 +11,7 @@ const styles = read('assets/admin/src/style.css')
|
||||
const field = read('assets/admin/src/components/form/AksField.vue')
|
||||
const fieldGroup = read('assets/admin/src/components/form/AksFieldGroup.vue')
|
||||
const formRenderer = read('assets/admin/src/components/form/AksFormRenderer.vue')
|
||||
const schemaProvider = read('src/Admin/SchemaProvider.php')
|
||||
|
||||
test('admin theme exposes the approved white, grey, and green tokens', () => {
|
||||
const requiredTokens = {
|
||||
@@ -63,6 +64,17 @@ test('navigation, focus, responsive layout, and reduced motion are contracted',
|
||||
assert.match(styles, /@media \(prefers-reduced-motion:\s*reduce\)/)
|
||||
})
|
||||
|
||||
test('money decimal settings normalize legacy numeric values before validation', () => {
|
||||
assert.match(schemaProvider, /private function normalize_money_decimal\(\$value\): string/)
|
||||
assert.match(schemaProvider, /if \(is_int\(\$value\)\)/)
|
||||
assert.match(schemaProvider, /is_finite\(\$value\)/)
|
||||
assert.match(schemaProvider, /AssetAmount::balance\(trim\(\$value\)\)->decimal\(\)/)
|
||||
assert.match(schemaProvider, /sanitize_type.*money_decimal[\s\S]*?normalize_money_decimal\(\$data\[\$field\['key'\]\]\)/)
|
||||
assert.match(schemaProvider, /sanitize_type.*money_decimal[\s\S]*?normalize_money_decimal\(\$value\)/)
|
||||
assert.match(read('assets/admin/src/schema/sections/payment/withdrawal.js'), /affiliate_min_withdrawal: '50\.00'/)
|
||||
assert.match(read('assets/admin/src/schema/sections/payment/withdrawal.js'), /affiliate_daily_withdrawal_limit: '500\.00'/)
|
||||
})
|
||||
|
||||
test('captcha scene whitelist matches both admin schemas and excludes dead email verification', () => {
|
||||
const captcha = read('inc/modules/captcha.php')
|
||||
const phpSchema = read('src/Admin/Schema/SchemaPermissions.php')
|
||||
|
||||
Reference in New Issue
Block a user