Dashboard: add platform order governance mini bars for persuasion

This commit is contained in:
萝卜
2026-03-17 02:09:30 +08:00
parent 7b43b5b4f5
commit 002fe59e1d
2 changed files with 75 additions and 0 deletions

View File

@@ -0,0 +1,36 @@
<?php
namespace Tests\Feature;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Tests\TestCase;
class AdminDashboardPlatformOrderGovernanceMiniBarsShouldRenderTest 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_order_governance_mini_bars(): void
{
$this->loginAsPlatformAdmin();
$res = $this->get('/admin');
$res->assertOk();
$html = (string) $res->getContent();
$this->assertStringContainsString('data-role="dashboard-po-governance-bars"', $html);
$this->assertStringContainsString('data-role="dashboard-po-sync-failed-bar"', $html);
$this->assertStringContainsString('data-role="dashboard-po-no-receipt-bar"', $html);
$this->assertStringContainsString('data-role="dashboard-po-renewal-missing-bar"', $html);
}
}