-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #126 from opentripplanner/dev
Next Release
- Loading branch information
Showing
12 changed files
with
1,042 additions
and
289 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
{ | ||
"route1": { | ||
"longName": "Across town", | ||
"mode": "BUS", | ||
"shortName": "10", | ||
"sortOrder": 10 | ||
}, | ||
"route2": { | ||
"longName": "Around town", | ||
"mode": "BUS", | ||
"shortName": "20", | ||
"sortOrder": 2 | ||
}, | ||
"route3": { | ||
"longName": "Around another town", | ||
"mode": "BUS", | ||
"shortName": "3", | ||
"sortOrder": -999 | ||
}, | ||
"route4": { | ||
"longName": "Loop route", | ||
"mode": "BUS", | ||
"shortName": "2", | ||
"sortOrder": -999 | ||
}, | ||
"route5": { | ||
"longName": "A-line", | ||
"mode": "BUS", | ||
"shortName": "A", | ||
"sortOrder": -999 | ||
}, | ||
"route6": { | ||
"longName": "B-line", | ||
"mode": "BUS", | ||
"shortName": "B", | ||
"sortOrder": -999 | ||
}, | ||
"route7": { | ||
"longName": "A meandering route", | ||
"mode": "BUS", | ||
"sortOrder": -999 | ||
}, | ||
"route8": { | ||
"longName": "Zig-zagging route", | ||
"mode": "BUS", | ||
"shortName": "30", | ||
"sortOrder": 2 | ||
}, | ||
"route9": { | ||
"longName": "Express route", | ||
"mode": "BUS", | ||
"shortName": "30", | ||
"sortOrder": 2 | ||
}, | ||
"route10": { | ||
"longName": "Variation of express route", | ||
"mode": "BUS", | ||
"shortName": "30", | ||
"sortOrder": 2 | ||
}, | ||
"route11": { | ||
"longName": "Local route", | ||
"mode": "BUS", | ||
"shortName": "6", | ||
"sortOrder": 2 | ||
}, | ||
"route12": { | ||
"longName": "Intercity Train", | ||
"mode": "RAIL", | ||
"shortName": "IC", | ||
"sortOrder": 2 | ||
}, | ||
"route13": { | ||
"longName": "Yellow line Subway", | ||
"mode": "SUBWAY", | ||
"shortName": "Yellow", | ||
"sortOrder": 2 | ||
}, | ||
"route14": { | ||
"longName": "Xpress route C", | ||
"mode": "BUS", | ||
"shortName": "30C", | ||
"sortOrder": 2 | ||
}, | ||
"route15": { | ||
"longName": "Express route X", | ||
"mode": "BUS", | ||
"shortName": "30X", | ||
"sortOrder": 2 | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,247 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`util > itinerary routeComparator should prioritize routes with integer shortNames over alphabetic shortNames 1`] = ` | ||
Array [ | ||
Object { | ||
"longName": "A-line", | ||
"mode": "BUS", | ||
"shortName": "A", | ||
"sortOrder": -999, | ||
}, | ||
Object { | ||
"longName": "Loop route", | ||
"mode": "BUS", | ||
"shortName": "2", | ||
"sortOrder": -999, | ||
}, | ||
] | ||
`; | ||
|
||
exports[`util > itinerary routeComparator should prioritize routes with shortNames over those with just longNames 1`] = ` | ||
Array [ | ||
Object { | ||
"longName": "B-line", | ||
"mode": "BUS", | ||
"shortName": "B", | ||
"sortOrder": -999, | ||
}, | ||
Object { | ||
"longName": "A meandering route", | ||
"mode": "BUS", | ||
"sortOrder": -999, | ||
}, | ||
] | ||
`; | ||
|
||
exports[`util > itinerary routeComparator should prioritize routes with valid sortOrder 1`] = ` | ||
Array [ | ||
Object { | ||
"longName": "Around town", | ||
"mode": "BUS", | ||
"shortName": "20", | ||
"sortOrder": 2, | ||
}, | ||
Object { | ||
"longName": "Around another town", | ||
"mode": "BUS", | ||
"shortName": "3", | ||
"sortOrder": -999, | ||
}, | ||
] | ||
`; | ||
|
||
exports[`util > itinerary routeComparator should sort based off of route type 1`] = ` | ||
Array [ | ||
Object { | ||
"longName": "Yellow line Subway", | ||
"mode": "SUBWAY", | ||
"shortName": "Yellow", | ||
"sortOrder": 2, | ||
}, | ||
Object { | ||
"longName": "Intercity Train", | ||
"mode": "RAIL", | ||
"shortName": "IC", | ||
"sortOrder": 2, | ||
}, | ||
] | ||
`; | ||
|
||
exports[`util > itinerary routeComparator should sort routes based off of integer shortName 1`] = ` | ||
Array [ | ||
Object { | ||
"longName": "Loop route", | ||
"mode": "BUS", | ||
"shortName": "2", | ||
"sortOrder": -999, | ||
}, | ||
Object { | ||
"longName": "Around another town", | ||
"mode": "BUS", | ||
"shortName": "3", | ||
"sortOrder": -999, | ||
}, | ||
] | ||
`; | ||
|
||
exports[`util > itinerary routeComparator should sort routes based off of longNames 1`] = ` | ||
Array [ | ||
Object { | ||
"longName": "Express route", | ||
"mode": "BUS", | ||
"shortName": "30", | ||
"sortOrder": 2, | ||
}, | ||
Object { | ||
"longName": "Variation of express route", | ||
"mode": "BUS", | ||
"shortName": "30", | ||
"sortOrder": 2, | ||
}, | ||
] | ||
`; | ||
|
||
exports[`util > itinerary routeComparator should sort routes based off of shortNames 1`] = ` | ||
Array [ | ||
Object { | ||
"longName": "A-line", | ||
"mode": "BUS", | ||
"shortName": "A", | ||
"sortOrder": -999, | ||
}, | ||
Object { | ||
"longName": "B-line", | ||
"mode": "BUS", | ||
"shortName": "B", | ||
"sortOrder": -999, | ||
}, | ||
] | ||
`; | ||
|
||
exports[`util > itinerary routeComparator should sort routes based off of sortOrder 1`] = ` | ||
Array [ | ||
Object { | ||
"longName": "Around town", | ||
"mode": "BUS", | ||
"shortName": "20", | ||
"sortOrder": 2, | ||
}, | ||
Object { | ||
"longName": "Across town", | ||
"mode": "BUS", | ||
"shortName": "10", | ||
"sortOrder": 10, | ||
}, | ||
] | ||
`; | ||
|
||
exports[`util > itinerary routeComparator should sort routes on all of the criteria at once 1`] = ` | ||
Array [ | ||
Object { | ||
"longName": "Yellow line Subway", | ||
"mode": "SUBWAY", | ||
"shortName": "Yellow", | ||
"sortOrder": 2, | ||
}, | ||
Object { | ||
"longName": "Intercity Train", | ||
"mode": "RAIL", | ||
"shortName": "IC", | ||
"sortOrder": 2, | ||
}, | ||
Object { | ||
"longName": "Local route", | ||
"mode": "BUS", | ||
"shortName": "6", | ||
"sortOrder": 2, | ||
}, | ||
Object { | ||
"longName": "Around town", | ||
"mode": "BUS", | ||
"shortName": "20", | ||
"sortOrder": 2, | ||
}, | ||
Object { | ||
"longName": "Express route", | ||
"mode": "BUS", | ||
"shortName": "30", | ||
"sortOrder": 2, | ||
}, | ||
Object { | ||
"longName": "Variation of express route", | ||
"mode": "BUS", | ||
"shortName": "30", | ||
"sortOrder": 2, | ||
}, | ||
Object { | ||
"longName": "Zig-zagging route", | ||
"mode": "BUS", | ||
"shortName": "30", | ||
"sortOrder": 2, | ||
}, | ||
Object { | ||
"longName": "Xpress route C", | ||
"mode": "BUS", | ||
"shortName": "30C", | ||
"sortOrder": 2, | ||
}, | ||
Object { | ||
"longName": "Express route X", | ||
"mode": "BUS", | ||
"shortName": "30X", | ||
"sortOrder": 2, | ||
}, | ||
Object { | ||
"longName": "Across town", | ||
"mode": "BUS", | ||
"shortName": "10", | ||
"sortOrder": 10, | ||
}, | ||
Object { | ||
"longName": "A-line", | ||
"mode": "BUS", | ||
"shortName": "A", | ||
"sortOrder": -999, | ||
}, | ||
Object { | ||
"longName": "B-line", | ||
"mode": "BUS", | ||
"shortName": "B", | ||
"sortOrder": -999, | ||
}, | ||
Object { | ||
"longName": "Loop route", | ||
"mode": "BUS", | ||
"shortName": "2", | ||
"sortOrder": -999, | ||
}, | ||
Object { | ||
"longName": "Around another town", | ||
"mode": "BUS", | ||
"shortName": "3", | ||
"sortOrder": -999, | ||
}, | ||
Object { | ||
"longName": "A meandering route", | ||
"mode": "BUS", | ||
"sortOrder": -999, | ||
}, | ||
] | ||
`; | ||
|
||
exports[`util > itinerary routeComparator should sort routes with alphanumeric shortNames 1`] = ` | ||
Array [ | ||
Object { | ||
"longName": "Xpress route C", | ||
"mode": "BUS", | ||
"shortName": "30C", | ||
"sortOrder": 2, | ||
}, | ||
Object { | ||
"longName": "Express route X", | ||
"mode": "BUS", | ||
"shortName": "30X", | ||
"sortOrder": 2, | ||
}, | ||
] | ||
`; |
Oops, something went wrong.