feat: dashboard merchant revenue rank top5 7d

This commit is contained in:
萝卜
2026-03-15 23:08:29 +08:00
parent 397789df92
commit e92636dd5b
3 changed files with 102 additions and 3 deletions

View File

@@ -0,0 +1,36 @@
<?php
namespace Tests\Feature;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Tests\TestCase;
class AdminDashboardMerchantRevenueRank7dCardShouldRenderTest 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_merchant_revenue_rank_7d_card_should_render(): void
{
$this->loginAsPlatformAdmin();
$res = $this->get('/admin');
$res->assertOk();
$res->assertSee('排行近7天站点收入 Top5', false);
$res->assertSee('data-role="merchant-revenue-rank-7d"', false);
// 链接应携带 back保持仪表盘治理链路一致性
$res->assertSee('back=%2Fadmin', false);
$res->assertDontSee('&amp;back=', false);
}
}