feat(admin): 仪表盘占比卡接入套餐订单占比(Top5)

This commit is contained in:
萝卜
2026-03-15 18:57:48 +08:00
parent 257b532757
commit a47d91df96
3 changed files with 101 additions and 3 deletions

View File

@@ -0,0 +1,36 @@
<?php
namespace Tests\Feature;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Tests\TestCase;
class AdminDashboardPlanOrderShareCardShouldRenderTest 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_plan_order_share_card_should_render(): void
{
$this->loginAsPlatformAdmin();
$res = $this->get('/admin');
$res->assertOk();
$res->assertSee('套餐订单占比', false);
$res->assertSee('Top5', false);
$res->assertSee('查看套餐', false);
// 有数据时至少应包含百分号展示
$res->assertSee('%', false);
}
}