fix(profile): align account dialogs and contracts

This commit is contained in:
2026-10-06 01:09:04 +08:00
parent f646fa8573
commit 248912f610
17 changed files with 1339 additions and 832 deletions
+8 -13
View File
@@ -340,30 +340,25 @@ test('settings actions use rehydrated fixed-id notyf flows', () => {
const context = read('inc/helpers/aksrt-user-center.php');
const page = read('templates/pages/page-profile.php');
[
'aksrt-settings-password-code-toast',
'aksrt-settings-email-code-toast',
'aksrt-settings-password-toast',
'aksrt-settings-email-toast',
'aksrt-settings-oauth-unbind-toast',
'aksrt-settings-phone-bind-toast',
].forEach((id) => assert.match(userCenter, new RegExp("['\"]" + id + "['\"]")));
assert.match(userCenter, /aksrt-settings-oauth-unbind-toast/);
assert.doesNotMatch(userCenter, /aksrt-settings-(?:password|email|phone)-(?:code-)?toast/);
assert.match(userCenter, /notyf\([^;]+?'load'[^;]+?toastId\);/);
assert.match(userCenter, /notyf\([^;]+?'success'[^;]+?toastId\);/);
assert.match(userCenter, /notyf\([^;]+?'danger'[^;]+?toastId\);/);
assert.match(userCenter, /auto_fun\.aksrt-user-center'[\s\S]*?initSettings\(\);[\s\S]*?initBindPhone\(\);/);
assert.match(userCenter, /auto_fun\.aksrt-user-center'[\s\S]*?initSettings\(\);[\s\S]*?initSettingsCallbackToast\(\);/);
assert.doesNotMatch(userCenter, /initBindPhone\(/);
assert.match(userCenter, /aksrtSettingsInitialized/);
assert.match(userCenter, /oauth_action[\s\S]*?notyf\(message, type\)[\s\S]*?history\.replaceState/);
assert.doesNotMatch(userCenter, /oauth_unbound/);
assert.match(auth, /\[data-identity-root\], \[data-aksrt-settings-root\]/);
assert.doesNotMatch(auth, /\.settings-section/);
assert.match(userCenter, /'aksrt-settings-phone-code-toast'/);
assert.match(userCenter, /notyf\('正在发送验证码…', 'load', '', toastId\)/);
assert.match(userCenter, /notyf\([^;]+?'success', 5, toastId\)/);
assert.match(userCenter, /notyf\([^;]+?'danger', 5, toastId\)/);
assert.match(userCenter, /\/user\/phone-code/);
assert.match(userCenter, /\/user\/phone-verify/);
const accountSettings = read('inc/helpers/user-center-renderers/settings-account.php');
assert.match(accountSettings, /data-aksrt-sms-scene="verify_old_phone"/);
assert.match(accountSettings, /data-aksrt-sms-scene="bind_new_phone"/);
assert.match(settings, /require \$dir \. '\/settings-account\.php';/);
assert.doesNotMatch(context, /account_modals_html|'account-modals'/);