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

This commit is contained in:
萝卜
2026-03-14 21:59:33 +00:00
parent ffc88feede
commit c1341c15b6
2 changed files with 65 additions and 6 deletions

View File

@@ -0,0 +1,40 @@
<?php
namespace Tests\Feature;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Tests\TestCase;
class AdminSiteSubscriptionIndexSummaryCardsAreClickableTest 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/site-subscriptions')
->assertOk()
->assertSee('订阅总数')
->assertSee('已生效')
->assertSee('待生效')
->assertSee('已取消')
->assertSee('已过期(按到期时间)')
->assertSee('7天内到期')
->assertSee('status=activated', false)
->assertSee('status=pending', false)
->assertSee('status=cancelled', false)
->assertSee('expiry=expired', false)
->assertSee('expiry=expiring_7d', false);
}
}