ui(dashboard): 平台定位(运营版)加入 mini bar 图形化

This commit is contained in:
萝卜
2026-03-17 07:27:15 +08:00
parent 90e9111471
commit 66a8319f0a
3 changed files with 119 additions and 12 deletions

View File

@@ -0,0 +1,43 @@
<?php
namespace Tests\Feature;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Tests\TestCase;
class AdminDashboardPlatformOpsOverviewMiniBarsShouldRenderTest 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_platform_ops_overview_should_render_mini_bars(): void
{
$this->loginAsPlatformAdmin();
$res = $this->get('/admin');
$res->assertOk();
$html = (string) $res->getContent();
// 收款漏斗 mini bars
$this->assertStringContainsString('data-role="platform-ops-funnel-bars"', $html);
$this->assertStringContainsString('data-role="ops-funnel-unpaid-pending-bar"', $html);
$this->assertStringContainsString('data-role="ops-funnel-paid-bar"', $html);
$this->assertStringContainsString('data-role="ops-funnel-paid-activated-bar"', $html);
// 待处理治理 Top3 mini bars
$this->assertStringContainsString('data-role="platform-ops-governance-bars"', $html);
$this->assertStringContainsString('data-role="ops-govern-bmpa-bar"', $html);
$this->assertStringContainsString('data-role="ops-govern-syncable-bar"', $html);
$this->assertStringContainsString('data-role="ops-govern-sync-failed-bar"', $html);
}
}