Skip to content

Commit b937f76

Browse files
authored
70103 broken links fix (#2019)
* debugging links * formatting * downgrading cypress * dockerfile changes * Dockerfile changes * revert dockerfile, upgrade node * downgrade cypress * yarn.lock * yarn.lock update * formatting * cypress upgrade
1 parent 590cb27 commit b937f76

27 files changed

+4418
-4221
lines changed

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,4 +41,4 @@ RUN yarn global add serve@^14.2.3
4141

4242
COPY --from=builder /opt/joremapui/build build/
4343

44-
CMD ["serve", "-s", "-l", "5000", "build/"]
44+
CMD ["serve", "-s", "-l", "5000", "build/"]

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@
117117
"bumped": "^0.10.11",
118118
"bumped-changelog": "0.3.13",
119119
"bumped-terminal": "^0.7.6",
120-
"cypress": "^15.3.0",
120+
"cypress": "^5.6.0",
121121
"cypress-commands": "^0.3.1",
122122
"cypress-wait-until": "^1.6.1",
123123
"lint-staged": "^9.0.0",

src/components/map/layers/NetworkLayers.tsx

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -148,12 +148,11 @@ class NetworkLayers extends Component<INetworkLayersProps> {
148148
* Sets a reaction object for TileserverLayer (replaces existing one) so
149149
* that reaction object's wouldn't multiply each time a VectorGridLayer is re-rendered.
150150
*/
151-
private setVectorgridLayerReaction = (type: TileserverLayer) => (
152-
reaction: IReactionDisposer
153-
) => {
154-
if (this.reactionDisposer[type]) this.reactionDisposer[type]()
155-
this.reactionDisposer[type] = reaction
156-
}
151+
private setVectorgridLayerReaction =
152+
(type: TileserverLayer) => (reaction: IReactionDisposer) => {
153+
if (this.reactionDisposer[type]) this.reactionDisposer[type]()
154+
this.reactionDisposer[type] = reaction
155+
}
157156

158157
render() {
159158
if (this.props.mapStore!.areNetworkLayersHidden) return null

src/components/map/layers/edit/RoutePathNeighborLinkLayer.tsx

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -227,13 +227,11 @@ class RoutePathNeighborLinkLayer extends Component<
227227

228228
render() {
229229
const neighborLinks: INeighborLink[] = this.props.routePathLayerStore!.neighborLinks
230-
const clusteredNeighborLinksMap: Map<
231-
LatLngBounds,
232-
INeighborLink[]
233-
> = _getClusteredNeighborLinksMap(
234-
neighborLinks,
235-
this.props.routePathLayerStore!.neighborToAddType
236-
)
230+
const clusteredNeighborLinksMap: Map<LatLngBounds, INeighborLink[]> =
231+
_getClusteredNeighborLinksMap(
232+
neighborLinks,
233+
this.props.routePathLayerStore!.neighborToAddType
234+
)
237235

238236
const clusteredNeighborLinkMapEntries = Array.from(clusteredNeighborLinksMap.entries())
239237

src/components/map/tools/CopyRoutePathSegmentTool.ts

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -175,11 +175,12 @@ class CopyRoutePathSegmentTool implements BaseTool {
175175
RoutePathCopySegmentStore.setIsLoading(true)
176176

177177
const transitType = RoutePathStore.routePath!.transitType!
178-
const routesUsingRoutePathSegment: IRouteUsingRoutePathSegment[] = await RoutePathService.fetchRoutesUsingLinkSegment(
179-
startSegmentPoint.nodeId,
180-
endSegmentPoint.nodeId,
181-
transitType
182-
)
178+
const routesUsingRoutePathSegment: IRouteUsingRoutePathSegment[] =
179+
await RoutePathService.fetchRoutesUsingLinkSegment(
180+
startSegmentPoint.nodeId,
181+
endSegmentPoint.nodeId,
182+
transitType
183+
)
183184
const routesToCopyFrom: IRoutesToCopyFrom[] = []
184185
routesUsingRoutePathSegment.forEach((r: IRouteUsingRoutePathSegment) => {
185186
routesToCopyFrom.push({

src/components/sidebar/Sidebar.tsx

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -68,22 +68,22 @@ class Sidebar extends React.Component<ISidebarProps, ILinelistState> {
6868
]
6969
}
7070

71-
private renderComponent = ({ view, isNew }: { view: view; isNew: boolean }) => (
72-
props: any
73-
) => {
74-
switch (view) {
75-
case 'line':
76-
return <LineView {...props} isNewLine={isNew} />
77-
case 'node':
78-
return <NodeView {...props} isNewNode={isNew} />
79-
case 'stopArea':
80-
return <StopAreaView {...props} isNewStopArea={isNew} />
81-
case 'link':
82-
return <LinkView {...props} isNewLink={isNew} />
83-
case 'routePath':
84-
return <RoutePathView {...props} isNewRoutePath={isNew} />
71+
private renderComponent =
72+
({ view, isNew }: { view: view; isNew: boolean }) =>
73+
(props: any) => {
74+
switch (view) {
75+
case 'line':
76+
return <LineView {...props} isNewLine={isNew} />
77+
case 'node':
78+
return <NodeView {...props} isNewNode={isNew} />
79+
case 'stopArea':
80+
return <StopAreaView {...props} isNewStopArea={isNew} />
81+
case 'link':
82+
return <LinkView {...props} isNewLink={isNew} />
83+
case 'routePath':
84+
return <RoutePathView {...props} isNewRoutePath={isNew} />
85+
}
8586
}
86-
}
8787

8888
render() {
8989
const isMapFullscreen = this.props.mapStore!.isMapFullscreen

src/components/sidebar/SidebarHeader.tsx

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -84,13 +84,8 @@ class SidebarHeader extends React.Component<ISidebarHeaderProps> {
8484
}
8585

8686
render() {
87-
const {
88-
children,
89-
className,
90-
isEditing,
91-
isBackButtonVisible,
92-
isCloseButtonVisible,
93-
} = this.props
87+
const { children, className, isEditing, isBackButtonVisible, isCloseButtonVisible } =
88+
this.props
9489
return (
9590
<div
9691
className={classnames(s.sidebarHeaderView, className ? className : undefined)}

src/components/sidebar/linkView/LinkView.tsx

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -126,11 +126,12 @@ class LinkView extends React.Component<ILinkViewProps, ILinkViewState> {
126126
const bounds = L.latLngBounds(link.geometry)
127127
this.props.mapStore!.setMapBounds(bounds)
128128

129-
const routePaths: IRoutePathWithDisabledInfo[] = await RoutePathService.fetchRoutePathsUsingLink(
130-
link.startNode.id,
131-
link.endNode.id,
132-
link.transitType!
133-
)
129+
const routePaths: IRoutePathWithDisabledInfo[] =
130+
await RoutePathService.fetchRoutePathsUsingLink(
131+
link.startNode.id,
132+
link.endNode.id,
133+
link.transitType!
134+
)
134135
this._setState({ routePathsUsingLink: routePaths })
135136
}
136137
this._setState({ isLoading: false })

src/components/sidebar/nodeView/NodeView.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -231,9 +231,8 @@ class NodeView extends React.Component<INodeViewProps, INodeViewState> {
231231

232232
private fetchRoutePathsUsingNode = async (nodeId: string) => {
233233
this._setState({ isRoutePathsUsingNodeQueryLoading: true })
234-
const routePaths: IRoutePathWithDisabledInfo[] = await RoutePathService.fetchRoutePathsUsingNode(
235-
nodeId
236-
)
234+
const routePaths: IRoutePathWithDisabledInfo[] =
235+
await RoutePathService.fetchRoutePathsUsingNode(nodeId)
237236
this._setState({
238237
isRoutePathsUsingNodeQueryLoading: false,
239238
routePathsUsingNode: routePaths,

src/components/sidebar/nodeView/ShortIdInput.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,8 @@ class ShortIdInput extends React.Component<IStopFormProps, IStopFormState> {
6161
)
6262
if (this.mounted) {
6363
this.setState({
64-
availableShortIdDropdownItems: this.createAvailableShortIdDropdownItems(
65-
availableShortIds
66-
),
64+
availableShortIdDropdownItems:
65+
this.createAvailableShortIdDropdownItems(availableShortIds),
6766
})
6867
}
6968
}

0 commit comments

Comments
 (0)