feat(admin-dashboard): clarify plan share top5 meta with total and coverage

This commit is contained in:
萝卜
2026-03-16 13:49:56 +08:00
parent 0f07fe7c8b
commit a9f1185f84
3 changed files with 61 additions and 4 deletions

View File

@@ -0,0 +1,34 @@
<?php
namespace Tests\Feature;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Tests\TestCase;
class AdminDashboardPlanOrderShareTop5MetaShouldIncludeCoverageTest 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_top5_meta_should_include_total_and_coverage(): void
{
$this->loginAsPlatformAdmin();
$res = $this->get('/admin');
$res->assertOk();
// 护栏Top5 摘要行应同时声明“全量口径”和“覆盖率”,避免运营误解 Top5=全部
$res->assertSee('data-role="plan-order-share-top5-meta"', false);
$res->assertSee('全量订单', false);
$res->assertSee('覆盖率', false);
}
}