Skip to content

Commit

Permalink
Merge pull request HSLdevcom#3182 from HSLdevcom/dt-3417
Browse files Browse the repository at this point in the history
chore: fix gtfsId on test data
  • Loading branch information
vesameskanen authored Apr 1, 2020
2 parents 12aa7d6 + 262bdf2 commit ce4713c
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 7 deletions.
16 changes: 12 additions & 4 deletions app/component/BusLeg.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,12 @@ const exampleLeg = t1 => ({
duration: 120,
rentedBike: false,
intermediatePlaces: [],
route: { gtfsId: '123', shortName: '57', mode: 'BUS' },
trip: { gtfsId: '123', tripHeadsign: 'Kontula', pattern: { code: '1057' } },
route: { gtfsId: 'HSL:123', shortName: '57', mode: 'BUS' },
trip: {
gtfsId: 'HSL:123',
tripHeadsign: 'Kontula',
pattern: { code: '1057' },
},
from: { name: 'Ilmattarentie', stop: { code: '2194' } },
to: { name: 'Helsinki', stop: { code: '0072 ' } },
});
Expand All @@ -47,8 +51,12 @@ const exampleLegRealtime = t1 => ({
duration: 120,
rentedBike: false,
intermediatePlaces: [],
route: { gtfsId: '123', shortName: '57', mode: 'BUS' },
trip: { gtfsId: '123', tripHeadsign: 'Kontula', pattern: { code: '1057' } },
route: { gtfsId: 'HSL:123', shortName: '57', mode: 'BUS' },
trip: {
gtfsId: 'HSL:123',
tripHeadsign: 'Kontula',
pattern: { code: '1057' },
},
from: { name: 'Ilmattarentie', stop: { code: '2194' } },
to: { name: 'Helsinki', stop: { code: '0072 ' } },
});
Expand Down
4 changes: 2 additions & 2 deletions app/component/DepartureRowContainer.js
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ const exampleDeparture1 = {
code: '28',
headSign: 'Tampere',
route: {
gtfsId: '123',
gtfsId: 'FOO:123',
mode: 'RAIL',
shortName: 'IC28',
},
Expand All @@ -151,7 +151,7 @@ const exampleDeparture2 = {
code: '154',
headSign: 'Kamppi',
route: {
gtfsId: '123',
gtfsId: 'HSL:123',
mode: 'BUS',
shortName: '154',
},
Expand Down
2 changes: 1 addition & 1 deletion app/configurations/config.hsl.js
Original file line number Diff line number Diff line change
Expand Up @@ -539,7 +539,7 @@ export default {
/* Function that can be used to configure route names before displaying them
Takes routes gtfsId as input */
getRoutePrefix: function routePrefix(routeId) {
if (!routeId || !routeId.includes(':')) {
if (!routeId) {
return '';
}
return routeId.split(':')[1].substring(0, 1) === '7' ? 'U' : '';
Expand Down

0 comments on commit ce4713c

Please sign in to comment.