Files
saasshop/tests/Feature/AdminDashboardMerchantRevenueRank7dCardShouldRenderTest.php
2026-03-15 23:08:29 +08:00

37 lines
997 B
PHP
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<?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);
}
}