feat(subscriptions): add cross links between expiry summary cards
This commit is contained in:
@@ -152,12 +152,18 @@
|
||||
<div class="num-md">
|
||||
<a class="link" href="{!! $safeFullUrlWithQuery(['expiry' => 'expired', 'page' => null]) !!}">{{ $summaryStats['expired_subscriptions'] ?? 0 }}</a>
|
||||
</div>
|
||||
<div class="muted muted-xs">
|
||||
<a class="link" href="{!! $safeFullUrlWithQuery(['expiry' => 'expiring_7d', 'page' => null]) !!}">查看7天内到期</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card">
|
||||
<h3>7天内到期</h3>
|
||||
<div class="num-md">
|
||||
<a class="link" href="{!! $safeFullUrlWithQuery(['expiry' => 'expiring_7d', 'page' => null]) !!}">{{ $summaryStats['expiring_7d_subscriptions'] ?? 0 }}</a>
|
||||
</div>
|
||||
<div class="muted muted-xs">
|
||||
<a class="link" href="{!! $safeFullUrlWithQuery(['expiry' => 'expired', 'page' => null]) !!}">查看已过期</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Feature;
|
||||
|
||||
use Illuminate\Foundation\Testing\RefreshDatabase;
|
||||
use Tests\TestCase;
|
||||
|
||||
class AdminSiteSubscriptionExpiryCardsCrossLinksTest 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_expiry_summary_cards_should_have_cross_links(): void
|
||||
{
|
||||
$this->loginAsPlatformAdmin();
|
||||
|
||||
$this->get('/admin/site-subscriptions')
|
||||
->assertOk()
|
||||
->assertSee('已过期(按到期时间)')
|
||||
->assertSee('7天内到期')
|
||||
->assertSee('查看7天内到期')
|
||||
->assertSee('查看已过期')
|
||||
->assertSee('expiry=expiring_7d', false)
|
||||
->assertSee('expiry=expired', false);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user