feat(plans): make summary cards clickable for governance navigation
This commit is contained in:
36
tests/Feature/AdminPlanIndexSummaryCardsAreClickableTest.php
Normal file
36
tests/Feature/AdminPlanIndexSummaryCardsAreClickableTest.php
Normal 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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user