Files
saasshop/tests/Feature/AdminJsPlatformOrderTrend7dShouldReuseTableDateLinksSelectorTest.php

21 lines
776 B
PHP
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<?php
namespace Tests\Feature;
use Tests\TestCase;
class AdminJsPlatformOrderTrend7dShouldReuseTableDateLinksSelectorTest extends TestCase
{
public function test_admin_js_platform_order_trend_7d_should_reuse_table_date_links_selector(): void
{
$js = (string) file_get_contents(public_path('js/admin.js'));
// 护栏:趋势图应从表格复用日期链接口径(避免 JS 里硬编码 created_from/to 规则)
$this->assertStringContainsString('[data-role="platform-order-trend-7d"] a.link', $js);
// 且支持 a/div 二选一(可点击则 <a>
$this->assertStringContainsString("document.createElement(href ? 'a' : 'div')", $js);
$this->assertStringContainsString('adm-mini-chart-bar-link', $js);
}
}