进行了一些小优化
This commit is contained in:
1 parent
eef73ee9e7
commit
4c81980804
3 files changed
+157
-66
No files matched your search
@@ -185,7 +185,7 @@ test('native user profile omits ledger tables and renders canonical images eager
|
||||
assert.doesNotMatch(level, /Level::get_badge_html/);
|
||||
});
|
||||
|
||||
test('identity details and governed status actions are editable on the native profile', () => {
|
||||
test('identity status and public details are directly editable on the native profile', () => {
|
||||
const auth = read('src/User/AuthApply.php');
|
||||
const transitions = read('src/Identity/TransitionService.php');
|
||||
|
||||
@@ -193,10 +193,19 @@ test('identity details and governed status actions are editable on the native pr
|
||||
assert.match(auth, /current_user_can\('aksrt_review_identity'\)/);
|
||||
assert.match(auth, /wp_nonce_field\('aksrt_identity_profile_' \.[\s\S]*?'aksrt_identity_profile_nonce'\)/);
|
||||
assert.match(auth, /name="aksrt_identity_application_uuid"/);
|
||||
assert.match(auth, /name="aksrt_identity_type"/);
|
||||
assert.match(auth, /value="personal"[\s\S]*?个人认证/);
|
||||
assert.match(auth, /value="enterprise"[\s\S]*?企业认证/);
|
||||
assert.match(auth, /name="aksrt_identity_public_name"/);
|
||||
assert.match(auth, /name="aksrt_identity_public_desc"/);
|
||||
assert.match(auth, /name="aksrt_identity_action"/);
|
||||
assert.match(auth, /TransitionService::allowed_targets/);
|
||||
assert.match(auth, /self::review\(\$user_id, \$application_uuid, \$action, \$note, get_current_user_id\(\), \$fields\)/);
|
||||
assert.match(transitions, /public static function allowed_targets/);
|
||||
assert.match(auth, /name="aksrt_identity_status"/);
|
||||
assert.match(auth, /'manual_pending' => __\('待审核'/);
|
||||
assert.match(auth, /'verified' => __\('已认证'/);
|
||||
assert.match(auth, /'rejected' => __\('已驳回'/);
|
||||
assert.match(auth, /create_admin_application\(\$repo, \$user_id, \$fields\)/);
|
||||
assert.match(auth, /'type' => \$fields\['type'\]/);
|
||||
assert.match(auth, /self::review\(\$user_id, \$application_uuid, \$target_status, \$note, get_current_user_id\(\), \$fields\)/);
|
||||
assert.match(transitions, /public function admin_transition/);
|
||||
assert.match(transitions, /\? in_array\(\$next, \['manual_pending', 'verified', 'rejected', 'cancelled'\], true\)/);
|
||||
assert.match(transitions, /'verified' => \['cancelled'\]/);
|
||||
});
|
||||
Reference in new issue
Block a user