-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Change time to display "BRD" to <60 seconds until departure at terminals #861
base: main
Are you sure you want to change the base?
Conversation
@@ -215,9 +215,25 @@ defmodule Content.Message.PredictionsTest do | |||
assert Content.Message.to_string(msg) == "Ashmont BRD" | |||
end | |||
|
|||
test "does not put boarding on the sign too early when train is stopped at terminal" do | |||
|
|||
test "put boarding on the sign when train is stopped at terminal and departing in less than 60 seconds" do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These lower level tests are fine, but they tend to be more brittle in the face of refactoring. Instead, we could add a pair of cases in realtime_test.exs
to exercise this at a higher level, and it should be about the same cost code-wise. If you want to give that a try, take a look at some of the examples there. There's a @terminal_sign
struct that's already set up with a terminal configuration.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I haven't been able to get a specific test case work in realtime_test
, but I've learned a lot about the Elixir test setup by trying to get this work! Will follow up on Monday to try to get it all working
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Of course I figured it out as soon as I got up. There are new tests in realtime_test.exs
now!
Summary of changes
Asana Ticket: Change terminals "BRD" time to 60 seconds
When a train is at the terminal, this will change sign from displaying "1 min" to "BRD" when the departure time prediction goes below 60 seconds.
Reviewer Checklist
signs.json
was changed, there is a follow-up PR tosigns_ui
to update its dependency on this project