Admin dashboard: align column widths and remove height sync JS
This commit is contained in:
@@ -28,10 +28,15 @@ class AdminDashboardBillingWorkbenchLinksCarrySafeBackTest extends TestCase
|
||||
|
||||
$res->assertSee('收费工作台');
|
||||
|
||||
$res->assertSee('href="/admin/platform-orders?back=%2Fadmin%2Fplans%3Fstatus%3Dactive"', false);
|
||||
$res->assertSee('href="/admin/site-subscriptions?back=%2Fadmin%2Fplans%3Fstatus%3Dactive"', false);
|
||||
$res->assertSee('href="/admin/plans?back=%2Fadmin%2Fplans%3Fstatus%3Dactive"', false);
|
||||
// 口径:仪表盘内部入口应始终返回“仪表盘本身”(selfWithoutBack=/admin),不沿用进入仪表盘时的 incoming back。
|
||||
$res->assertSee('href="/admin/platform-orders?back=%2Fadmin"', false);
|
||||
$res->assertSee('href="/admin/site-subscriptions?back=%2Fadmin"', false);
|
||||
$res->assertSee('href="/admin/plans?back=%2Fadmin"', false);
|
||||
|
||||
// 避免 Blade 自动转义导致 back 参数中的 & 被转成 &
|
||||
$res->assertDontSee('&back=', false);
|
||||
|
||||
// 同时应不携带 incoming back。
|
||||
$res->assertDontSee('back=%2Fadmin%2Fplans%3Fstatus%3Dactive', false);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,20 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Feature;
|
||||
|
||||
use Illuminate\Foundation\Testing\RefreshDatabase;
|
||||
use Tests\TestCase;
|
||||
|
||||
class AdminJsDashboardCardsHeightSyncShouldUseRecentOrdersHeightTest extends TestCase
|
||||
{
|
||||
use RefreshDatabase;
|
||||
|
||||
public function test_admin_js_should_include_dashboard_height_sync_selectors(): void
|
||||
{
|
||||
$js = (string) file_get_contents(public_path('js/admin.js'));
|
||||
|
||||
$this->assertStringContainsString('dashboard-card-recent-platform-orders', $js);
|
||||
$this->assertStringContainsString('dashboard-card-trend', $js);
|
||||
$this->assertStringContainsString('dashboard-card-billing-workbench', $js);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Feature;
|
||||
|
||||
use Illuminate\Foundation\Testing\RefreshDatabase;
|
||||
use Tests\TestCase;
|
||||
|
||||
class AdminJsDashboardCardsWidthConsistencySelectorsShouldExistTest extends TestCase
|
||||
{
|
||||
use RefreshDatabase;
|
||||
|
||||
public function test_admin_js_should_keep_dashboard_selectors_for_future_enhancements(): void
|
||||
{
|
||||
$js = (string) file_get_contents(public_path('js/admin.js'));
|
||||
|
||||
// 需求澄清后:不再做“高度对齐”的 JS(minHeight),避免误解/副作用。
|
||||
$this->assertStringNotContainsString('minHeight', $js);
|
||||
|
||||
// 并留下显式注释,说明当前采用 CSS Grid 处理“宽度一致”。
|
||||
$this->assertStringContainsString('列宽一致', $js);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user