36 lines
965 B
PHP
36 lines
965 B
PHP
<?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);
|
|
}
|
|
}
|