mirror of
https://github.com/louislam/uptime-kuma.git
synced 2025-06-01 11:22:34 +02:00
fixed issue with removed googletag
This commit is contained in:
parent
0ba9bc299d
commit
b58e0dce14
2 changed files with 7 additions and 2 deletions
|
@ -120,8 +120,8 @@ class StatusPage extends BeanModel {
|
|||
|
||||
const head = $("head");
|
||||
|
||||
if (statusPage.googleAnalyticsTagId) {
|
||||
let escapedGoogleAnalyticsScript = googleAnalytics.getGoogleAnalyticsScript(statusPage.googleAnalyticsTagId);
|
||||
if (statusPage.google_analytics_tag_id) {
|
||||
let escapedGoogleAnalyticsScript = googleAnalytics.getGoogleAnalyticsScript(statusPage.google_analytics_tag_id);
|
||||
head.append($(escapedGoogleAnalyticsScript));
|
||||
}
|
||||
|
||||
|
|
|
@ -125,6 +125,11 @@ test.describe("Status Page", () => {
|
|||
expect(updateCountdown).toBeLessThanOrEqual(refreshInterval + 10);
|
||||
|
||||
await expect(page.locator("body")).toHaveClass(theme);
|
||||
|
||||
// Add Google Analytics ID to head and verify
|
||||
await page.waitForFunction(() => {
|
||||
return document.head.innerHTML.includes("googletagmanager.com");
|
||||
}, { timeout: 5000 });
|
||||
expect(await page.locator("head").innerHTML()).toContain(googleAnalyticsId);
|
||||
|
||||
const backgroundColor = await page.evaluate(() => window.getComputedStyle(document.body).backgroundColor);
|
||||
|
|
Loading…
Add table
Reference in a new issue