@@ -22,6 +22,19 @@ describe("Calendar module", () => {
2222 return await loc . count ( ) ;
2323 } ;
2424
25+ /**
26+ * Use this for debugging broken tests, it will console log the text of the calendar module
27+ * @returns {Promise<void> }
28+ */
29+ const logAllText = async ( ) => {
30+ expect ( global . page ) . not . toBeNull ( ) ;
31+ const loc = await global . page . locator ( ".calendar .event" ) ;
32+ const elem = loc . first ( ) ;
33+ await elem . waitFor ( ) ;
34+ expect ( elem ) . not . toBeNull ( ) ;
35+ console . log ( await loc . allInnerTexts ( ) ) ;
36+ } ;
37+
2538 const first = 0 ;
2639 const second = 1 ;
2740 const third = 2 ;
@@ -153,19 +166,6 @@ describe("Calendar module", () => {
153166 * RRULE TESTS:
154167 * Add any tests that check rrule functionality here.
155168 */
156- describe ( "sliceMultiDayEvents" , ( ) => {
157- it ( "Issue #3452 split multiday in Europe" , async ( ) => {
158- await helpers . startApplication ( "tests/configs/modules/calendar/sliceMultiDayEvents.js" , "01 Sept 2024 10:38:00 GMT+02:00" , [ ] , "Europe/Berlin" ) ;
159- expect ( global . page ) . not . toBeNull ( ) ;
160- const loc = await global . page . locator ( ".calendar .event" ) ;
161- const elem = loc . first ( ) ;
162- await elem . waitFor ( ) ;
163- expect ( elem ) . not . toBeNull ( ) ;
164- const cnt = await loc . count ( ) ;
165- expect ( cnt ) . toBe ( 6 ) ;
166- } ) ;
167- } ) ;
168-
169169 describe ( "sliceMultiDayEvents direct count" , ( ) => {
170170 it ( "Issue #3452 split multiday in Europe" , async ( ) => {
171171 await helpers . startApplication ( "tests/configs/modules/calendar/sliceMultiDayEvents.js" , "01 Sept 2024 10:38:00 GMT+02:00" , [ ] , "Europe/Berlin" ) ;
@@ -197,21 +197,30 @@ describe("Calendar module", () => {
197197 describe ( "berlin late in day event moved, viewed from berlin" , ( ) => {
198198 it ( "Issue #unknown rrule ETC+2 close to timezone edge" , async ( ) => {
199199 await helpers . startApplication ( "tests/configs/modules/calendar/end_of_day_berlin_moved.js" , "08 Oct 2024 12:30:00 GMT+02:00" , [ ] , "Europe/Berlin" ) ;
200- await expect ( doTestTableContent ( ".calendar .event" , ".time" , "24th.Oct, 23:00-00:00" , last ) ) . resolves . toBe ( true ) ;
200+ await expect ( doTestCount ( ) ) . resolves . toBe ( 3 ) ;
201+ await expect ( doTestTableContent ( ".calendar .event" , ".time" , "22nd.Oct, 23:00-00:00" , first ) ) . resolves . toBe ( true ) ;
202+ await expect ( doTestTableContent ( ".calendar .event" , ".time" , "23rd.Oct, 23:00-00:00" , second ) ) . resolves . toBe ( true ) ;
203+ await expect ( doTestTableContent ( ".calendar .event" , ".time" , "24th.Oct, 23:00-00:00" , third ) ) . resolves . toBe ( true ) ;
201204 } ) ;
202205 } ) ;
203206
204207 describe ( "berlin late in day event moved, viewed from sydney" , ( ) => {
205208 it ( "Issue #unknown rrule ETC+2 close to timezone edge" , async ( ) => {
206209 await helpers . startApplication ( "tests/configs/modules/calendar/end_of_day_berlin_moved.js" , "08 Oct 2024 12:30:00 GMT+02:00" , [ ] , "Australia/Sydney" ) ;
207- await expect ( doTestTableContent ( ".calendar .event" , ".time" , "25th.Oct, 01:00-02:00" , last ) ) . resolves . toBe ( true ) ;
210+ await expect ( doTestCount ( ) ) . resolves . toBe ( 3 ) ;
211+ await expect ( doTestTableContent ( ".calendar .event" , ".time" , "23rd.Oct, 08:00-09:00" , first ) ) . resolves . toBe ( true ) ;
212+ await expect ( doTestTableContent ( ".calendar .event" , ".time" , "24th.Oct, 08:00-09:00" , second ) ) . resolves . toBe ( true ) ;
213+ await expect ( doTestTableContent ( ".calendar .event" , ".time" , "25th.Oct, 08:00-09:00" , third ) ) . resolves . toBe ( true ) ;
208214 } ) ;
209215 } ) ;
210216
211217 describe ( "berlin late in day event moved, viewed from chicago" , ( ) => {
212218 it ( "Issue #unknown rrule ETC+2 close to timezone edge" , async ( ) => {
213219 await helpers . startApplication ( "tests/configs/modules/calendar/end_of_day_berlin_moved.js" , "08 Oct 2024 12:30:00 GMT+02:00" , [ ] , "America/Chicago" ) ;
214- await expect ( doTestTableContent ( ".calendar .event" , ".time" , "24th.Oct, 16:00-17:00" , last ) ) . resolves . toBe ( true ) ;
220+ await expect ( doTestCount ( ) ) . resolves . toBe ( 3 ) ;
221+ await expect ( doTestTableContent ( ".calendar .event" , ".time" , "22nd.Oct, 16:00-17:00" , first ) ) . resolves . toBe ( true ) ;
222+ await expect ( doTestTableContent ( ".calendar .event" , ".time" , "23rd.Oct, 16:00-17:00" , second ) ) . resolves . toBe ( true ) ;
223+ await expect ( doTestTableContent ( ".calendar .event" , ".time" , "24th.Oct, 16:00-17:00" , third ) ) . resolves . toBe ( true ) ;
215224 } ) ;
216225 } ) ;
217226
0 commit comments