Dashboard:收费工作台快捷入口收敛为治理导向 + 平台定位(运营版)断言护栏

This commit is contained in:
萝卜
2026-03-17 07:18:46 +08:00
parent 8bd838c0b6
commit f50272ffc9
5 changed files with 118 additions and 11 deletions

View File

@@ -0,0 +1,39 @@
<?php
namespace Tests\Feature;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Tests\TestCase;
class AdminDashboardPlatformPositioningShouldRenderTest 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_platform_positioning_should_render_core_metrics_and_top3_governance_links(): void
{
$this->loginAsPlatformAdmin();
$res = $this->get('/admin');
$res->assertOk();
$html = (string) $res->getContent();
$this->assertStringContainsString('data-role="dashboard-platform-ops-overview"', $html);
$this->assertStringContainsString('平台定位(运营版)', $html);
$this->assertStringContainsString('近30天已收款', $html);
$this->assertStringContainsString('活跃付费站点', $html);
$this->assertStringContainsString('续费成功率30天', $html);
$this->assertStringContainsString('收款漏斗近7天', $html);
$this->assertStringContainsString('待处理治理Top3', $html);
}
}