Files
saasshop/tests/Feature/AdminDashboardKpiShouldIncludeBillingChainStatsTest.php

35 lines
838 B
PHP
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<?php
namespace Tests\Feature;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Tests\TestCase;
class AdminDashboardKpiShouldIncludeBillingChainStatsTest 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_kpi_should_include_billing_chain_stats(): void
{
$this->loginAsPlatformAdmin();
$res = $this->get('/admin');
$res->assertOk();
// 收费主链 KPI套餐/订阅/平台订单
$res->assertSee('套餐');
$res->assertSee('订阅');
$res->assertSee('平台订单');
}
}