feat(plans): add cross links in summary cards

This commit is contained in:
萝卜
2026-03-14 22:21:29 +00:00
parent 8c04a8fef8
commit 3f2f66b65e
2 changed files with 44 additions and 0 deletions

View File

@@ -0,0 +1,35 @@
<?php
namespace Tests\Feature;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Tests\TestCase;
class AdminPlanIndexSummaryCardsCrossLinksTest 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_have_cross_links_for_quick_navigation(): void
{
$this->loginAsPlatformAdmin();
$this->get('/admin/plans')
->assertOk()
->assertSee('查看停用套餐')
->assertSee('查看年付套餐')
->assertSee('查看月付套餐')
->assertSee('status=inactive', false)
->assertSee('billing_cycle=monthly', false)
->assertSee('billing_cycle=yearly', false);
}
}