fix: Don't show trip-specific alerts in the stop page predictions pane #2915
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Scope
Asana Ticket: ❗ [AM Alerts] Don't show train(s) specific alerts in stop page predictions pane
Implementation
isTripSpecific.isDeparturesAndMapAlertto check both the alert effect and to check that an alert is not trip-specific.Screenshots
Also worth noting: When an alert is not trip-specific, then it will still be included in the predictions pane:
How to test
(If you're testing right now, 2:17PM on Wednesday Jan 28, then there are some helpful test alerts available - the ones pictured above. If you're testing at a different time, you may need to create test alerts that have the effects and specificities you're looking for)
Create a station bypass affecting one train on (for example) the Fall River/New Bedford line at (for example) Quincy Center. Visit the (for example) Quincy Center page. Observe that the
No Servicebadge is no longer there.Create a station bypass affecting all trains on (for example) the Fairmount Line at (for example) Uphams Corner. Visit the (for example) Upham's Corner page. Observe that the
No Servicebadges are still there.