feat(admin): 仪表盘最近订单查看全部链接携带 back

This commit is contained in:
萝卜
2026-03-15 19:20:46 +08:00
parent 4a3e6942e6
commit daa0c19f7b
2 changed files with 36 additions and 1 deletions

View File

@@ -0,0 +1,32 @@
<?php
namespace Tests\Feature;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Tests\TestCase;
class AdminDashboardRecentPlatformOrdersViewAllLinkShouldCarryBackTest 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_recent_platform_orders_view_all_link_should_carry_back(): void
{
$this->loginAsPlatformAdmin();
$res = $this->get('/admin');
$res->assertOk();
$res->assertSee('href="/admin/platform-orders?back=%2Fadmin"', false);
$res->assertDontSee('&amp;back=', false);
}
}