fix(frontend): 卡密兑换通知接入全局 notyf Toast 固定 id 流
- credits.js initCardPass 从 setTip 内联提示迁移为固定 id 三态 notyf 流 (aksrt-card-pass-toast:load → success/danger 原位更新), 成功后延迟 800ms 刷新以保证成功 Toast 可见,对齐其余资产操作。 - credits-wallet.php 删除 data-aksrt-card-tip 死元素;credits.css 删除 .uc-card-pass__tip 死样式。 - 契约:toast-contract 将卡密兑换纳入固定 id 流清单并禁止 tip 回潮; card-pass-universal-redeem 新增 Toast 流断言(27/27 通过)。 - 验证:容器内真实抓取 /user/balance/ 确认弹窗正常渲染且无 tip 残留。
This commit is contained in:
1 parent
64ed47165d
commit
1889c9f048
5 files changed
+28
-26
No files matched your search
@@ -223,6 +223,7 @@ test('balance center actions use direct fixed-id notyf flows', () => {
|
||||
|
||||
const flows = [
|
||||
[signinController, 'aksrt-balance-signin-toast'],
|
||||
[section('initCardPass', 'initBalanceCharge'), 'aksrt-card-pass-toast'],
|
||||
[section('initBalanceCharge', 'initTransfer'), 'aksrt-balance-charge-toast'],
|
||||
[section('initTransfer', 'initPointsExchange'), 'aksrt-balance-transfer-toast'],
|
||||
[section('initPointsExchange', 'initWithdraw'), 'aksrt-balance-points-toast'],
|
||||
@@ -233,7 +234,7 @@ test('balance center actions use direct fixed-id notyf flows', () => {
|
||||
assert.match(source, new RegExp("notyf\\([^;]+?'load'[^;]+?'" + id + "'\\);"));
|
||||
assert.match(source, new RegExp("notyf\\([^;]+?'danger'[^;]+?'" + id + "'\\);"));
|
||||
assert.match(source, new RegExp("notyf\\([^;]+?'success'[^;]+?'" + id + "'\\);"));
|
||||
assert.doesNotMatch(source, /setTip|data-(?:signin|aksrt-(?:charge|transfer|points-exchange|withdraw))-tip/);
|
||||
assert.doesNotMatch(source, /setTip|data-(?:signin|aksrt-(?:card|charge|transfer|points-exchange|withdraw))-tip/);
|
||||
});
|
||||
|
||||
assert.match(credits, /notyf\('等待支付结果…', 'load', '', 'aksrt-balance-charge-payment-toast'\)/);
|
||||
@@ -261,8 +262,8 @@ test('balance center actions use direct fixed-id notyf flows', () => {
|
||||
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/);
|
||||
assert.doesNotMatch(renderers, /data-(?:signin|aksrt-(?:card|charge|transfer|points-exchange|withdraw))-tip/);
|
||||
assert.doesNotMatch(css, /\.uc-(?:card-pass|modal|balance-card)__tip/);
|
||||
});
|
||||
|
||||
test('VIP purchase and points exchange use direct fixed-id notyf flows', () => {
|
||||
|
||||
Reference in new issue
Block a user