ui(dashboard): 平台定位北极星指标补齐 mini bar

This commit is contained in:
萝卜
2026-03-17 07:37:32 +08:00
parent fb21e069a8
commit b2d5101d77
2 changed files with 63 additions and 0 deletions

View File

@@ -0,0 +1,35 @@
<?php
namespace Tests\Feature;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Tests\TestCase;
class AdminDashboardPlatformOpsOverviewNorthStarMiniBarsShouldRenderTest 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_northstar_mini_bars(): void
{
$this->loginAsPlatformAdmin();
$res = $this->get('/admin');
$res->assertOk();
$html = (string) $res->getContent();
$this->assertStringContainsString('data-role="platform-ops-northstar-bars"', $html);
$this->assertStringContainsString('data-role="ops-northstar-active-paid-merchants-bar"', $html);
$this->assertStringContainsString('data-role="ops-northstar-renewal-rate-bar"', $html);
}
}