Skip to content

Commit 065ba62

Browse files
committed
fix(stop-viewer): properly render stop times with certain TriMet index data
Also a bunch of groundwork that'll make testing react component rendering easier
1 parent 9a8b15e commit 065ba62

File tree

14 files changed

+4291
-66
lines changed

14 files changed

+4291
-66
lines changed

__tests__/components/viewers/__snapshots__/stop-viewer.js.snap

Lines changed: 2651 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 386 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,386 @@
1+
{
2+
"id": "TriMet:715",
3+
"name": "W Burnside & SW 8th",
4+
"lat": 45.522912,
5+
"lon": -122.678538,
6+
"code": "715",
7+
"desc": "Eastbound stop in Portland (Stop ID 715)",
8+
"zoneId": "B",
9+
"url": "http://trimet.org/#tracker/stop/715",
10+
"locationType": 0,
11+
"wheelchairBoarding": 0,
12+
"vehicleType": -999,
13+
"vehicleTypeSet": false,
14+
"routes": [{
15+
"id": "TriMet:20",
16+
"shortName": "20",
17+
"longName": "Burnside/Stark",
18+
"mode": "BUS",
19+
"agencyName": "TriMet",
20+
"sortOrder": 2600
21+
}, {
22+
"id": "TriMet:94",
23+
"shortName": "94",
24+
"longName": "Pacific Hwy/Sherwood",
25+
"mode": "BUS",
26+
"agencyName": "TriMet",
27+
"sortOrder": 9100
28+
}, {
29+
"id": "TriMet:36",
30+
"shortName": "36",
31+
"longName": "South Shore",
32+
"mode": "BUS",
33+
"agencyName": "TriMet",
34+
"sortOrder": 3900
35+
}],
36+
"stopTimes": [{
37+
"pattern": {
38+
"id": "TriMet:36:0:04",
39+
"desc": "36 to Tualatin Park & Ride (TriMet:7879) from W Burnside & SW 8th (TriMet:715)",
40+
"headsign": "Tualatin Park & Ride"
41+
},
42+
"times": [{
43+
"stopId": "TriMet:715",
44+
"stopIndex": 0,
45+
"stopCount": 63,
46+
"scheduledArrival": 58260,
47+
"scheduledDeparture": 58260,
48+
"realtimeArrival": 58260,
49+
"realtimeDeparture": 58260,
50+
"arrivalDelay": 0,
51+
"departureDelay": 0,
52+
"timepoint": true,
53+
"realtime": false,
54+
"realtimeState": "SCHEDULED",
55+
"serviceDay": 1565074800,
56+
"tripId": "TriMet:9231858",
57+
"blockId": "3668",
58+
"headsign": "Tualatin Park & Ride"
59+
}, {
60+
"stopId": "TriMet:715",
61+
"stopIndex": 0,
62+
"stopCount": 63,
63+
"scheduledArrival": 61740,
64+
"scheduledDeparture": 61740,
65+
"realtimeArrival": 61740,
66+
"realtimeDeparture": 61740,
67+
"arrivalDelay": 0,
68+
"departureDelay": 0,
69+
"timepoint": true,
70+
"realtime": false,
71+
"realtimeState": "SCHEDULED",
72+
"serviceDay": 1565074800,
73+
"tripId": "TriMet:9231860",
74+
"blockId": "3670",
75+
"headsign": "Tualatin Park & Ride"
76+
}, {
77+
"stopId": "TriMet:715",
78+
"stopIndex": 0,
79+
"stopCount": 63,
80+
"scheduledArrival": 58260,
81+
"scheduledDeparture": 58260,
82+
"realtimeArrival": 58260,
83+
"realtimeDeparture": 58260,
84+
"arrivalDelay": 0,
85+
"departureDelay": 0,
86+
"timepoint": true,
87+
"realtime": false,
88+
"realtimeState": "SCHEDULED",
89+
"serviceDay": 1565161200,
90+
"tripId": "TriMet:9231858",
91+
"blockId": "3668",
92+
"headsign": "Tualatin Park & Ride"
93+
}]
94+
}, {
95+
"pattern": {
96+
"id": "TriMet:94:0:04",
97+
"desc": "94 to SW Railroad & Washington (TriMet:3670) from W Burnside & SW 8th (TriMet:715)",
98+
"headsign": "Sherwood"
99+
},
100+
"times": [{
101+
"stopId": "TriMet:715",
102+
"stopIndex": 0,
103+
"stopCount": 40,
104+
"scheduledArrival": 52080,
105+
"scheduledDeparture": 52080,
106+
"realtimeArrival": 52080,
107+
"realtimeDeparture": 52080,
108+
"arrivalDelay": 0,
109+
"departureDelay": 0,
110+
"timepoint": true,
111+
"realtime": false,
112+
"realtimeState": "SCHEDULED",
113+
"serviceDay": 1565074800,
114+
"tripId": "TriMet:9238187",
115+
"blockId": "9468",
116+
"headsign": "Sherwood"
117+
}, {
118+
"stopId": "TriMet:715",
119+
"stopIndex": 0,
120+
"stopCount": 40,
121+
"scheduledArrival": 54120,
122+
"scheduledDeparture": 54120,
123+
"realtimeArrival": 54120,
124+
"realtimeDeparture": 54120,
125+
"arrivalDelay": 0,
126+
"departureDelay": 0,
127+
"timepoint": true,
128+
"realtime": false,
129+
"realtimeState": "SCHEDULED",
130+
"serviceDay": 1565074800,
131+
"tripId": "TriMet:9238189",
132+
"blockId": "9372",
133+
"headsign": "Sherwood"
134+
}, {
135+
"stopId": "TriMet:715",
136+
"stopIndex": 0,
137+
"stopCount": 40,
138+
"scheduledArrival": 56880,
139+
"scheduledDeparture": 56880,
140+
"realtimeArrival": 56880,
141+
"realtimeDeparture": 56880,
142+
"arrivalDelay": 0,
143+
"departureDelay": 0,
144+
"timepoint": true,
145+
"realtime": false,
146+
"realtimeState": "SCHEDULED",
147+
"serviceDay": 1565074800,
148+
"tripId": "TriMet:9238194",
149+
"blockId": "9474",
150+
"headsign": "Sherwood"
151+
}]
152+
}, {
153+
"pattern": {
154+
"id": "TriMet:94:0:02",
155+
"desc": "94 to SW Pacific Hwy & Durham (TriMet:8644) from W Burnside & SW 8th (TriMet:715)",
156+
"headsign": "King City"
157+
},
158+
"times": [{
159+
"stopId": "TriMet:715",
160+
"stopIndex": 0,
161+
"stopCount": 23,
162+
"scheduledArrival": 55320,
163+
"scheduledDeparture": 55320,
164+
"realtimeArrival": 55320,
165+
"realtimeDeparture": 55320,
166+
"arrivalDelay": 0,
167+
"departureDelay": 0,
168+
"timepoint": true,
169+
"realtime": false,
170+
"realtimeState": "SCHEDULED",
171+
"serviceDay": 1565074800,
172+
"tripId": "TriMet:9238192",
173+
"blockId": "9472",
174+
"headsign": "King City"
175+
}, {
176+
"stopId": "TriMet:715",
177+
"stopIndex": 0,
178+
"stopCount": 23,
179+
"scheduledArrival": 55320,
180+
"scheduledDeparture": 55320,
181+
"realtimeArrival": 55320,
182+
"realtimeDeparture": 55320,
183+
"arrivalDelay": 0,
184+
"departureDelay": 0,
185+
"timepoint": true,
186+
"realtime": false,
187+
"realtimeState": "SCHEDULED",
188+
"serviceDay": 1565161200,
189+
"tripId": "TriMet:9238192",
190+
"blockId": "9472",
191+
"headsign": "King City"
192+
}, {
193+
"stopId": "TriMet:715",
194+
"stopIndex": 0,
195+
"stopCount": 23,
196+
"scheduledArrival": 55320,
197+
"scheduledDeparture": 55320,
198+
"realtimeArrival": 55320,
199+
"realtimeDeparture": 55320,
200+
"arrivalDelay": 0,
201+
"departureDelay": 0,
202+
"timepoint": true,
203+
"realtime": false,
204+
"realtimeState": "SCHEDULED",
205+
"serviceDay": 1565247600,
206+
"tripId": "TriMet:9238192",
207+
"blockId": "9472",
208+
"headsign": "King City"
209+
}]
210+
}, {
211+
"pattern": {
212+
"id": "TriMet:94:0:03",
213+
"desc": "94 to SW Langer & Sherwood Plaza (TriMet:9188) from W Burnside & SW 8th (TriMet:715)",
214+
"headsign": "Sherwood"
215+
},
216+
"times": [{
217+
"stopId": "TriMet:715",
218+
"stopIndex": 0,
219+
"stopCount": 34,
220+
"scheduledArrival": 54720,
221+
"scheduledDeparture": 54720,
222+
"realtimeArrival": 54720,
223+
"realtimeDeparture": 54720,
224+
"arrivalDelay": 0,
225+
"departureDelay": 0,
226+
"timepoint": true,
227+
"realtime": false,
228+
"realtimeState": "SCHEDULED",
229+
"serviceDay": 1565074800,
230+
"tripId": "TriMet:9238190",
231+
"blockId": "9470",
232+
"headsign": "Sherwood"
233+
}, {
234+
"stopId": "TriMet:715",
235+
"stopIndex": 0,
236+
"stopCount": 34,
237+
"scheduledArrival": 54720,
238+
"scheduledDeparture": 54720,
239+
"realtimeArrival": 54720,
240+
"realtimeDeparture": 54720,
241+
"arrivalDelay": 0,
242+
"departureDelay": 0,
243+
"timepoint": true,
244+
"realtime": false,
245+
"realtimeState": "SCHEDULED",
246+
"serviceDay": 1565161200,
247+
"tripId": "TriMet:9238190",
248+
"blockId": "9470",
249+
"headsign": "Sherwood"
250+
}, {
251+
"stopId": "TriMet:715",
252+
"stopIndex": 0,
253+
"stopCount": 34,
254+
"scheduledArrival": 54720,
255+
"scheduledDeparture": 54720,
256+
"realtimeArrival": 54720,
257+
"realtimeDeparture": 54720,
258+
"arrivalDelay": 0,
259+
"departureDelay": 0,
260+
"timepoint": true,
261+
"realtime": false,
262+
"realtimeState": "SCHEDULED",
263+
"serviceDay": 1565247600,
264+
"tripId": "TriMet:9238190",
265+
"blockId": "9470",
266+
"headsign": "Sherwood"
267+
}]
268+
}, {
269+
"pattern": {
270+
"id": "TriMet:20:1:04",
271+
"desc": "20 to Gresham Transit Center (TriMet:8199) from Beaverton Transit Center (TriMet:9978) express",
272+
"headsign": "Gresham TC"
273+
},
274+
"times": [{
275+
"stopId": "TriMet:715",
276+
"stopIndex": 42,
277+
"stopCount": 132,
278+
"scheduledArrival": 64859,
279+
"scheduledDeparture": 64859,
280+
"realtimeArrival": 64859,
281+
"realtimeDeparture": 64859,
282+
"arrivalDelay": 0,
283+
"departureDelay": 0,
284+
"timepoint": false,
285+
"realtime": false,
286+
"realtimeState": "SCHEDULED",
287+
"serviceDay": 1564988400,
288+
"tripId": "TriMet:9230358",
289+
"blockId": "2045",
290+
"headsign": "Gresham TC"
291+
}, {
292+
"stopId": "TriMet:715",
293+
"stopIndex": 42,
294+
"stopCount": 132,
295+
"scheduledArrival": 66668,
296+
"scheduledDeparture": 66668,
297+
"realtimeArrival": 66668,
298+
"realtimeDeparture": 66668,
299+
"arrivalDelay": 0,
300+
"departureDelay": 0,
301+
"timepoint": false,
302+
"realtime": false,
303+
"realtimeState": "SCHEDULED",
304+
"serviceDay": 1564988400,
305+
"tripId": "TriMet:9230360",
306+
"blockId": "2047",
307+
"headsign": "Gresham TC"
308+
}, {
309+
"stopId": "TriMet:715",
310+
"stopIndex": 42,
311+
"stopCount": 132,
312+
"scheduledArrival": 67628,
313+
"scheduledDeparture": 67628,
314+
"realtimeArrival": 67628,
315+
"realtimeDeparture": 67628,
316+
"arrivalDelay": 0,
317+
"departureDelay": 0,
318+
"timepoint": false,
319+
"realtime": false,
320+
"realtimeState": "SCHEDULED",
321+
"serviceDay": 1564988400,
322+
"tripId": "TriMet:9230361",
323+
"blockId": "2048",
324+
"headsign": "Gresham TC"
325+
}]
326+
}, {
327+
"pattern": {
328+
"id": "TriMet:20:1:01",
329+
"desc": "20 to Gresham Transit Center (TriMet:2253) from Beaverton Transit Center (TriMet:9978) express",
330+
"headsign": "Gresham TC"
331+
},
332+
"times": [{
333+
"stopId": "TriMet:715",
334+
"stopIndex": 42,
335+
"stopCount": 132,
336+
"scheduledArrival": 65759,
337+
"scheduledDeparture": 65759,
338+
"realtimeArrival": 65759,
339+
"realtimeDeparture": 65759,
340+
"arrivalDelay": 0,
341+
"departureDelay": 0,
342+
"timepoint": false,
343+
"realtime": false,
344+
"realtimeState": "SCHEDULED",
345+
"serviceDay": 1564988400,
346+
"tripId": "TriMet:9230359",
347+
"blockId": "2046",
348+
"headsign": "Gresham TC"
349+
}, {
350+
"stopId": "TriMet:715",
351+
"stopIndex": 42,
352+
"stopCount": 132,
353+
"scheduledArrival": 70028,
354+
"scheduledDeparture": 70028,
355+
"realtimeArrival": 70028,
356+
"realtimeDeparture": 70028,
357+
"arrivalDelay": 0,
358+
"departureDelay": 0,
359+
"timepoint": false,
360+
"realtime": false,
361+
"realtimeState": "SCHEDULED",
362+
"serviceDay": 1564988400,
363+
"tripId": "TriMet:9230363",
364+
"blockId": "2036",
365+
"headsign": "Gresham TC"
366+
}, {
367+
"stopId": "TriMet:715",
368+
"stopIndex": 42,
369+
"stopCount": 132,
370+
"scheduledArrival": 72436,
371+
"scheduledDeparture": 72436,
372+
"realtimeArrival": 72436,
373+
"realtimeDeparture": 72436,
374+
"arrivalDelay": 0,
375+
"departureDelay": 0,
376+
"timepoint": false,
377+
"realtime": false,
378+
"realtimeState": "SCHEDULED",
379+
"serviceDay": 1564988400,
380+
"tripId": "TriMet:9230365",
381+
"blockId": "2071",
382+
"headsign": "Gresham TC"
383+
}]
384+
}],
385+
"stopTimesLastUpdated": 1565052624406
386+
}

0 commit comments

Comments
 (0)