Skip to content

Fix time-dependent spec failures in user_sees_error_details_spec.rb

Stan Hu requested to merge sh-fix-issue-202678 into master

These features specs were failing because they were using fixed dates and attempting to use Timecop, but Timecop doesn't apply to the browser. When the date crossed the 8th of the month, the Timeago text "1 month ago" advanced to "2 months ago".

To fix this issue, we now adjust the test data to use a timestamp relative to today's date, eliminating the need for Timecop.

Closes #202678 (closed)

Edited by Stan Hu

Merge request reports