Files
saasshop/tests/Feature/AdminDashboardPlanOrderShareTop5MetaShouldIncludeOtherPctTest.php

35 lines
967 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 AdminDashboardPlanOrderShareTop5MetaShouldIncludeOtherPctTest 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_plan_order_share_top5_meta_should_include_other_pct(): void
{
$this->loginAsPlatformAdmin();
$res = $this->get('/admin');
$res->assertOk();
// Top5 占比卡摘要行应包含“其它”占比100%-覆盖率),避免运营误读 Top5=全部。
$res->assertSee('data-role="plan-order-share-top5-meta"', false);
$res->assertSee('其它:', false);
$res->assertSee('%', false);
}
}