Files
saasshop/tests/Feature/AdminSiteSubscriptionStatusCardsCrossLinksTest.php

35 lines
908 B
PHP

<?php
namespace Tests\Feature;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Tests\TestCase;
class AdminSiteSubscriptionStatusCardsCrossLinksTest 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_status_summary_cards_should_have_cross_links(): void
{
$this->loginAsPlatformAdmin();
$this->get('/admin/site-subscriptions')
->assertOk()
->assertSee('查看待生效')
->assertSee('查看已生效')
->assertSee('status=activated', false)
->assertSee('status=pending', false)
->assertSee('status=cancelled', false);
}
}