Files
saasshop/tests/Feature/AdminPlatformOrderIndexToolsGroupedLayoutTest.php

42 lines
1.3 KiB
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 AdminPlatformOrderIndexToolsGroupedLayoutTest 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_index_should_render_tools_area_grouped_into_two_column_layout(): void
{
$this->loginAsPlatformAdmin();
$res = $this->get('/admin/platform-orders');
$res->assertOk();
// 工具区:两列分组卡片化(避免回退成散落/错乱布局)
$res->assertSee('tool-grid', false);
$res->assertSee('tool-group', false);
$res->assertSee('tool-group-title', false);
$res->assertSee('导出', false);
$res->assertSee('批量同步订阅', false);
$res->assertSee('批量标记支付并生效BMPA', false);
$res->assertSee('批量仅标记为已生效', false);
$res->assertSee('清理失败标记:同步订阅', false);
$res->assertSee('清理失败标记:批量 BMPA', false);
}
}