Skip to content

Commit

Permalink
Merge pull request #1258 from opentripplanner/dev
Browse files Browse the repository at this point in the history
August 2024 OTP-RR Release
  • Loading branch information
miles-grant-ibigroup authored Aug 21, 2024
2 parents 3133d75 + 95b87c9 commit f714479
Show file tree
Hide file tree
Showing 178 changed files with 41,717 additions and 27,764 deletions.
1 change: 1 addition & 0 deletions .github/workflows/codespell.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ jobs:
- uses: codespell-project/actions-codespell@master
with:
check_filenames: true
ignore_words_list: MapPin
# skip git, yarn, pixel test script and HAR file, and all i18n resources.
# Also, the a11y test file has a false positive and the ignore list does not work
# see https://github.com/opentripplanner/otp-react-redux/pull/436/checks?check_run_id=3369380014
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,6 @@ dist
!example-config.yml
!test-config.yml
!har-mock-config.yml

# vscode extensions
.vscode
18 changes: 18 additions & 0 deletions __tests__/components/util/link.ts
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 __tests__/components/viewers/__snapshots__/nearby-view.js.snap

Large diffs are not rendered by default.

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>
`;
Loading

0 comments on commit f714479

Please sign in to comment.