Skip to content

Conversation

@JesperDramsch
Copy link
Owner

Summary:

  • Fixed 30 mobile E2E test failures (mobile-chrome and mobile-safari)
  • Root cause: production notification code used fragile exact-day matching
  • Split mobile CI tests into separate matrix jobs

Key fixes:

  • Search tests: Added getVisibleSearchInput() helper for collapsed mobile navbar
  • Toast dismiss: Added dismissToast() helper for Bootstrap 4 jQuery events
  • Notifications: Changed from Math.ceil() exact matching to range-based ±0.5 day windows

claude added 2 commits January 5, 2026 21:10
The previous fix still failed on mobile-safari due to timing sensitivity
in the Math.ceil day calculation. The test now sets up conferences for
ALL three notification thresholds (7, 3, and 1 days) using a calculation
that ensures Math.ceil rounds correctly: (days - 0.5) * 86400000ms.

This approach guarantees at least one threshold will trigger regardless
of millisecond-level timing variations between browsers.
The notification system was using Math.ceil() for day calculations
which caused timing-sensitive failures. A deadline set to "7 days
from now" might calculate as 6.9 or 7.1 days depending on the
exact millisecond, causing the exact match `[7, 3, 1].includes(daysUntil)`
to fail intermittently.

Changes:
- Added isWithinNotificationWindow() helper that checks if daysUntil
  is within ±0.5 days of a threshold (24-hour window)
- Added findMatchingThreshold() to find which threshold applies
- Updated checkActionBarNotifications() to use range-based matching
- Updated checkUpcomingDeadlines() to use range-based matching
- Simplified E2E test now that production code is robust
@github-actions github-actions bot added the Tests label Jan 5, 2026
@JesperDramsch JesperDramsch merged commit b8bb480 into main Jan 5, 2026
9 of 11 checks passed
@JesperDramsch JesperDramsch deleted the claude/fix-mobile-tests-QT9hJ branch January 5, 2026 21:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants