Files
saasshop/tests/Feature/AdminDashboardPlanOrderShareTop5MetaShouldIncludeCoverageTest.php

35 lines
988 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 AdminDashboardPlanOrderShareTop5MetaShouldIncludeCoverageTest 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_total_and_coverage(): void
{
$this->loginAsPlatformAdmin();
$res = $this->get('/admin');
$res->assertOk();
// 护栏Top5 摘要行应同时声明“全量口径”和“覆盖率”,避免运营误解 Top5=全部
$res->assertSee('data-role="plan-order-share-top5-meta"', false);
$res->assertSee('全量订单', false);
$res->assertSee('覆盖率', false);
}
}