Files
saasshop/tests/Feature/AdminDashboardPlanOrderShareTop5MetaShouldIncludeOtherCountTest.php

35 lines
977 B
PHP
Raw Permalink 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 AdminDashboardPlanOrderShareTop5MetaShouldIncludeOtherCountTest 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_count(): void
{
$this->loginAsPlatformAdmin();
$res = $this->get('/admin');
$res->assertOk();
// “其它”除了占比外,还应展示单量(全量-Top5让运营更直观感知长尾规模。
$res->assertSee('data-role="plan-order-share-top5-meta"', false);
$res->assertSee('其它:', false);
$res->assertSee('单)', false);
}
}