feat(admin): 仪表盘 KPI 聚焦收费主链(套餐/订阅/平台订单)

This commit is contained in:
萝卜
2026-03-15 19:23:31 +08:00
parent daa0c19f7b
commit 2f0c3ca11b
3 changed files with 46 additions and 9 deletions

View File

@@ -0,0 +1,34 @@
<?php
namespace Tests\Feature;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Tests\TestCase;
class AdminDashboardKpiShouldIncludeBillingChainStatsTest extends TestCase
{
use RefreshDatabase;
protected function loginAsPlatformAdmin(): void
{
$this->seed();
$this->post('/admin/login', [
'email' => 'platform.admin@demo.local',
'password' => 'Platform@123456',
])->assertRedirect('/admin');
}
public function test_dashboard_kpi_should_include_billing_chain_stats(): void
{
$this->loginAsPlatformAdmin();
$res = $this->get('/admin');
$res->assertOk();
// 收费主链 KPI套餐/订阅/平台订单
$res->assertSee('套餐');
$res->assertSee('订阅');
$res->assertSee('平台订单');
}
}