Files
saasshop/tests/Feature/AdminDashboardBillingWorkbenchLinksTest.php

37 lines
1019 B
PHP

<?php
namespace Tests\Feature;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Tests\TestCase;
class AdminDashboardBillingWorkbenchLinksTest 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_dashboard_should_render_billing_workbench_links(): void
{
$this->loginAsPlatformAdmin();
$res = $this->get('/admin');
$res->assertOk();
$res->assertSee('收费工作台');
// 顶部菜单已提供直达入口,这里护栏只要求:收费工作台区域存在,并且页面内仍能找到收费相关链接。
$res->assertSee('/admin/platform-orders', false);
$res->assertSee('/admin/site-subscriptions', false);
$res->assertSee('/admin/plans', false);
}
}