Files
saasshop/tests/Feature/AdminDashboardPlatformOrderFunnelShouldExplainMetricsTest.php

35 lines
916 B
PHP

<?php
namespace Tests\Feature;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Tests\TestCase;
class AdminDashboardPlatformOrderFunnelShouldExplainMetricsTest 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_platform_order_funnel_explanation_text(): void
{
$this->loginAsPlatformAdmin();
$res = $this->get('/admin');
$res->assertOk();
$res->assertSee('口径说明');
$res->assertSee('待支付=unpaid+pending');
$res->assertSee('待生效=paid+pending+unsynced');
$res->assertSee('可同步=paid+activated+unsynced+非失败');
}
}