5
11
Fork
You've already forked tomato
1

Ensure shift test doesn't create invalid event #49

Merged
edwardloveall merged 1 commit from el-shift-test into main 2025年11月20日 21:17:23 +01:00

The react shift form calculates the start time to the nearest half hour
to "now". It then sets the end time to 2 hours after that. If this test
is run between 10pm and 12am local time (or if local time converted to
UTC is in that range) the end time will be earlier than the start time.
This causes the test to fail.

The fix is to set the times manually. The value to set the time fields
is a bit odd: 03:00AM but it's sending those keys directly to the
field. If you were typing it by hand, you wouldn't add a space and so
we don't do that here for the same reason.

The react shift form calculates the start time to the nearest half hour to "now". It then sets the end time to 2 hours after that. If this test is run between 10pm and 12am local time (or if local time converted to UTC is in that range) the end time will be earlier than the start time. This causes the test to fail. The fix is to set the times manually. The value to set the time fields is a bit odd: `03:00AM` but it's sending those keys directly to the field. If you were typing it by hand, you wouldn't add a space and so we don't do that here for the same reason.
Ensure shift test doesn't create invalid event
Some checks failed
Setup Successful
Jest Successful
Static Analysis Successful
RSpec Failed
9fd2a37445
The react shift form calculates the start time to the nearest half hour
to "now". It then sets the end time to 2 hours after that. If this test
is run between 10pm and 12am local time (or if local time converted to
UTC is in that range) the end time will be earlier than the start time.
This causes the test to fail.
The fix is to set the times manually. The value to set the time fields
is a bit odd: `03:00AM` but it's sending those keys directly to the
field. If you were typing it by hand, you wouldn't add a space and so
we don't do that here for the same reason.
jsilasbailey left a comment
Copy link

🥐

🥐 ✅
Author
Owner
Copy link

Thanks, Jesse! Those failing tests are flaky and pass locally on my machine.

Thanks, Jesse! Those failing tests are flaky and pass locally on my machine.
edwardloveall deleted branch el-shift-test 2025年11月20日 21:17:23 +01:00
Sign in to join this conversation.
No reviewers
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
rootable/tomato!49
Reference in a new issue
rootable/tomato
No description provided.
Delete branch "el-shift-test"

Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?