Skip to content

Commit

Permalink
refactor: Remove unused max[Walk/Bike]Distance URL param
Browse files Browse the repository at this point in the history
  • Loading branch information
binh-dam-ibigroup committed May 31, 2024
1 parent dd84489 commit 0c697e1
Show file tree
Hide file tree
Showing 7 changed files with 5 additions and 10 deletions.
2 changes: 0 additions & 2 deletions __tests__/reducers/__snapshots__/create-otp-reducer.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,8 @@ Object {
"endTime": "09:00",
"from": null,
"intermediatePlaces": Array [],
"maxBikeDistance": 4828,
"maxBikeTime": 20,
"maxEScooterDistance": 4828,
"maxWalkDistance": 1609,
"maxWalkTime": 15,
"mode": "WALK,TRANSIT",
"numItineraries": 3,
Expand Down
2 changes: 0 additions & 2 deletions __tests__/reducers/__snapshots__/create-user-reducer.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,8 @@ Object {
"bikeSpeed": 3.58,
"endTime": "09:00",
"intermediatePlaces": Array [],
"maxBikeDistance": 4828,
"maxBikeTime": 20,
"maxEScooterDistance": 4828,
"maxWalkDistance": 1609,
"maxWalkTime": 15,
"mode": "WALK,TRANSIT",
"numItineraries": 3,
Expand Down
2 changes: 1 addition & 1 deletion a11y/a11y.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ routes.forEach((route) => {

test('Mocked Main Trip planner page should pass Axe Tests', async () => {
await runAxeTestOnPath(
'/?ui_activeSearch=0qoydlnut&ui_activeItinerary=0&fromPlace=1900%20Main%20Street%2C%20Houston%2C%20TX%2C%20USA%3A%3A29.750144%2C-95.370998&toPlace=800%20Congress%2C%20Houston%2C%20TX%2C%20USA%3A%3A29.76263%2C-95.362178&date=2021-08-04&time=08%3A14&arriveBy=false&mode=WALK%2CBUS%2CTRAM&maxWalkDistance=1207&walkSpeed=1.34&numItineraries=3'
'/?ui_activeSearch=0qoydlnut&ui_activeItinerary=0&fromPlace=1900%20Main%20Street%2C%20Houston%2C%20TX%2C%20USA%3A%3A29.750144%2C-95.370998&toPlace=800%20Congress%2C%20Houston%2C%20TX%2C%20USA%3A%3A29.76263%2C-95.362178&date=2021-08-04&time=08%3A14&arriveBy=false&mode=WALK%2CBUS%2CTRAM&walkSpeed=1.34&numItineraries=3'
)
})

Expand Down
2 changes: 1 addition & 1 deletion a11y/mocks/plan.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion example-config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ api:
### The default query parameters can be overridden be uncommenting this object.
### Note: the override values must be valid values within otp-ui's query-params.js
# defaultQueryParams:
# maxWalkDistance: 3219 # 2 miles in meters
# walkSpeed: 1.34 # 3 mph in meters per second

### The persistence setting is used to enable the storage of places (home, work),
### recent searches/places, user overrides, and favorite stops.
Expand Down
2 changes: 2 additions & 0 deletions lib/util/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,4 +68,6 @@ export function removeUnusedQueryParams(params: any): void {
delete params.ignoreRealtimeUpdates
delete params.optimize
delete params.optimizeBike
delete params.maxWalkDistance
delete params.maxBikeDistance
}
3 changes: 0 additions & 3 deletions percy/har-mock-config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,3 @@ accessibilityScore:
1.0:
color: "#a2e099"
icon: thumbs-up

defaultQueryParams:
maxWalkDistance: 1207 # 3/4 miles in meters

0 comments on commit 0c697e1

Please sign in to comment.