顶部资料卡新增签到按钮
This commit is contained in:
1 parent
5f01b3b316
commit
d27c0757f2
7 files changed
+145
-62
No files matched your search
@@ -197,6 +197,10 @@ test('balance center actions use direct fixed-id notyf flows', () => {
|
||||
const credits = read('assets/js/credits.js');
|
||||
const scripts = read('src/Core/ScriptsPart1b.php');
|
||||
const css = read('assets/css/routes/user-center/credits.css');
|
||||
const shell = read('assets/css/routes/user-center/shell.css');
|
||||
const header = read('inc/helpers/user-center-renderers/profile-header.php');
|
||||
const signin = read('inc/helpers/user-center-renderers/credits-signin.php');
|
||||
const context = read('inc/helpers/aksrt-user-center.php');
|
||||
const renderers = [
|
||||
'inc/helpers/user-center-renderers/credits-balance.php',
|
||||
'inc/helpers/user-center-renderers/credits-wallet.php',
|
||||
@@ -228,10 +232,21 @@ test('balance center actions use direct fixed-id notyf flows', () => {
|
||||
});
|
||||
|
||||
assert.match(credits, /notyf\('等待支付结果…', 'load', '', 'aksrt-balance-charge-payment-toast'\)/);
|
||||
assert.match(credits, /querySelectorAll\('\[data-signin-btn\]'\)/);
|
||||
assert.match(credits, /freshButtons\.forEach[\s\S]*?addEventListener\('click'/);
|
||||
assert.match(credits, /onTimeout:[\s\S]*?notyf\([^;]+?'danger'[^;]+?'aksrt-balance-charge-payment-toast'\)/);
|
||||
assert.match(credits, /register\('credits',[\s\S]*?initSignin\(\);[\s\S]*?initBalanceCharge\(\);[\s\S]*?initTransfer\(\);[\s\S]*?initPointsExchange\(\);[\s\S]*?initWithdraw\(\);/);
|
||||
assert.match(credits, /aksrtSigninInitialized[\s\S]*?aksrtPointsExchangeInitialized[\s\S]*?aksrtWithdrawInitialized/);
|
||||
assert.match(scripts, /'aksrt-credits',[\s\S]*?\/assets\/js\/credits\.js',[\s\S]*?\[[^\]]*'aksrt-notyf'[^\]]*\]/);
|
||||
assert.ok(header.indexOf('data-signin-btn') < header.indexOf('uc-header__message-btn'));
|
||||
assert.match(header, /uc-header__message-btn[^>]+aria-label="<\?php esc_attr_e\('消息通知'/);
|
||||
assert.doesNotMatch(header, /<i class="fa fas fa-bell"[^>]*><\/i>\s*<\?php esc_html_e\('消息通知'/);
|
||||
assert.match(header, /data-signin-captcha[\s\S]*?aksrt_render_captcha\('signin'\)/);
|
||||
assert.doesNotMatch(signin, /data-signin-captcha|aksrt_render_captcha/);
|
||||
assert.match(context, /'signin_enabled'\s*=>\s*\$signin_enabled/);
|
||||
assert.match(context, /'signin_signed_today'\s*=>\s*\$signin_signed_today/);
|
||||
assert.match(shell, /\.uc-header__actions\s*\{[^}]*display:\s*flex;[^}]*gap:\s*6px;/s);
|
||||
assert.match(shell, /\.uc-header__message-btn\s*\{[^}]*position:\s*relative;/s);
|
||||
assert.doesNotMatch(renderers, /data-(?:signin|aksrt-(?:charge|transfer|points-exchange|withdraw))-tip/);
|
||||
assert.doesNotMatch(css, /\.uc-(?:modal|balance-card)__tip/);
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user