fix(admin-dashboard): prevent pay column header wrap

This commit is contained in:
萝卜
2026-03-16 22:38:55 +08:00
parent 502c397ec2
commit f6fa80c95c
4 changed files with 53 additions and 2 deletions

View File

@@ -26,8 +26,13 @@ class AdminDashboardRecentPlatformOrderLinksShouldCarryBackTest extends TestCase
$res = $this->get('/admin');
$res->assertOk();
$html = (string) $res->getContent();
// 从仪表盘点进订单详情后,应能通过 back 回到 /admin
$res->assertSee('href="/admin/platform-orders/1?back=%2Fadmin"', false);
// 备注:订单 ID 不应被测试写死seed 数据可能调整)。这里只校验“任意一条详情链接”携带 back=%2Fadmin。
$this->assertMatchesRegularExpression('/href="\\/admin\\/platform-orders\\/\\d+\\?back=%2Fadmin"/', $html);
// back 必须是一次性的(避免 nested back / HTML & 泄露)
$res->assertDontSee('&back=', false);
}
}