Skip to content

Commit 15b7005

Browse files
Added disclaimer clarifying that tests could change behavior based on when they are run
1 parent 1495b2b commit 15b7005

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

spec/support/deadline_day_fields_shared_example.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,11 @@ def safe_subtract_days(date, num)
7474
expect(page).to have_content("Deadline day must be between 1 and 28")
7575
end
7676

77+
# These tests make assertions about the dates calculated by the javascript in deadline_day_controller.js
78+
# Because we currently don't have a great way of spoofing the date the headless browser sees during tests, they
79+
# cannot effectively set the date for the tests (like with travel_to) and have to make due with the actual datetime
80+
# of whenever the test is run. To the best of my knowledge, the tests are sound but be aware that they could
81+
# pass or fail based on when they are run!
7782
describe "reported reminder and deadline dates" do
7883
context "when the reminder is a day of the month" do
7984
before do

0 commit comments

Comments
 (0)