This commit is contained in:
DariusIII
2026-04-30 16:45:15 +02:00
parent dba05ec344
commit f98fbba39c
4 changed files with 8 additions and 7 deletions
@@ -50,7 +50,7 @@ class AdminDashboardAutoRefreshTest extends TestCase
// Auto-refresh interval is preserved.
$this->assertStringContainsString('15 * 60 * 1000', $content);
// The fetch hits the cached JSON endpoint.
$this->assertStringContainsString("this.\$el.dataset.dataUrl", $content);
$this->assertStringContainsString('this.$el.dataset.dataUrl', $content);
// Each tick re-renders headline tiles + registration status + the
// visible "Last refresh" label, not just the deferred widgets.
$this->assertStringContainsString('_renderHeadlineStats(payload.stats)', $content);
@@ -31,13 +31,13 @@ class AdminDashboardSummaryWindowTest extends TestCase
// 7-day window inclusive of today (today-6 .. today).
$this->assertStringContainsString(
"\$weekStart = Carbon::now()->subDays(6)->startOfDay();",
'$weekStart = Carbon::now()->subDays(6)->startOfDay();',
$content,
'Summary window must be the last 7 calendar days inclusive of today.'
);
// Closed days from the daily aggregate, strictly before today.
$this->assertStringContainsString("UserActivityStat::query()", $content);
$this->assertStringContainsString('UserActivityStat::query()', $content);
$this->assertStringContainsString(
"->where('stat_date', '>=', \$weekStart->format('Y-m-d'))",
$content
@@ -88,7 +88,7 @@ class AdminDashboardSummaryWindowTest extends TestCase
// The previous "two-days-ago" boundary that produced the under-reporting
// bug must be gone from getSummaryStats.
$this->assertStringNotContainsString(
"\$twoDaysAgo = Carbon::now()->subDays(2)->startOfDay();",
'$twoDaysAgo = Carbon::now()->subDays(2)->startOfDay();',
$content
);
}
@@ -165,4 +165,3 @@ class AdminDashboardSummaryWindowTest extends TestCase
);
}
}