feat(plans): make summary cards clickable for governance navigation

This commit is contained in:
萝卜
2026-03-14 22:06:35 +00:00
parent c1341c15b6
commit 55d2038ebb
2 changed files with 55 additions and 4 deletions

View File

@@ -0,0 +1,36 @@
<?php
namespace Tests\Feature;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Tests\TestCase;
class AdminPlanIndexSummaryCardsAreClickableTest 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_summary_cards_should_link_to_filtered_sets(): void
{
$this->loginAsPlatformAdmin();
$this->get('/admin/plans')
->assertOk()
->assertSee('套餐总数')
->assertSee('启用中套餐')
->assertSee('月付套餐')
->assertSee('年付套餐')
->assertSee('status=active', false)
->assertSee('billing_cycle=monthly', false)
->assertSee('billing_cycle=yearly', false);
}
}