Skip to content

Commit

Permalink
Merge pull request #700 from opentripplanner/new-mode-selector
Browse files Browse the repository at this point in the history
New mode selector
  • Loading branch information
daniel-heppner-ibigroup authored Jun 27, 2023
2 parents 2774c13 + c8fb4a9 commit 76d6b44
Show file tree
Hide file tree
Showing 51 changed files with 1,765 additions and 1,378 deletions.
30 changes: 3 additions & 27 deletions .github/workflows/percy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,31 +8,7 @@ on:
pull_request:

jobs:
run-pixel-tests-with-otp1-real-server:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
with:
# This allows us to work with the repository during the lint step
fetch-depth: 2
- name: Use Node.js 16.x
uses: actions/setup-node@v1
with:
node-version: 16.x
- name: Install npm packages using cache
uses: bahmutov/npm-install@v1
- name: Download OTP1 config file
run: curl $PERCY_OTP1_CONFIG_URL --output /tmp/otp1config.yml
env:
PERCY_OTP1_CONFIG_URL: ${{ secrets.PERCY_OTP1_CONFIG_URL_METRO }}
- name: Take Percy Snapshots
# Move everything from latest commit back to staged
run: npx percy exec -- npx jest percy/percy.test.js --force-exit
env:
PERCY_TOKEN: ${{ secrets.PERCY_TOKEN }}
PERCY_OTP_CONFIG_OVERRIDE: /tmp/otp1config.yml
run-pixel-tests-with-otp2-real-server:
run-pixel-tests-with-otp2-real-server-mobile:
runs-on: ubuntu-latest

steps:
Expand All @@ -49,7 +25,7 @@ jobs:
- name: Download OTP2 config file
run: curl $PERCY_OTP2_CONFIG_URL --output /tmp/otp2config.yml
env:
PERCY_OTP2_CONFIG_URL: ${{ secrets.PERCY_OTP2_CONFIG_URL_METRO }}
PERCY_OTP2_CONFIG_URL: ${{ secrets.PERCY_OTP2_CONFIG_URL_METRO_MODE_SELECTOR }}
- name: Take Percy Snapshots
# Move everything from latest commit back to staged
run: npx percy exec -- npx jest percy/percy.test.js --force-exit
Expand All @@ -74,7 +50,7 @@ jobs:
- name: Download OTP2 config file
run: curl $PERCY_OTP2_CONFIG_URL --output /tmp/otp2config.yml
env:
PERCY_OTP2_CONFIG_URL: ${{ secrets.PERCY_OTP2_CONFIG_URL_METRO }}
PERCY_OTP2_CONFIG_URL: ${{ secrets.PERCY_OTP2_CONFIG_URL_METRO_MODE_SELECTOR }}
- name: Take Percy Snapshots
# Move everything from latest commit back to staged
run: npx percy exec -- npx jest percy/percy.test.js --force-exit
Expand Down
82 changes: 0 additions & 82 deletions __tests__/actions/__snapshots__/api.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -5,62 +5,9 @@ Array [
Array [
[Function],
],
Array [
Object {
"payload": Object {
"activeItinerary": 0,
"pending": 1,
"routingType": "ITINERARY",
"searchId": "abcd1234",
"updateSearchInReducer": false,
},
"type": "ROUTING_REQUEST",
},
],
Array [
[Function],
],
Array [
Object {
"payload": Object {
"requestId": "abcd1237",
"response": Object {
"fake": "response",
},
"searchId": "abcd1234",
},
"type": "ROUTING_RESPONSE",
},
],
Array [
[Function],
],
Array [
Object {
"payload": Object {
"activeItinerary": 0,
"pending": 1,
"routingType": "ITINERARY",
"searchId": "abcd1236",
"updateSearchInReducer": false,
},
"type": "ROUTING_REQUEST",
},
],
Array [
[Function],
],
Array [
Object {
"payload": Object {
"error": [Error: Received error from server],
"requestId": "abcd1238",
"searchId": "abcd1236",
"url": "http://mock-host.com:80/api/plan?fromPlace=%2812%2C34%29%3A%3A12%2C34&toPlace=%2834%2C12%29%3A%3A34%2C12&mode=WALK%2CTRANSIT&ignoreRealtimeUpdates=false&batchId=abcd1236",
},
"type": "ROUTING_ERROR",
},
],
]
`;

Expand All @@ -69,34 +16,5 @@ Array [
Array [
[Function],
],
Array [
Object {
"payload": Object {
"activeItinerary": 0,
"pending": 1,
"routingType": "ITINERARY",
"searchId": "abcd1234",
"updateSearchInReducer": false,
},
"type": "ROUTING_REQUEST",
},
],
Array [
[Function],
],
Array [
Object {
"payload": Object {
"requestId": "abcd1235",
"response": Object {
"fake": "response",
},
"searchId": "abcd1234",
},
"type": "ROUTING_RESPONSE",
},
],
]
`;

exports[`actions > api routingQuery should make a query to OTP: OTP Query Path 1`] = `"/api/plan?fromPlace=%2812%2C34%29%3A%3A12%2C34&toPlace=%2834%2C12%29%3A%3A34%2C12&mode=WALK%2CTRANSIT&ignoreRealtimeUpdates=false&batchId=abcd1234"`;
14 changes: 7 additions & 7 deletions __tests__/components/__snapshots__/date-time-options.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ exports[`components > form > call-taker > date time options should correctly han
>
<input
className="datetime-slim"
defaultValue="12a"
onBlur={[Function]}
onChange={[Function]}
onClick={null}
Expand All @@ -93,7 +94,6 @@ exports[`components > form > call-taker > date time options should correctly han
"width": "50px",
}
}
value="12a"
/>
</OverlayTrigger>
<input
Expand Down Expand Up @@ -195,6 +195,7 @@ exports[`components > form > call-taker > date time options should correctly han
>
<input
className="datetime-slim"
defaultValue="12p"
onBlur={[Function]}
onChange={[Function]}
onClick={null}
Expand All @@ -210,7 +211,6 @@ exports[`components > form > call-taker > date time options should correctly han
"width": "50px",
}
}
value="12p"
/>
</OverlayTrigger>
<input
Expand Down Expand Up @@ -312,6 +312,7 @@ exports[`components > form > call-taker > date time options should correctly han
>
<input
className="datetime-slim"
defaultValue="133"
onBlur={[Function]}
onChange={[Function]}
onClick={null}
Expand All @@ -327,7 +328,6 @@ exports[`components > form > call-taker > date time options should correctly han
"width": "50px",
}
}
value="133"
/>
</OverlayTrigger>
<input
Expand Down Expand Up @@ -429,6 +429,7 @@ exports[`components > form > call-taker > date time options should correctly han
>
<input
className="datetime-slim"
defaultValue="133p"
onBlur={[Function]}
onChange={[Function]}
onClick={null}
Expand All @@ -444,7 +445,6 @@ exports[`components > form > call-taker > date time options should correctly han
"width": "50px",
}
}
value="133p"
/>
</OverlayTrigger>
<input
Expand Down Expand Up @@ -546,6 +546,7 @@ exports[`components > form > call-taker > date time options should correctly han
>
<input
className="datetime-slim"
defaultValue="135p"
onBlur={[Function]}
onChange={[Function]}
onClick={null}
Expand All @@ -561,7 +562,6 @@ exports[`components > form > call-taker > date time options should correctly han
"width": "50px",
}
}
value="135p"
/>
</OverlayTrigger>
<input
Expand Down Expand Up @@ -663,6 +663,7 @@ exports[`components > form > call-taker > date time options should correctly han
>
<input
className="datetime-slim"
defaultValue="1335"
onBlur={[Function]}
onChange={[Function]}
onClick={null}
Expand All @@ -678,7 +679,6 @@ exports[`components > form > call-taker > date time options should correctly han
"width": "50px",
}
}
value="1335"
/>
</OverlayTrigger>
<input
Expand Down Expand Up @@ -780,6 +780,7 @@ exports[`components > form > call-taker > date time options should render 1`] =
>
<input
className="datetime-slim"
defaultValue="12:34"
onBlur={[Function]}
onChange={[Function]}
onClick={null}
Expand All @@ -795,7 +796,6 @@ exports[`components > form > call-taker > date time options should render 1`] =
"width": "50px",
}
}
value="12:34"
/>
</OverlayTrigger>
<input
Expand Down
Loading

0 comments on commit 76d6b44

Please sign in to comment.