Skip to content

Conversation

@Benjamin-Couey
Copy link
Contributor

Resolves #5423

Description

This PR imports the sinon.js library in order to spoof the date time the browser used during tests matches the date time Rails is currently using. This allows for JS code to be tested in specific time frames. This also means that test behavior will not depend on when the test was run, reducing flakiness.

It also fixes a bug exposed in the failing tests from the ticket. The reminder and deadline day form is updated to avoid cases where the JS library RRule calculates the next occurrence date to be today.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)

How Has This Been Tested?

The existing unit tests have been updated and all pass.

@dorner dorner merged commit bda56a6 into rubyforgood:main Oct 26, 2025
11 checks passed
@github-actions
Copy link
Contributor

github-actions bot commented Nov 2, 2025

@Benjamin-Couey: Your PR Spoof browser time is part of today's Human Essentials production release: 2025.11.02.
Thank you very much for your contribution!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Flaky Tests

2 participants