-
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 #1258 from opentripplanner/dev
August 2024 OTP-RR Release
- Loading branch information
Showing
178 changed files
with
41,717 additions
and
27,764 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
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 |
---|---|---|
|
@@ -20,3 +20,6 @@ dist | |
!example-config.yml | ||
!test-config.yml | ||
!har-mock-config.yml | ||
|
||
# vscode extensions | ||
.vscode |
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,18 @@ | ||
import '../../test-utils/mock-window-url' | ||
|
||
import { isSubpath } from '../../../lib/components/util/link' | ||
|
||
describe('components > util > Link > isSubpath', () => { | ||
it('should be true on a path that starts with the tracked path', () => { | ||
expect(isSubpath('/', '/')).toBeTruthy() | ||
expect(isSubpath('/trips', '/trips')).toBeTruthy() | ||
expect(isSubpath('/trips/trip123', '/trips')).toBeTruthy() | ||
}) | ||
it('should be false on a path that starts differently than the tracked path', () => { | ||
expect(isSubpath('/trips/trip123', '/route')).toBeFalsy() | ||
expect(isSubpath('/', '/route')).toBeFalsy() | ||
}) | ||
it('should be false if tracking home (/) and on a path that is not home.', () => { | ||
expect(isSubpath('/trips/trip123', '/')).toBeFalsy() | ||
}) | ||
}) |
50,363 changes: 34,980 additions & 15,383 deletions
50,363
__tests__/components/viewers/__snapshots__/nearby-view.js.snap
Large diffs are not rendered by default.
Oops, something went wrong.
309 changes: 309 additions & 0 deletions
309
__tests__/components/viewers/__snapshots__/stop-schedule-viewer.ts.snap
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,309 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`components > viewers > stop viewer should render with initial stop id and no stop times 1`] = ` | ||
<IntlProvider | ||
defaultFormats={Object {}} | ||
defaultLocale="en-US" | ||
formats={Object {}} | ||
locale="en-US" | ||
messages={Object {}} | ||
onError={[Function]} | ||
textComponent={Symbol(react.fragment)} | ||
> | ||
<Provider | ||
store={ | ||
Object { | ||
"clearActions": [Function], | ||
"dispatch": [Function], | ||
"getActions": [Function], | ||
"getState": [Function], | ||
"replaceReducer": [Function], | ||
"subscribe": [Function], | ||
} | ||
} | ||
> | ||
<injectIntl(WrappedComponent)> | ||
<WrappedComponent | ||
intl={ | ||
Object { | ||
"defaultFormats": Object {}, | ||
"defaultLocale": "en-US", | ||
"defaultRichTextElements": undefined, | ||
"formatDate": [Function], | ||
"formatDateTimeRange": [Function], | ||
"formatDateToParts": [Function], | ||
"formatDisplayName": [Function], | ||
"formatList": [Function], | ||
"formatListToParts": [Function], | ||
"formatMessage": [Function], | ||
"formatNumber": [Function], | ||
"formatNumberToParts": [Function], | ||
"formatPlural": [Function], | ||
"formatRelativeTime": [Function], | ||
"formatTime": [Function], | ||
"formatTimeToParts": [Function], | ||
"formats": Object {}, | ||
"formatters": Object { | ||
"getDateTimeFormat": [Function], | ||
"getDisplayNames": [Function], | ||
"getListFormat": [Function], | ||
"getMessageFormat": [Function], | ||
"getNumberFormat": [Function], | ||
"getPluralRules": [Function], | ||
"getRelativeTimeFormat": [Function], | ||
}, | ||
"locale": "en-US", | ||
"messages": Object {}, | ||
"onError": [Function], | ||
"textComponent": Symbol(react.fragment), | ||
"timeZone": undefined, | ||
"wrapRichTextChunksInFragment": undefined, | ||
} | ||
} | ||
> | ||
<Connect(StopScheduleViewer) | ||
intl={ | ||
Object { | ||
"defaultFormats": Object {}, | ||
"defaultLocale": "en-US", | ||
"defaultRichTextElements": undefined, | ||
"formatDate": [Function], | ||
"formatDateTimeRange": [Function], | ||
"formatDateToParts": [Function], | ||
"formatDisplayName": [Function], | ||
"formatList": [Function], | ||
"formatListToParts": [Function], | ||
"formatMessage": [Function], | ||
"formatNumber": [Function], | ||
"formatNumberToParts": [Function], | ||
"formatPlural": [Function], | ||
"formatRelativeTime": [Function], | ||
"formatTime": [Function], | ||
"formatTimeToParts": [Function], | ||
"formats": Object {}, | ||
"formatters": Object { | ||
"getDateTimeFormat": [Function], | ||
"getDisplayNames": [Function], | ||
"getListFormat": [Function], | ||
"getMessageFormat": [Function], | ||
"getNumberFormat": [Function], | ||
"getPluralRules": [Function], | ||
"getRelativeTimeFormat": [Function], | ||
}, | ||
"locale": "en-US", | ||
"messages": Object {}, | ||
"onError": [Function], | ||
"textComponent": Symbol(react.fragment), | ||
"timeZone": undefined, | ||
"wrapRichTextChunksInFragment": undefined, | ||
} | ||
} | ||
> | ||
<StopScheduleViewer | ||
calendarMax="2025-12-31" | ||
calendarMin="2024-01-01" | ||
findStopTimesForStop={[Function]} | ||
homeTimezone="America/Los_Angeles" | ||
intl={ | ||
Object { | ||
"defaultFormats": Object {}, | ||
"defaultLocale": "en-US", | ||
"defaultRichTextElements": undefined, | ||
"formatDate": [Function], | ||
"formatDateTimeRange": [Function], | ||
"formatDateToParts": [Function], | ||
"formatDisplayName": [Function], | ||
"formatList": [Function], | ||
"formatListToParts": [Function], | ||
"formatMessage": [Function], | ||
"formatNumber": [Function], | ||
"formatNumberToParts": [Function], | ||
"formatPlural": [Function], | ||
"formatRelativeTime": [Function], | ||
"formatTime": [Function], | ||
"formatTimeToParts": [Function], | ||
"formats": Object {}, | ||
"formatters": Object { | ||
"getDateTimeFormat": [Function], | ||
"getDisplayNames": [Function], | ||
"getListFormat": [Function], | ||
"getMessageFormat": [Function], | ||
"getNumberFormat": [Function], | ||
"getPluralRules": [Function], | ||
"getRelativeTimeFormat": [Function], | ||
}, | ||
"locale": "en-US", | ||
"messages": Object {}, | ||
"onError": [Function], | ||
"textComponent": Symbol(react.fragment), | ||
"timeZone": undefined, | ||
"wrapRichTextChunksInFragment": undefined, | ||
} | ||
} | ||
showBlockIds={false} | ||
stopId="TriMet:13170" | ||
transitOperators={Array []} | ||
zoomToPlace={[Function]} | ||
> | ||
<div | ||
className="stop-viewer base-color-bg" | ||
> | ||
<Connect(PageTitle) | ||
title={ | ||
Array [ | ||
"components.StopViewer.titleBarStopId", | ||
"components.StopViewer.schedule", | ||
] | ||
} | ||
> | ||
<PageTitle | ||
appTitle="" | ||
dispatch={[Function]} | ||
title={ | ||
Array [ | ||
"components.StopViewer.titleBarStopId", | ||
"components.StopViewer.schedule", | ||
] | ||
} | ||
/> | ||
</Connect(PageTitle)> | ||
<Connect(ServiceTimeRangeRetriever)> | ||
<ServiceTimeRangeRetriever | ||
retrieveServiceTimeRangeIfNeeded={[Function]} | ||
/> | ||
</Connect(ServiceTimeRangeRetriever)> | ||
<div | ||
className="stop-viewer-header" | ||
> | ||
<div | ||
className="back-button-container" | ||
> | ||
<Button | ||
active={false} | ||
block={false} | ||
bsClass="btn" | ||
bsSize="small" | ||
bsStyle="default" | ||
disabled={false} | ||
onClick={[Function]} | ||
> | ||
<button | ||
className="btn btn-sm btn-default" | ||
disabled={false} | ||
onClick={[Function]} | ||
type="button" | ||
> | ||
<IconWithText | ||
Icon={ | ||
Object { | ||
"$$typeof": Symbol(react.forward_ref), | ||
"displayName": "ArrowLeft", | ||
"render": [Function], | ||
} | ||
} | ||
> | ||
<div | ||
style={ | ||
Object { | ||
"display": "contents", | ||
} | ||
} | ||
> | ||
<Styled(styled.span)> | ||
<span | ||
className="sc-jifHHV sc-hkwmXC frJUIW gWGcte" | ||
> | ||
<ArrowLeft> | ||
<StyledIconBase | ||
iconAttrs={ | ||
Object { | ||
"fill": "currentColor", | ||
"xmlns": "http://www.w3.org/2000/svg", | ||
} | ||
} | ||
iconVerticalAlign="middle" | ||
iconViewBox="0 0 448 512" | ||
> | ||
<ForwardRef | ||
className="StyledIconBase-sc-ea9ulj-0 fqiNOa" | ||
iconAttrs={ | ||
Object { | ||
"fill": "currentColor", | ||
"xmlns": "http://www.w3.org/2000/svg", | ||
} | ||
} | ||
iconVerticalAlign="middle" | ||
iconViewBox="0 0 448 512" | ||
> | ||
<svg | ||
aria-hidden="true" | ||
className="StyledIconBase-sc-ea9ulj-0 fqiNOa" | ||
fill="currentColor" | ||
focusable="false" | ||
viewBox="0 0 448 512" | ||
xmlns="http://www.w3.org/2000/svg" | ||
> | ||
<path | ||
d="M9.4 233.4c-12.5 12.5-12.5 32.8 0 45.3l160 160c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L109.2 288H416c17.7 0 32-14.3 32-32s-14.3-32-32-32H109.3l105.3-105.4c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-160 160z" | ||
fill="currentColor" | ||
/> | ||
</svg> | ||
</ForwardRef> | ||
</StyledIconBase> | ||
</ArrowLeft> | ||
</span> | ||
</Styled(styled.span)> | ||
<span> | ||
<FormattedMessage | ||
id="common.forms.back" | ||
> | ||
common.forms.back | ||
</FormattedMessage> | ||
</span> | ||
</div> | ||
</IconWithText> | ||
</button> | ||
</Button> | ||
</div> | ||
<styled.div> | ||
<div | ||
className="sc-hJxDiT dbjOgr" | ||
> | ||
<styled.div> | ||
<div | ||
className="sc-jlIlqL sdJoA" | ||
> | ||
<h1> | ||
<FormattedMessage | ||
id="components.StopViewer.loadingText" | ||
> | ||
components.StopViewer.loadingText | ||
</FormattedMessage> | ||
</h1> | ||
</div> | ||
</styled.div> | ||
</div> | ||
</styled.div> | ||
<Connect(FavoriteStopToggle)> | ||
<FavoriteStopToggle | ||
forgetStop={[Function]} | ||
isFavoriteStop={false} | ||
rememberStop={[Function]} | ||
/> | ||
</Connect(FavoriteStopToggle)> | ||
<div | ||
style={ | ||
Object { | ||
"clear": "both", | ||
} | ||
} | ||
/> | ||
</div> | ||
</div> | ||
</StopScheduleViewer> | ||
</Connect(StopScheduleViewer)> | ||
</WrappedComponent> | ||
</injectIntl(WrappedComponent)> | ||
</Provider> | ||
</IntlProvider> | ||
`; |
Oops, something went wrong.