test: the report entry test follows the toast split of BUG-2060
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DbBXoyn7Hj3LCW3BUs5bZ8
This commit is contained in:
@@ -174,12 +174,12 @@ test("entry stays on one line and sends failures to the existing toast", () => {
|
||||
// 原值: /toast\.error\(outcome\.message\)/ 与 /toast\.error\("网络异常,请检查连接后重试。"\)/(直接调 sonner)
|
||||
// 新值: 同两处改走 notifyError(同一个 toast,带 6 秒与关闭按钮的全站口径)
|
||||
// 原因: 2026-09-30 全站提示统一走 src/lib/notify.ts
|
||||
// 原值: 创建失败走 notifyError(toast)
|
||||
// 新值: 创建失败写在开始弹窗里(弹窗不关),点数不够带「去补点数」
|
||||
// 原因: BUG-2046,开始弹窗沿用年运开始卡的错误位置;弹窗开着时 toast 会被遮在后面
|
||||
assert.match(componentSource, /setStartError\(startErrorForCreate\(response\.status, json\)\)/);
|
||||
assert.match(componentSource, /setStartError\(\{ message: "网络异常,请检查连接后重试。" \}\)/);
|
||||
assert.doesNotMatch(componentSource, /notifyError/);
|
||||
// 原值: 创建失败写在开始弹窗里(BUG-2046),组件里不出现 notifyError
|
||||
// 新值: 只有「点数不够」写在弹窗里(带「去补点数」);其余创建失败和网络异常走 notifyError,弹窗不关
|
||||
// 原因: BUG-2060,产品负责人 2026-11-20:成功或失败的提示用系统提示,不占布局。
|
||||
// 开始弹窗是 z-50 的浮层,系统提示在它上面,不会被遮住。
|
||||
assert.match(componentSource, /if \(failure\.billing\) setStartError\(failure\);\n\s+else notifyError\(failure\.message\);/);
|
||||
assert.match(componentSource, /notifyError\("网络异常,请检查连接后重试。"\)/);
|
||||
assert.doesNotMatch(componentSource, /personal-report-entry-note/);
|
||||
assert.doesNotMatch(componentSource, /flex-wrap/);
|
||||
assert.match(globalStyles, /\.chat-header-actions \{[^}]*min-width: max-content;[^}]*display: flex;[^}]*white-space: nowrap;/);
|
||||
|
||||
Reference in New Issue
Block a user