mirror of
https://github.com/public-transport/db-vendo-client.git
synced 2025-04-20 23:23:56 +03:00
Rejseplanen trip() test: update fixtures ✅
This commit is contained in:
parent
0a096a13d7
commit
b10c1ce644
3 changed files with 931 additions and 176 deletions
473
test/fixtures/rejseplanen-trip.js
vendored
473
test/fixtures/rejseplanen-trip.js
vendored
|
@ -1,106 +1,417 @@
|
|||
'use strict'
|
||||
|
||||
const aalborg = {
|
||||
type: 'stop',
|
||||
id: '8600020',
|
||||
name: 'Aalborg St.',
|
||||
location: {
|
||||
type: 'location',
|
||||
id: '8600020',
|
||||
latitude: 57.043037,
|
||||
longitude: 9.917044
|
||||
},
|
||||
products: {
|
||||
'national-train': true,
|
||||
'national-train-2': true,
|
||||
'local-train': true,
|
||||
o: true,
|
||||
's-tog': false,
|
||||
}
|
||||
}
|
||||
|
||||
const hobro = {
|
||||
type: 'stop',
|
||||
id: '8600032',
|
||||
name: 'Hobro St.',
|
||||
location: {
|
||||
type: 'location',
|
||||
id: '8600032',
|
||||
latitude: 56.643539,
|
||||
longitude: 9.78279
|
||||
},
|
||||
products: {
|
||||
'national-train': true,
|
||||
'national-train-2': true,
|
||||
'local-train': true,
|
||||
o: true,
|
||||
's-tog': false,
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
origin: aalborg,
|
||||
destination: hobro,
|
||||
arrival: '2020-07-13T11:25:00+02:00',
|
||||
plannedArrival: '2020-07-13T11:25:00+02:00',
|
||||
arrivalDelay: null,
|
||||
departure: '2020-07-13T10:35:00+02:00',
|
||||
plannedDeparture: '2020-07-13T10:35:00+02:00',
|
||||
departureDelay: null,
|
||||
reachable: true,
|
||||
reachable: true, // todo: drop this field
|
||||
id: '1|307|4|86|12102021',
|
||||
direction: 'CPH Lufthavn',
|
||||
currentLocation: {
|
||||
type: 'location',
|
||||
latitude: 56.482839,
|
||||
longitude: 9.95345,
|
||||
},
|
||||
line: {
|
||||
type: 'line',
|
||||
id: 'replacement-bus-rod',
|
||||
fahrtNr: '20002',
|
||||
name: 'Replacement bus RØD',
|
||||
id: 'ic-71160',
|
||||
fahrtNr: '71160',
|
||||
name: 'IC 71160',
|
||||
public: true,
|
||||
adminCode: '000001',
|
||||
productName: 'Togbus',
|
||||
adminCode: '000002',
|
||||
productName: 'IC',
|
||||
mode: 'train',
|
||||
product: 'o',
|
||||
operator: {type: 'operator', id: 'dsb', name: 'DSB'},
|
||||
product: 'national-train',
|
||||
operator: { type: 'operator', id: 'dsb', name: 'DSB' },
|
||||
},
|
||||
direction: null,
|
||||
arrivalPlatform: null,
|
||||
plannedArrivalPlatform: null,
|
||||
departurePlatform: null,
|
||||
plannedDeparturePlatform: null,
|
||||
|
||||
origin: {
|
||||
type: 'stop',
|
||||
id: '8600020',
|
||||
name: 'Aalborg St.',
|
||||
location: {
|
||||
type: 'location',
|
||||
id: '8600020',
|
||||
latitude: 57.043037,
|
||||
longitude: 9.917044,
|
||||
},
|
||||
products: {
|
||||
'national-train': true,
|
||||
'national-train-2': true,
|
||||
'local-train': true,
|
||||
o: false,
|
||||
's-tog': false,
|
||||
},
|
||||
},
|
||||
departure: '2021-10-12T16:06:00+02:00',
|
||||
plannedDeparture: '2021-10-12T16:06:00+02:00',
|
||||
departureDelay: null,
|
||||
departurePlatform: '3',
|
||||
plannedDeparturePlatform: '4',
|
||||
|
||||
destination: {
|
||||
type: 'stop',
|
||||
id: '8600053',
|
||||
name: 'Aarhus H',
|
||||
location: {
|
||||
type: 'location',
|
||||
id: '8600053',
|
||||
latitude: 56.150444,
|
||||
longitude: 10.204761,
|
||||
},
|
||||
products: {
|
||||
'national-train': true,
|
||||
'national-train-2': true,
|
||||
'local-train': true,
|
||||
o: true,
|
||||
's-tog': false,
|
||||
},
|
||||
},
|
||||
arrival: '2021-10-12T17:38:00+02:00',
|
||||
plannedArrival: '2021-10-12T17:38:00+02:00',
|
||||
arrivalDelay: null,
|
||||
arrivalPlatform: '5',
|
||||
plannedArrivalPlatform: '5',
|
||||
|
||||
remarks: [
|
||||
{ type: 'hint', code: 'RE', text: 'Reservierung empfohlen' },
|
||||
{ type: 'hint', code: 'TD', text: 'Mulighed for internet' },
|
||||
],
|
||||
|
||||
stopovers: [
|
||||
{
|
||||
stop: aalborg,
|
||||
stop: {
|
||||
type: 'stop',
|
||||
id: '8600020',
|
||||
name: 'Aalborg St.',
|
||||
location: {
|
||||
type: 'location',
|
||||
id: '8600020',
|
||||
latitude: 57.043037,
|
||||
longitude: 9.917044,
|
||||
},
|
||||
products: {
|
||||
'national-train': true,
|
||||
'national-train-2': true,
|
||||
'local-train': true,
|
||||
o: false,
|
||||
's-tog': false,
|
||||
},
|
||||
},
|
||||
arrival: null,
|
||||
plannedArrival: null,
|
||||
arrivalDelay: null,
|
||||
arrivalPlatform: null,
|
||||
plannedArrivalPlatform: null,
|
||||
departure: '2020-07-13T10:35:00+02:00',
|
||||
plannedDeparture: '2020-07-13T10:35:00+02:00',
|
||||
departure: '2021-10-12T16:06:00+02:00',
|
||||
plannedDeparture: '2021-10-12T16:06:00+02:00',
|
||||
departureDelay: null,
|
||||
departurePlatform: null,
|
||||
plannedDeparturePlatform: null
|
||||
departurePlatform: '3',
|
||||
plannedDeparturePlatform: '4',
|
||||
remarks: [
|
||||
{
|
||||
type: 'status',
|
||||
code: 'text.realtime.stop.dep.platformChange',
|
||||
text: 'Abfahrt heute von Gleis 3',
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
stop: hobro,
|
||||
arrival: '2020-07-13T11:25:00+02:00',
|
||||
plannedArrival: '2020-07-13T11:25:00+02:00',
|
||||
stop: {
|
||||
type: 'stop',
|
||||
id: '8600022',
|
||||
name: 'Skalborg St.',
|
||||
location: {
|
||||
type: 'location',
|
||||
id: '8600022',
|
||||
latitude: 57.008366,
|
||||
longitude: 9.898373,
|
||||
},
|
||||
products: {
|
||||
'national-train': true,
|
||||
'national-train-2': false,
|
||||
'local-train': true,
|
||||
o: false,
|
||||
's-tog': false,
|
||||
},
|
||||
},
|
||||
arrival: '2021-10-12T16:10:00+02:00',
|
||||
plannedArrival: '2021-10-12T16:09:00+02:00',
|
||||
arrivalDelay: 60,
|
||||
arrivalPlatform: '2',
|
||||
plannedArrivalPlatform: '2',
|
||||
departure: '2021-10-12T16:12:00+02:00',
|
||||
plannedDeparture: '2021-10-12T16:10:00+02:00',
|
||||
departureDelay: 120,
|
||||
departurePlatform: '2',
|
||||
plannedDeparturePlatform: '2',
|
||||
},
|
||||
{
|
||||
stop: {
|
||||
type: 'stop',
|
||||
id: '8600023',
|
||||
name: 'Svenstrup St. (Jylland)',
|
||||
location: {
|
||||
type: 'location',
|
||||
id: '8600023',
|
||||
latitude: 56.973092,
|
||||
longitude: 9.856294,
|
||||
},
|
||||
products: {
|
||||
'national-train': true,
|
||||
'national-train-2': false,
|
||||
'local-train': true,
|
||||
o: false,
|
||||
's-tog': false,
|
||||
},
|
||||
},
|
||||
arrival: '2021-10-12T16:14:00+02:00',
|
||||
plannedArrival: '2021-10-12T16:13:00+02:00',
|
||||
arrivalDelay: 60,
|
||||
arrivalPlatform: '2',
|
||||
plannedArrivalPlatform: '2',
|
||||
departure: '2021-10-12T16:17:00+02:00',
|
||||
plannedDeparture: '2021-10-12T16:14:00+02:00',
|
||||
departureDelay: 180,
|
||||
departurePlatform: '2',
|
||||
plannedDeparturePlatform: '2',
|
||||
},
|
||||
{
|
||||
stop: {
|
||||
type: 'stop',
|
||||
id: '8600026',
|
||||
name: 'Støvring St.',
|
||||
location: {
|
||||
type: 'location',
|
||||
id: '8600026',
|
||||
latitude: 56.890976,
|
||||
longitude: 9.843925,
|
||||
},
|
||||
products: {
|
||||
'national-train': true,
|
||||
'national-train-2': false,
|
||||
'local-train': true,
|
||||
o: false,
|
||||
's-tog': false,
|
||||
},
|
||||
},
|
||||
arrival: '2021-10-12T16:22:00+02:00',
|
||||
plannedArrival: '2021-10-12T16:21:00+02:00',
|
||||
arrivalDelay: 60,
|
||||
arrivalPlatform: '2',
|
||||
plannedArrivalPlatform: '2',
|
||||
departure: '2021-10-12T16:24:00+02:00',
|
||||
plannedDeparture: '2021-10-12T16:22:00+02:00',
|
||||
departureDelay: 120,
|
||||
departurePlatform: '2',
|
||||
plannedDeparturePlatform: '2',
|
||||
},
|
||||
{
|
||||
stop: {
|
||||
type: 'stop',
|
||||
id: '8600027',
|
||||
name: 'Skørping St.',
|
||||
location: {
|
||||
type: 'location',
|
||||
id: '8600027',
|
||||
latitude: 56.835719,
|
||||
longitude: 9.887361,
|
||||
},
|
||||
products: {
|
||||
'national-train': true,
|
||||
'national-train-2': false,
|
||||
'local-train': true,
|
||||
o: false,
|
||||
's-tog': false,
|
||||
},
|
||||
},
|
||||
arrival: '2021-10-12T16:28:00+02:00',
|
||||
plannedArrival: '2021-10-12T16:27:00+02:00',
|
||||
arrivalDelay: 60,
|
||||
arrivalPlatform: '3',
|
||||
plannedArrivalPlatform: '3',
|
||||
departure: '2021-10-12T16:29:00+02:00',
|
||||
plannedDeparture: '2021-10-12T16:28:00+02:00',
|
||||
departureDelay: 60,
|
||||
departurePlatform: '3',
|
||||
plannedDeparturePlatform: '3',
|
||||
},
|
||||
{
|
||||
stop: {
|
||||
type: 'stop',
|
||||
id: '8600029',
|
||||
name: 'Arden St.',
|
||||
location: {
|
||||
type: 'location',
|
||||
id: '8600029',
|
||||
latitude: 56.769729,
|
||||
longitude: 9.859926,
|
||||
},
|
||||
products: {
|
||||
'national-train': true,
|
||||
'national-train-2': true,
|
||||
'local-train': false,
|
||||
o: false,
|
||||
's-tog': false,
|
||||
},
|
||||
},
|
||||
arrival: '2021-10-12T16:36:00+02:00',
|
||||
plannedArrival: '2021-10-12T16:33:00+02:00',
|
||||
arrivalDelay: 180,
|
||||
arrivalPlatform: '1',
|
||||
plannedArrivalPlatform: '1',
|
||||
departure: '2021-10-12T16:37:00+02:00',
|
||||
plannedDeparture: '2021-10-12T16:34:00+02:00',
|
||||
departureDelay: 180,
|
||||
departurePlatform: '1',
|
||||
plannedDeparturePlatform: '1',
|
||||
},
|
||||
{
|
||||
stop: {
|
||||
type: 'stop',
|
||||
id: '8600032',
|
||||
name: 'Hobro St.',
|
||||
location: {
|
||||
type: 'location',
|
||||
id: '8600032',
|
||||
latitude: 56.643539,
|
||||
longitude: 9.78279,
|
||||
},
|
||||
products: {
|
||||
'national-train': true,
|
||||
'national-train-2': true,
|
||||
'local-train': false,
|
||||
o: false,
|
||||
's-tog': false,
|
||||
},
|
||||
},
|
||||
arrival: '2021-10-12T16:45:00+02:00',
|
||||
plannedArrival: '2021-10-12T16:43:00+02:00',
|
||||
arrivalDelay: 120,
|
||||
arrivalPlatform: '3',
|
||||
plannedArrivalPlatform: '3',
|
||||
departure: '2021-10-12T16:46:00+02:00',
|
||||
plannedDeparture: '2021-10-12T16:45:00+02:00',
|
||||
departureDelay: 60,
|
||||
departurePlatform: '3',
|
||||
plannedDeparturePlatform: '3',
|
||||
},
|
||||
{
|
||||
stop: {
|
||||
type: 'stop',
|
||||
id: '8600040',
|
||||
name: 'Randers St.',
|
||||
location: {
|
||||
type: 'location',
|
||||
id: '8600040',
|
||||
latitude: 56.461858,
|
||||
longitude: 10.022011,
|
||||
},
|
||||
products: {
|
||||
'national-train': true,
|
||||
'national-train-2': true,
|
||||
'local-train': false,
|
||||
o: false,
|
||||
's-tog': false,
|
||||
},
|
||||
},
|
||||
arrival: '2021-10-12T17:01:00+02:00',
|
||||
plannedArrival: '2021-10-12T16:59:00+02:00',
|
||||
arrivalDelay: 120,
|
||||
arrivalPlatform: '3',
|
||||
plannedArrivalPlatform: '3',
|
||||
departure: '2021-10-12T17:01:00+02:00',
|
||||
plannedDeparture: '2021-10-12T17:01:00+02:00',
|
||||
departureDelay: null,
|
||||
departurePlatform: '3',
|
||||
plannedDeparturePlatform: '3',
|
||||
},
|
||||
{
|
||||
stop: {
|
||||
type: 'stop',
|
||||
id: '8600044',
|
||||
name: 'Langå St.',
|
||||
location: {
|
||||
type: 'location',
|
||||
id: '8600044',
|
||||
latitude: 56.386393,
|
||||
longitude: 9.896144,
|
||||
},
|
||||
products: {
|
||||
'national-train': true,
|
||||
'national-train-2': false,
|
||||
'local-train': true,
|
||||
o: true,
|
||||
's-tog': false,
|
||||
},
|
||||
},
|
||||
arrival: '2021-10-12T17:09:00+02:00',
|
||||
plannedArrival: '2021-10-12T17:09:00+02:00',
|
||||
arrivalDelay: null,
|
||||
arrivalPlatform: null,
|
||||
plannedArrivalPlatform: null,
|
||||
arrivalPlatform: '2',
|
||||
plannedArrivalPlatform: '2',
|
||||
departure: '2021-10-12T17:10:00+02:00',
|
||||
plannedDeparture: '2021-10-12T17:10:00+02:00',
|
||||
departureDelay: null,
|
||||
departurePlatform: '2',
|
||||
plannedDeparturePlatform: '2',
|
||||
},
|
||||
{
|
||||
stop: {
|
||||
type: 'stop',
|
||||
id: '8600047',
|
||||
name: 'Hadsten St.',
|
||||
location: {
|
||||
type: 'location',
|
||||
id: '8600047',
|
||||
latitude: 56.327496,
|
||||
longitude: 10.047234,
|
||||
},
|
||||
products: {
|
||||
'national-train': true,
|
||||
'national-train-2': false,
|
||||
'local-train': true,
|
||||
o: true,
|
||||
's-tog': false,
|
||||
},
|
||||
},
|
||||
arrival: '2021-10-12T17:17:00+02:00',
|
||||
plannedArrival: '2021-10-12T17:17:00+02:00',
|
||||
arrivalDelay: null,
|
||||
arrivalPlatform: '1',
|
||||
plannedArrivalPlatform: '1',
|
||||
departure: '2021-10-12T17:18:00+02:00',
|
||||
plannedDeparture: '2021-10-12T17:18:00+02:00',
|
||||
departureDelay: null,
|
||||
departurePlatform: '1',
|
||||
plannedDeparturePlatform: '1',
|
||||
},
|
||||
{
|
||||
stop: {
|
||||
type: 'stop',
|
||||
id: '8600053',
|
||||
name: 'Aarhus H',
|
||||
location: {
|
||||
type: 'location',
|
||||
id: '8600053',
|
||||
latitude: 56.150444,
|
||||
longitude: 10.204761,
|
||||
},
|
||||
products: {
|
||||
'national-train': true,
|
||||
'national-train-2': true,
|
||||
'local-train': true,
|
||||
o: true,
|
||||
's-tog': false,
|
||||
},
|
||||
},
|
||||
arrival: '2021-10-12T17:38:00+02:00',
|
||||
plannedArrival: '2021-10-12T17:38:00+02:00',
|
||||
arrivalDelay: null,
|
||||
arrivalPlatform: '5',
|
||||
plannedArrivalPlatform: '5',
|
||||
departure: null,
|
||||
plannedDeparture: null,
|
||||
departureDelay: null,
|
||||
departurePlatform: null,
|
||||
plannedDeparturePlatform: null
|
||||
}
|
||||
plannedDeparturePlatform: null,
|
||||
},
|
||||
],
|
||||
remarks: [{
|
||||
type: 'hint',
|
||||
code: 'NO',
|
||||
text: 'Vi kører med Togbusser på denne tur, som derfor varer længere end normalt. Tiderne, du ser i Rejseplanen, er kun vejledende. Togbusserne kører i pendulfart mellem stationerne. Det skyldes akutte driftsforstyrrelser. I Togbussen kan du ikke tage din cykel med.',
|
||||
}, {
|
||||
type: 'status',
|
||||
code: 'text.realtime.journey.additional.service',
|
||||
text: 'Extra bus or train',
|
||||
}],
|
||||
id: '1|51255|0|86|13072020'
|
||||
}
|
||||
|
|
632
test/fixtures/rejseplanen-trip.json
vendored
632
test/fixtures/rejseplanen-trip.json
vendored
|
@ -5,69 +5,190 @@
|
|||
"lid": "A=1@O=Aalborg St.@X=9917044@Y=57043037@U=86@L=8600020@",
|
||||
"type": "S",
|
||||
"name": "Aalborg St.",
|
||||
"icoX": 2,
|
||||
"icoX": 0,
|
||||
"extId": "8600020",
|
||||
"state": "F",
|
||||
"crd": {
|
||||
"x": 9917044,
|
||||
"y": 57043037,
|
||||
"layerX": 0,
|
||||
"crdSysX": 0
|
||||
"floor": 0
|
||||
},
|
||||
"pCls": 239
|
||||
"pCls": 7,
|
||||
"chgTime": "000300"
|
||||
},
|
||||
{
|
||||
"lid": "A=1@O=Aarhus H@X=10204761@Y=56150444@U=86@L=8600053@",
|
||||
"type": "S",
|
||||
"name": "Aarhus H",
|
||||
"icoX": 0,
|
||||
"extId": "8600053",
|
||||
"state": "F",
|
||||
"crd": {
|
||||
"x": 10204761,
|
||||
"y": 56150444,
|
||||
"floor": 0
|
||||
},
|
||||
"pCls": 2319,
|
||||
"chgTime": "000600"
|
||||
},
|
||||
{
|
||||
"lid": "A=1@O=Skalborg St.@X=9898373@Y=57008366@U=86@L=8600022@",
|
||||
"type": "S",
|
||||
"name": "Skalborg St.",
|
||||
"icoX": 0,
|
||||
"extId": "8600022",
|
||||
"state": "F",
|
||||
"crd": {
|
||||
"x": 9898373,
|
||||
"y": 57008366,
|
||||
"floor": 0
|
||||
},
|
||||
"pCls": 5,
|
||||
"chgTime": "000300"
|
||||
},
|
||||
{
|
||||
"lid": "A=1@O=Svenstrup St. (Jylland)@X=9856294@Y=56973092@U=86@L=8600023@",
|
||||
"type": "S",
|
||||
"name": "Svenstrup St. (Jylland)",
|
||||
"icoX": 0,
|
||||
"extId": "8600023",
|
||||
"state": "F",
|
||||
"crd": {
|
||||
"x": 9856294,
|
||||
"y": 56973092,
|
||||
"floor": 0
|
||||
},
|
||||
"pCls": 5,
|
||||
"chgTime": "000300"
|
||||
},
|
||||
{
|
||||
"lid": "A=1@O=Støvring St.@X=9843925@Y=56890976@U=86@L=8600026@",
|
||||
"type": "S",
|
||||
"name": "Støvring St.",
|
||||
"icoX": 0,
|
||||
"extId": "8600026",
|
||||
"state": "F",
|
||||
"crd": {
|
||||
"x": 9843925,
|
||||
"y": 56890976,
|
||||
"floor": 0
|
||||
},
|
||||
"pCls": 5,
|
||||
"chgTime": "000300"
|
||||
},
|
||||
{
|
||||
"lid": "A=1@O=Skørping St.@X=9887361@Y=56835719@U=86@L=8600027@",
|
||||
"type": "S",
|
||||
"name": "Skørping St.",
|
||||
"icoX": 0,
|
||||
"extId": "8600027",
|
||||
"state": "F",
|
||||
"crd": {
|
||||
"x": 9887361,
|
||||
"y": 56835719,
|
||||
"floor": 0
|
||||
},
|
||||
"pCls": 5,
|
||||
"chgTime": "000200"
|
||||
},
|
||||
{
|
||||
"lid": "A=1@O=Arden St.@X=9859926@Y=56769729@U=86@L=8600029@",
|
||||
"type": "S",
|
||||
"name": "Arden St.",
|
||||
"icoX": 0,
|
||||
"extId": "8600029",
|
||||
"state": "F",
|
||||
"crd": {
|
||||
"x": 9859926,
|
||||
"y": 56769729,
|
||||
"floor": 0
|
||||
},
|
||||
"pCls": 3,
|
||||
"chgTime": "000200"
|
||||
},
|
||||
{
|
||||
"lid": "A=1@O=Hobro St.@X=9782790@Y=56643539@U=86@L=8600032@",
|
||||
"type": "S",
|
||||
"name": "Hobro St.",
|
||||
"icoX": 2,
|
||||
"icoX": 0,
|
||||
"extId": "8600032",
|
||||
"state": "F",
|
||||
"crd": {
|
||||
"x": 9782790,
|
||||
"y": 56643539,
|
||||
"layerX": 0,
|
||||
"crdSysX": 0
|
||||
"floor": 0
|
||||
},
|
||||
"pCls": 303
|
||||
"pCls": 3,
|
||||
"chgTime": "000200"
|
||||
},
|
||||
{
|
||||
"lid": "A=1@O=Randers St.@X=10022011@Y=56461858@U=86@L=8600040@",
|
||||
"type": "S",
|
||||
"name": "Randers St.",
|
||||
"icoX": 0,
|
||||
"extId": "8600040",
|
||||
"state": "F",
|
||||
"crd": {
|
||||
"x": 10022011,
|
||||
"y": 56461858,
|
||||
"floor": 0
|
||||
},
|
||||
"pCls": 3,
|
||||
"chgTime": "000200"
|
||||
},
|
||||
{
|
||||
"lid": "A=1@O=Langå St.@X=9896144@Y=56386393@U=86@L=8600044@",
|
||||
"type": "S",
|
||||
"name": "Langå St.",
|
||||
"icoX": 0,
|
||||
"extId": "8600044",
|
||||
"state": "F",
|
||||
"crd": {
|
||||
"x": 9896144,
|
||||
"y": 56386393,
|
||||
"floor": 0
|
||||
},
|
||||
"pCls": 13,
|
||||
"chgTime": "000400"
|
||||
},
|
||||
{
|
||||
"lid": "A=1@O=Hadsten St.@X=10047234@Y=56327496@U=86@L=8600047@",
|
||||
"type": "S",
|
||||
"name": "Hadsten St.",
|
||||
"icoX": 0,
|
||||
"extId": "8600047",
|
||||
"state": "F",
|
||||
"crd": {
|
||||
"x": 10047234,
|
||||
"y": 56327496,
|
||||
"floor": 0
|
||||
},
|
||||
"pCls": 13,
|
||||
"chgTime": "000200"
|
||||
}
|
||||
],
|
||||
"prodL": [
|
||||
{
|
||||
"name": "Replacement bus RØD",
|
||||
"nameS": "RØD",
|
||||
"number": "RØD",
|
||||
"pid": "L::0::IC::B2174145061::IC_2174145061::*",
|
||||
"name": "IC 71160",
|
||||
"number": "71160",
|
||||
"icoX": 0,
|
||||
"cls": 8,
|
||||
"cls": 1,
|
||||
"oprX": 0,
|
||||
"prodCtx": {
|
||||
"name": "Replacement bus RØD",
|
||||
"num": "20002",
|
||||
"line": "RØD",
|
||||
"matchId": "RØD",
|
||||
"catOut": "Togbus ",
|
||||
"catOutS": "018",
|
||||
"catOutL": "Replacement bus",
|
||||
"catIn": "018",
|
||||
"catCode": "3",
|
||||
"admin": "000001"
|
||||
}
|
||||
}
|
||||
],
|
||||
"polyL": [],
|
||||
"layerL": [
|
||||
{
|
||||
"id": "standard",
|
||||
"name": "standard",
|
||||
"index": 0,
|
||||
"annoCnt": 0
|
||||
}
|
||||
],
|
||||
"crdSysL": [
|
||||
{
|
||||
"id": "standard",
|
||||
"index": 0,
|
||||
"type": "WGS84"
|
||||
"name": "IC 71160",
|
||||
"num": "71160",
|
||||
"matchId": "71160",
|
||||
"catOut": "IC ",
|
||||
"catOutS": "001",
|
||||
"catOutL": "IC ",
|
||||
"catIn": "001",
|
||||
"catCode": "0",
|
||||
"admin": "000002"
|
||||
},
|
||||
"himIdL": [
|
||||
"HIM_FREETEXT_263669"
|
||||
]
|
||||
}
|
||||
],
|
||||
"opL": [
|
||||
|
@ -78,38 +199,29 @@
|
|||
],
|
||||
"remL": [
|
||||
{
|
||||
"type": "I",
|
||||
"code": "NO",
|
||||
"icoX": 3,
|
||||
"txtN": "Vi kører med Togbusser på denne tur, som derfor varer længere end normalt. Tiderne, du ser i Rejseplanen, er kun vejledende. Togbusserne kører i pendulfart mellem stationerne. Det skyldes akutte driftsforstyrrelser. I Togbussen kan du ikke tage din cykel med."
|
||||
"type": "R",
|
||||
"code": "text.realtime.stop.dep.platformChange",
|
||||
"icoX": 2,
|
||||
"txtN": "Abfahrt heute von Gleis 3"
|
||||
},
|
||||
{
|
||||
"type": "R",
|
||||
"code": "text.realtime.journey.additional.service",
|
||||
"icoX": 4,
|
||||
"txtN": "Extra bus or train"
|
||||
"type": "A",
|
||||
"code": "RE",
|
||||
"prio": 0,
|
||||
"icoX": 3,
|
||||
"txtN": "Reservierung empfohlen"
|
||||
},
|
||||
{
|
||||
"type": "A",
|
||||
"code": "TD",
|
||||
"prio": 0,
|
||||
"icoX": 3,
|
||||
"txtN": "Mulighed for internet"
|
||||
}
|
||||
],
|
||||
"icoL": [
|
||||
{
|
||||
"res": "prod_gen",
|
||||
"fg": {
|
||||
"r": 255,
|
||||
"g": 255,
|
||||
"b": 255
|
||||
},
|
||||
"bg": {
|
||||
"r": 80,
|
||||
"g": 183,
|
||||
"b": 72
|
||||
}
|
||||
},
|
||||
{
|
||||
"res": "DSB",
|
||||
"txt": "DSB"
|
||||
},
|
||||
{
|
||||
"res": "prod_ic",
|
||||
"res": "IC",
|
||||
"fg": {
|
||||
"r": 255,
|
||||
"g": 255,
|
||||
|
@ -122,72 +234,392 @@
|
|||
}
|
||||
},
|
||||
{
|
||||
"res": "INFO"
|
||||
"res": "DSB",
|
||||
"txt": "DSB"
|
||||
},
|
||||
{
|
||||
"res": "rt_warn"
|
||||
"res": "rt_platform"
|
||||
},
|
||||
{
|
||||
"res": "attr_info"
|
||||
}
|
||||
],
|
||||
"dirL": [
|
||||
{
|
||||
"txt": "CPH Lufthavn",
|
||||
"flg": "1"
|
||||
}
|
||||
],
|
||||
"lDrawStyleL": [
|
||||
{
|
||||
"sIcoX": 0,
|
||||
"type": "SOLID",
|
||||
"bg": {
|
||||
"r": 239,
|
||||
"g": 65,
|
||||
"b": 48
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "SOLID",
|
||||
"bg": {
|
||||
"r": 239,
|
||||
"g": 65,
|
||||
"b": 48
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"journey": {
|
||||
"jid": "1|51255|0|86|13072020",
|
||||
"date": "20200713",
|
||||
"jid": "1|307|4|86|12102021",
|
||||
"date": "20211012",
|
||||
"prodX": 0,
|
||||
"status": "A",
|
||||
"dirTxt": "CPH Lufthavn",
|
||||
"dirFlg": "1",
|
||||
"status": "P",
|
||||
"isRchbl": true,
|
||||
"stopL": [
|
||||
{
|
||||
"locX": 0,
|
||||
"idx": 0,
|
||||
"dProdX": 0,
|
||||
"dInR": true,
|
||||
"dTimeS": "103500",
|
||||
"dPltfS": {
|
||||
"type": "PL",
|
||||
"txt": "4"
|
||||
},
|
||||
"dPltfR": {
|
||||
"type": "PL",
|
||||
"txt": "3"
|
||||
},
|
||||
"dPlatfCh": true,
|
||||
"dTimeS": "160600",
|
||||
"dProgType": "PROGNOSED",
|
||||
"dDirTxt": "CPH Lufthavn",
|
||||
"dDirFlg": "1",
|
||||
"msgL": [
|
||||
{
|
||||
"type": "REM",
|
||||
"remX": 0,
|
||||
"sty": "M",
|
||||
"tagL": [
|
||||
"RES_LOC_H3"
|
||||
],
|
||||
"sort": 13107200,
|
||||
"persist": false
|
||||
}
|
||||
],
|
||||
"type": "N"
|
||||
},
|
||||
{
|
||||
"locX": 2,
|
||||
"idx": 1,
|
||||
"aProdX": 0,
|
||||
"aPltfS": {
|
||||
"type": "PL",
|
||||
"txt": "2"
|
||||
},
|
||||
"aPltfR": {
|
||||
"type": "PL",
|
||||
"txt": "2"
|
||||
},
|
||||
"aTimeS": "160900",
|
||||
"aTimeR": "161000",
|
||||
"aProgType": "PROGNOSED",
|
||||
"dProdX": 0,
|
||||
"dPltfS": {
|
||||
"type": "PL",
|
||||
"txt": "2"
|
||||
},
|
||||
"dPltfR": {
|
||||
"type": "PL",
|
||||
"txt": "2"
|
||||
},
|
||||
"dTimeS": "161000",
|
||||
"dTimeR": "161200",
|
||||
"dProgType": "PROGNOSED",
|
||||
"type": "N"
|
||||
},
|
||||
{
|
||||
"locX": 3,
|
||||
"idx": 2,
|
||||
"aProdX": 0,
|
||||
"aPltfS": {
|
||||
"type": "PL",
|
||||
"txt": "2"
|
||||
},
|
||||
"aPltfR": {
|
||||
"type": "PL",
|
||||
"txt": "2"
|
||||
},
|
||||
"aTimeS": "161300",
|
||||
"aTimeR": "161400",
|
||||
"aProgType": "PROGNOSED",
|
||||
"dProdX": 0,
|
||||
"dPltfS": {
|
||||
"type": "PL",
|
||||
"txt": "2"
|
||||
},
|
||||
"dPltfR": {
|
||||
"type": "PL",
|
||||
"txt": "2"
|
||||
},
|
||||
"dTimeS": "161400",
|
||||
"dTimeR": "161700",
|
||||
"dProgType": "PROGNOSED",
|
||||
"type": "N"
|
||||
},
|
||||
{
|
||||
"locX": 4,
|
||||
"idx": 3,
|
||||
"aProdX": 0,
|
||||
"aPltfS": {
|
||||
"type": "PL",
|
||||
"txt": "2"
|
||||
},
|
||||
"aPltfR": {
|
||||
"type": "PL",
|
||||
"txt": "2"
|
||||
},
|
||||
"aTimeS": "162100",
|
||||
"aTimeR": "162200",
|
||||
"aProgType": "PROGNOSED",
|
||||
"dProdX": 0,
|
||||
"dPltfS": {
|
||||
"type": "PL",
|
||||
"txt": "2"
|
||||
},
|
||||
"dPltfR": {
|
||||
"type": "PL",
|
||||
"txt": "2"
|
||||
},
|
||||
"dTimeS": "162200",
|
||||
"dTimeR": "162400",
|
||||
"dProgType": "PROGNOSED",
|
||||
"type": "N"
|
||||
},
|
||||
{
|
||||
"locX": 5,
|
||||
"idx": 4,
|
||||
"aProdX": 0,
|
||||
"aPltfS": {
|
||||
"type": "PL",
|
||||
"txt": "3"
|
||||
},
|
||||
"aPltfR": {
|
||||
"type": "PL",
|
||||
"txt": "3"
|
||||
},
|
||||
"aTimeS": "162700",
|
||||
"aTimeR": "162800",
|
||||
"aProgType": "PROGNOSED",
|
||||
"dProdX": 0,
|
||||
"dPltfS": {
|
||||
"type": "PL",
|
||||
"txt": "3"
|
||||
},
|
||||
"dPltfR": {
|
||||
"type": "PL",
|
||||
"txt": "3"
|
||||
},
|
||||
"dTimeS": "162800",
|
||||
"dTimeR": "162900",
|
||||
"dProgType": "PROGNOSED",
|
||||
"type": "N"
|
||||
},
|
||||
{
|
||||
"locX": 6,
|
||||
"idx": 5,
|
||||
"aProdX": 0,
|
||||
"aPltfS": {
|
||||
"type": "PL",
|
||||
"txt": "1"
|
||||
},
|
||||
"aPltfR": {
|
||||
"type": "PL",
|
||||
"txt": "1"
|
||||
},
|
||||
"aTimeS": "163300",
|
||||
"aTimeR": "163600",
|
||||
"aProgType": "PROGNOSED",
|
||||
"dProdX": 0,
|
||||
"dPltfS": {
|
||||
"type": "PL",
|
||||
"txt": "1"
|
||||
},
|
||||
"dPltfR": {
|
||||
"type": "PL",
|
||||
"txt": "1"
|
||||
},
|
||||
"dTimeS": "163400",
|
||||
"dTimeR": "163700",
|
||||
"dProgType": "PROGNOSED",
|
||||
"type": "N"
|
||||
},
|
||||
{
|
||||
"locX": 7,
|
||||
"idx": 6,
|
||||
"aProdX": 0,
|
||||
"aPltfS": {
|
||||
"type": "PL",
|
||||
"txt": "3"
|
||||
},
|
||||
"aPltfR": {
|
||||
"type": "PL",
|
||||
"txt": "3"
|
||||
},
|
||||
"aTimeS": "164300",
|
||||
"aTimeR": "164500",
|
||||
"aProgType": "PROGNOSED",
|
||||
"dProdX": 0,
|
||||
"dPltfS": {
|
||||
"type": "PL",
|
||||
"txt": "3"
|
||||
},
|
||||
"dPltfR": {
|
||||
"type": "PL",
|
||||
"txt": "3"
|
||||
},
|
||||
"dTimeS": "164500",
|
||||
"dTimeR": "164600",
|
||||
"dProgType": "PROGNOSED",
|
||||
"type": "N"
|
||||
},
|
||||
{
|
||||
"locX": 8,
|
||||
"idx": 7,
|
||||
"aProdX": 0,
|
||||
"aPltfS": {
|
||||
"type": "PL",
|
||||
"txt": "3"
|
||||
},
|
||||
"aPltfR": {
|
||||
"type": "PL",
|
||||
"txt": "3"
|
||||
},
|
||||
"aTimeS": "165900",
|
||||
"aTimeR": "170100",
|
||||
"aProgType": "PROGNOSED",
|
||||
"dProdX": 0,
|
||||
"dPltfS": {
|
||||
"type": "PL",
|
||||
"txt": "3"
|
||||
},
|
||||
"dPltfR": {
|
||||
"type": "PL",
|
||||
"txt": "3"
|
||||
},
|
||||
"dTimeS": "170100",
|
||||
"dProgType": "PROGNOSED",
|
||||
"type": "N"
|
||||
},
|
||||
{
|
||||
"locX": 9,
|
||||
"idx": 8,
|
||||
"aProdX": 0,
|
||||
"aPltfS": {
|
||||
"type": "PL",
|
||||
"txt": "2"
|
||||
},
|
||||
"aPltfR": {
|
||||
"type": "PL",
|
||||
"txt": "2"
|
||||
},
|
||||
"aTimeS": "170900",
|
||||
"aProgType": "PROGNOSED",
|
||||
"dProdX": 0,
|
||||
"dPltfS": {
|
||||
"type": "PL",
|
||||
"txt": "2"
|
||||
},
|
||||
"dPltfR": {
|
||||
"type": "PL",
|
||||
"txt": "2"
|
||||
},
|
||||
"dTimeS": "171000",
|
||||
"dProgType": "PROGNOSED",
|
||||
"type": "N"
|
||||
},
|
||||
{
|
||||
"locX": 10,
|
||||
"idx": 9,
|
||||
"aProdX": 0,
|
||||
"aPltfS": {
|
||||
"type": "PL",
|
||||
"txt": "1"
|
||||
},
|
||||
"aPltfR": {
|
||||
"type": "PL",
|
||||
"txt": "1"
|
||||
},
|
||||
"aTimeS": "171700",
|
||||
"aProgType": "PROGNOSED",
|
||||
"dProdX": 0,
|
||||
"dPltfS": {
|
||||
"type": "PL",
|
||||
"txt": "1"
|
||||
},
|
||||
"dPltfR": {
|
||||
"type": "PL",
|
||||
"txt": "1"
|
||||
},
|
||||
"dTimeS": "171800",
|
||||
"dProgType": "PROGNOSED",
|
||||
"type": "N"
|
||||
},
|
||||
{
|
||||
"locX": 1,
|
||||
"idx": 1,
|
||||
"idx": 11,
|
||||
"aProdX": 0,
|
||||
"aOutR": true,
|
||||
"aTimeS": "112500",
|
||||
"aPltfS": {
|
||||
"type": "PL",
|
||||
"txt": "5"
|
||||
},
|
||||
"aPltfR": {
|
||||
"type": "PL",
|
||||
"txt": "5"
|
||||
},
|
||||
"aTimeS": "173800",
|
||||
"aProgType": "PROGNOSED",
|
||||
"type": "N"
|
||||
}
|
||||
],
|
||||
"sDaysL": [
|
||||
{
|
||||
"sDaysR": "not every day",
|
||||
"sDaysI": "13. Jul",
|
||||
"sDaysB": "10000000000000000000",
|
||||
"sDaysR": "nicht täglich",
|
||||
"sDaysI": "12. bis 24. Okt 2021",
|
||||
"sDaysB": "FFF8000000000000000000",
|
||||
"fLocX": 0,
|
||||
"tLocX": 1,
|
||||
"fLocIdx": 0,
|
||||
"tLocIdx": 1
|
||||
"tLocIdx": 11
|
||||
}
|
||||
],
|
||||
"pos": {
|
||||
"x": 9953450,
|
||||
"y": 56482839
|
||||
},
|
||||
"msgL": [
|
||||
{
|
||||
"type": "REM",
|
||||
"remX": 0,
|
||||
"dspl": "U",
|
||||
"remX": 1,
|
||||
"sty": "I",
|
||||
"fLocX": 0,
|
||||
"tLocX": 1,
|
||||
"tagL": [
|
||||
"RES_JNY_DTL"
|
||||
"RES_JNY_DTL_H3"
|
||||
],
|
||||
"sort": 684195840,
|
||||
"persist": false
|
||||
"sort": 402653184
|
||||
},
|
||||
{
|
||||
"type": "REM",
|
||||
"remX": 1,
|
||||
"dspl": "U",
|
||||
"remX": 2,
|
||||
"sty": "I",
|
||||
"fLocX": 0,
|
||||
"tLocX": 1,
|
||||
"tagL": [
|
||||
"RES_JNY_H3"
|
||||
"RES_JNY_DTL_H3"
|
||||
],
|
||||
"sort": 13107200,
|
||||
"persist": false
|
||||
"sort": 402653184
|
||||
}
|
||||
],
|
||||
"subscr": "F",
|
||||
|
@ -197,11 +629,23 @@
|
|||
"fLocX": 0,
|
||||
"tLocX": 1,
|
||||
"fIdx": 0,
|
||||
"tIdx": 1
|
||||
"tIdx": 11
|
||||
}
|
||||
]
|
||||
],
|
||||
"dirL": [
|
||||
{
|
||||
"dirX": 0,
|
||||
"fLocX": 0,
|
||||
"tLocX": 1,
|
||||
"fIdx": 0,
|
||||
"tIdx": 11
|
||||
}
|
||||
],
|
||||
"sumLDrawStyleX": 0,
|
||||
"resLDrawStyleX": 1,
|
||||
"trainStartDate": "20211012"
|
||||
},
|
||||
"fpB": "20200710",
|
||||
"fpE": "20200923",
|
||||
"planrtTS": "1594478912"
|
||||
"fpB": "20211012",
|
||||
"fpE": "20220105",
|
||||
"planrtTS": "1634050700"
|
||||
}
|
|
@ -16,7 +16,7 @@ const opt = {
|
|||
subStops: false,
|
||||
entrances: true,
|
||||
remarks: true,
|
||||
when: '2020-07-11T16:49:00+02:00',
|
||||
when: '2021-11-12T17:30:00+02:00',
|
||||
}
|
||||
|
||||
tap.test('parses a trip correctly (Rejseplanen)', (t) => {
|
||||
|
|
Loading…
Add table
Reference in a new issue