test(admin-dashboard): syncable count excludes sync failed orders

This commit is contained in:
萝卜
2026-03-16 19:45:49 +08:00
parent 97326e9922
commit 4199c19920

View File

@@ -48,6 +48,25 @@ class AdminDashboardBillingWorkbenchSyncableCountShouldRenderTest extends TestCa
'meta' => [],
]);
// 同步失败单:不应计入“可同步”统计
PlatformOrder::query()->create([
'merchant_id' => $merchantId,
'plan_id' => null,
'site_subscription_id' => 1,
'created_by_admin_id' => $platformAdminId ?: null,
'order_no' => 'PO_DASHBOARD_SYNCABLE_BUT_FAILED_002',
'order_type' => 'new_purchase',
'status' => 'activated',
'payment_status' => 'paid',
'payable_amount' => 9,
'paid_amount' => 9,
'meta' => [
'subscription_activation_error' => [
'message' => 'sync failed',
],
],
]);
Cache::flush();
$res = $this->get('/admin');