seed(); $this->post('/admin/login', [ 'email' => 'platform.admin@demo.local', 'password' => 'Platform@123456', ])->assertRedirect('/admin'); } public function test_dashboard_merchant_revenue_rank_7d_link_should_include_date_range(): void { $this->loginAsPlatformAdmin(); $res = $this->get('/admin'); $res->assertOk(); $from = now()->subDays(6)->format('Y-m-d'); $to = now()->format('Y-m-d'); // 排行卡的站点链接应带上近7天日期范围 + back $res->assertSee('data-role="merchant-revenue-rank-7d"', false); $res->assertSee('created_from=' . $from, false); $res->assertSee('created_to=' . $to, false); $res->assertSee('back=%2Fadmin', false); $res->assertDontSee('&back=', false); } }