From a1f95e152952a1f9c70463b108f0888c480ed4df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=90=9D=E5=8D=9C?= Date: Wed, 18 Mar 2026 14:39:06 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B5=8B=E8=AF=95:=20=E4=BB=AA=E8=A1=A8?= =?UTF-8?q?=E7=9B=98=E8=BF=B7=E4=BD=A0=E5=9B=BE=E5=A4=8D=E7=94=A8=E8=A1=A8?= =?UTF-8?q?=E6=A0=BC=E9=93=BE=E6=8E=A5=E9=80=89=E6=8B=A9=E5=99=A8=E6=8A=A4?= =?UTF-8?q?=E6=A0=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...artsShouldReuseTableLinksSelectorsTest.php | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 tests/Feature/AdminJsDashboardMiniChartsShouldReuseTableLinksSelectorsTest.php diff --git a/tests/Feature/AdminJsDashboardMiniChartsShouldReuseTableLinksSelectorsTest.php b/tests/Feature/AdminJsDashboardMiniChartsShouldReuseTableLinksSelectorsTest.php new file mode 100644 index 0000000..7513450 --- /dev/null +++ b/tests/Feature/AdminJsDashboardMiniChartsShouldReuseTableLinksSelectorsTest.php @@ -0,0 +1,25 @@ +assertStringContainsString('[data-role="platform-order-trend-7d"] a.link', $js); + + // 排行:复用站点表格链接(按 merchant_id 提取) + $this->assertStringContainsString('[data-role="merchant-revenue-rank-7d"] a.link[href*="merchant_id="]', $js); + + // 占比:复用套餐表格链接(按 plan_id 提取) + $this->assertStringContainsString('[data-role="plan-order-share-top5"] a.link[href*="plan_id="]', $js); + + // 渐进增强:可点击则 + $this->assertStringContainsString("document.createElement(href ? 'a' : 'div')", $js); + } +}