From 7383bfb78854ed18cbcd3ea8335db01513a4fa74 Mon Sep 17 00:00:00 2001 From: Joffrey JAFFEUX Date: Wed, 2 Jul 2025 14:59:26 +0200 Subject: [PATCH] FIX: broken test due to user timezone (#763) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The commit d878317c5f875fc7e67c0acbae62b7a6fb0849a7 set the calendar timezone to the user’s timezone when available and as result broke this test. --- test/javascripts/acceptance/upcoming-events-calendar-test.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/test/javascripts/acceptance/upcoming-events-calendar-test.js b/test/javascripts/acceptance/upcoming-events-calendar-test.js index 85548c38..b5943ee7 100644 --- a/test/javascripts/acceptance/upcoming-events-calendar-test.js +++ b/test/javascripts/acceptance/upcoming-events-calendar-test.js @@ -4,7 +4,6 @@ import { tomorrow, twoDays } from "discourse/lib/time-utils"; import { acceptance, exists, - query, queryAll, } from "discourse/tests/helpers/qunit-helpers"; @@ -101,13 +100,13 @@ acceptance("Discourse Calendar - Upcoming Events Calendar", function (needs) { await visit("/upcoming-events"); assert.strictEqual( - query(".fc-row tr:first-child .fc-event").style.backgroundColor, + queryAll(".fc-event")[0].style.backgroundColor, "rgb(190, 10, 10)", "Event item uses the proper color from category 1" ); assert.strictEqual( - query(".fc-row tr:nth-child(2) .fc-event").style.backgroundColor, + queryAll(".fc-event")[1].style.backgroundColor, "rgb(15, 120, 190)", "Event item uses the proper color from category 2" );