34 lines
924 B
PHP
34 lines
924 B
PHP
<?php
|
|
|
|
namespace Tests\Feature;
|
|
|
|
use Illuminate\Foundation\Testing\RefreshDatabase;
|
|
use Tests\TestCase;
|
|
|
|
class AdminDashboardPlanOrderSharePlanLinkShouldCarryBackTest 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_plan_link_should_carry_back(): void
|
|
{
|
|
$this->loginAsPlatformAdmin();
|
|
|
|
$res = $this->get('/admin');
|
|
$res->assertOk();
|
|
|
|
// 套餐占比表格里,点击套餐名应跳到平台订单列表并带 back 回到仪表盘
|
|
$res->assertSee('href="/admin/platform-orders?plan_id=1&back=%2Fadmin"', false);
|
|
$res->assertDontSee('&back=', false);
|
|
}
|
|
}
|