feat(admin-js): merchant revenue mini rank rows clickable via table links
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Feature;
|
||||
|
||||
use Tests\TestCase;
|
||||
|
||||
class AdminJsMerchantRevenueRank7dShouldFindTableLinkByMerchantIdSelectorTest extends TestCase
|
||||
{
|
||||
public function test_admin_js_merchant_revenue_rank_7d_should_find_table_link_by_merchant_id_selector(): void
|
||||
{
|
||||
$js = (string) file_get_contents(public_path('js/admin.js'));
|
||||
|
||||
// 护栏:迷你排行应尝试从表格中复用 merchant_id 的链接(避免硬编码 URL 口径)
|
||||
$this->assertStringContainsString(
|
||||
'[data-role="merchant-revenue-rank-7d"] a.link[href*="merchant_id=',
|
||||
$js
|
||||
);
|
||||
|
||||
// 且会把行渲染为 a/div 二选一
|
||||
$this->assertStringContainsString("document.createElement(href ? 'a' : 'div')", $js);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user