feat(dashboard): 平台定位改为运营版北极星指标+治理Top3

This commit is contained in:
萝卜
2026-03-17 07:05:03 +08:00
parent df99fb00ed
commit 8bd838c0b6
3 changed files with 212 additions and 11 deletions

View File

@@ -0,0 +1,38 @@
<?php
namespace Tests\Feature;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Tests\TestCase;
class AdminDashboardPlatformOpsOverviewShouldRenderTest 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_should_render_platform_ops_overview_block(): void
{
$this->loginAsPlatformAdmin();
$res = $this->get('/admin');
$res->assertOk();
$html = (string) $res->getContent();
$this->assertStringContainsString('data-role="dashboard-platform-ops-overview"', $html);
$this->assertStringContainsString('平台定位(运营版)', $html);
$this->assertStringContainsString('待处理治理Top3', $html);
$this->assertStringContainsString('可BMPA', $html);
$this->assertStringContainsString('可同步', $html);
$this->assertStringContainsString('同步失败', $html);
}
}