Files
saasshop/tests/Feature/AdminProductsIndexStatusStatsAllShouldNotUseDarkActiveClassTest.php

35 lines
999 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 AdminProductsIndexStatusStatsAllShouldNotUseDarkActiveClassTest 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_products_index_status_stats_all_should_not_use_dark_active_class(): void
{
$this->loginAsPlatformAdmin();
// 访问无 status 筛选的默认页:"全部"应高亮,但不应使用深色 is-active-dark避免背景突兀
$res = $this->get('/admin/products');
$res->assertOk();
$res->assertSee('商品状态统计', false);
$res->assertSee('is-active-light', false);
$res->assertDontSee('is-active-dark', false);
}
}