feat(admin-dashboard): plan share meta shows other count

This commit is contained in:
萝卜
2026-03-16 14:53:33 +08:00
parent c1afc14b75
commit 9852d9b00e
2 changed files with 36 additions and 1 deletions

View File

@@ -0,0 +1,34 @@
<?php
namespace Tests\Feature;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Tests\TestCase;
class AdminDashboardPlanOrderShareTop5MetaShouldIncludeOtherCountTest 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_other_count(): void
{
$this->loginAsPlatformAdmin();
$res = $this->get('/admin');
$res->assertOk();
// “其它”除了占比外,还应展示单量(全量-Top5让运营更直观感知长尾规模。
$res->assertSee('data-role="plan-order-share-top5-meta"', false);
$res->assertSee('其它:', false);
$res->assertSee('单)', false);
}
}