mirror of
https://github.com/public-transport/db-vendo-client.git
synced 2025-02-23 07:09:35 +02:00
skip & un-skip some E2E/integration tests ✅
This commit is contained in:
parent
0349ebac20
commit
7b914ae939
7 changed files with 20 additions and 20 deletions
|
@ -56,7 +56,7 @@ const westhafen = '900001201'
|
||||||
const wedding = '900009104'
|
const wedding = '900009104'
|
||||||
const württembergallee = '900026153'
|
const württembergallee = '900026153'
|
||||||
const tiergarten = '900003103'
|
const tiergarten = '900003103'
|
||||||
const jannowitzbrücke = '900000100004'
|
const jannowitzbrücke = '900100004'
|
||||||
|
|
||||||
const hour = 60 * 60 * 1000
|
const hour = 60 * 60 * 1000
|
||||||
|
|
||||||
|
@ -195,7 +195,7 @@ tap.test('earlier/later journeys', async (t) => {
|
||||||
t.end()
|
t.end()
|
||||||
})
|
})
|
||||||
|
|
||||||
tap.skip('journeys – leg cycle & alternatives', async (t) => {
|
tap.test('journeys – leg cycle & alternatives', async (t) => {
|
||||||
await testLegCycleAlternatives({
|
await testLegCycleAlternatives({
|
||||||
test: t,
|
test: t,
|
||||||
fetchJourneys: client.journeys,
|
fetchJourneys: client.journeys,
|
||||||
|
|
|
@ -125,15 +125,15 @@ tap.test('Luxembourg to 9071 Ettelbruck, Rue des Romains 4', async (t) => {
|
||||||
t.end()
|
t.end()
|
||||||
})
|
})
|
||||||
|
|
||||||
// Each journey's last leg has a destination without the ID.
|
tap.test('Luxembourg to Centre Hospitalier du Nord', async (t) => {
|
||||||
tap.skip('Luxembourg to Centre Hospitalier du Nord', async (t) => {
|
const luxembourg = '9217081'
|
||||||
const centreHospitalier = {
|
const centreHospitalier = {
|
||||||
type: 'location',
|
type: 'location',
|
||||||
id: '140701020',
|
id: '990027653',
|
||||||
poi: true,
|
poi: true,
|
||||||
name: 'Ettelbruck, Centre Hospitalier du Nord',
|
name: 'Centre Hospitalier du Nord (CHDN), Ettelbruck',
|
||||||
latitude: 49.853096,
|
latitude: 49.853168,
|
||||||
longitude: 6.094075
|
longitude: 6.096268,
|
||||||
}
|
}
|
||||||
const res = await client.journeys(luxembourgGareCentrale, centreHospitalier, {
|
const res = await client.journeys(luxembourgGareCentrale, centreHospitalier, {
|
||||||
results: 3,
|
results: 3,
|
||||||
|
@ -144,7 +144,7 @@ tap.skip('Luxembourg to Centre Hospitalier du Nord', async (t) => {
|
||||||
test: t,
|
test: t,
|
||||||
res,
|
res,
|
||||||
validate,
|
validate,
|
||||||
fromId: luxembourgGareCentrale,
|
fromId: luxembourg,
|
||||||
to: centreHospitalier
|
to: centreHospitalier
|
||||||
})
|
})
|
||||||
t.end()
|
t.end()
|
||||||
|
|
|
@ -177,20 +177,21 @@ tap.test('journeys: via works – with detour', async (t) => {
|
||||||
// todo: walkingSpeed "Berlin - Charlottenburg, Hallerstraße" -> jungfernheide
|
// todo: walkingSpeed "Berlin - Charlottenburg, Hallerstraße" -> jungfernheide
|
||||||
// todo: without detour
|
// todo: without detour
|
||||||
|
|
||||||
tap.test('earlier/later journeys, Jungfernheide -> München Hbf', async (t) => {
|
// todo: with the DB endpoint, earlierRef/laterRef is missing queries many days in the future
|
||||||
|
tap.skip('earlier/later journeys, Jungfernheide -> München Hbf', async (t) => {
|
||||||
await testEarlierLaterJourneys({
|
await testEarlierLaterJourneys({
|
||||||
test: t,
|
test: t,
|
||||||
fetchJourneys: client.journeys,
|
fetchJourneys: client.journeys,
|
||||||
validate,
|
validate,
|
||||||
fromId: jungfernheide,
|
fromId: jungfernheide,
|
||||||
toId: münchenHbf,
|
toId: münchenHbf,
|
||||||
when
|
when,
|
||||||
})
|
})
|
||||||
|
|
||||||
t.end()
|
t.end()
|
||||||
})
|
})
|
||||||
|
|
||||||
tap.skip('journeys – leg cycle & alternatives', async (t) => {
|
tap.test('journeys – leg cycle & alternatives', async (t) => {
|
||||||
await testLegCycleAlternatives({
|
await testLegCycleAlternatives({
|
||||||
test: t,
|
test: t,
|
||||||
fetchJourneys: client.journeys,
|
fetchJourneys: client.journeys,
|
||||||
|
|
|
@ -111,8 +111,7 @@ tap.test('Magdeburg Hbf to 39104 Magdeburg, Sternstr. 10', async (t) => {
|
||||||
t.end()
|
t.end()
|
||||||
})
|
})
|
||||||
|
|
||||||
// only 1 result instead of >=3
|
tap.test('Magdeburg Hbf to Kloster Unser Lieben Frauen', async (t) => {
|
||||||
tap.skip('Magdeburg Hbf to Kloster Unser Lieben Frauen', async (t) => {
|
|
||||||
const kloster = {
|
const kloster = {
|
||||||
type: 'location',
|
type: 'location',
|
||||||
id: '970012223',
|
id: '970012223',
|
||||||
|
|
|
@ -299,8 +299,7 @@ tap.test('departures at Karlsplatz in direction of Pilgramgasse', async (t) => {
|
||||||
|
|
||||||
// todo: arrivals
|
// todo: arrivals
|
||||||
|
|
||||||
// todo: nearby[0].distance is undefined 🙄
|
tap.test('nearby Salzburg Hbf', async (t) => {
|
||||||
tap.skip('nearby Salzburg Hbf', async (t) => {
|
|
||||||
const nearby = await client.nearby({
|
const nearby = await client.nearby({
|
||||||
type: 'location',
|
type: 'location',
|
||||||
longitude: 13.045605,
|
longitude: 13.045605,
|
||||||
|
|
|
@ -50,8 +50,8 @@ const validate = createValidate(cfg, {
|
||||||
const client = createClient(sMunichProfile, 'public-transport/hafas-client:test')
|
const client = createClient(sMunichProfile, 'public-transport/hafas-client:test')
|
||||||
|
|
||||||
const mittersendling = '8004154'
|
const mittersendling = '8004154'
|
||||||
const karlTheodorStr = '621790' // Karl-Theodor-Straße
|
const karlTheodorStr = '638842' // Karl-Theodor-Straße
|
||||||
const lehel = '000624826'
|
const lehel = '624826'
|
||||||
const poetschnerstr = {
|
const poetschnerstr = {
|
||||||
type: 'location',
|
type: 'location',
|
||||||
address: 'Pötschnerstraße 3, Neuhausen',
|
address: 'Pötschnerstraße 3, Neuhausen',
|
||||||
|
@ -147,7 +147,8 @@ tap.test('earlier/later journeys', async (t) => {
|
||||||
t.end()
|
t.end()
|
||||||
})
|
})
|
||||||
|
|
||||||
tap.test('refreshJourney', async (t) => {
|
// todo: for some reason, a leg is missing in the journey returned by refreshJourney()
|
||||||
|
tap.skip('refreshJourney', async (t) => {
|
||||||
await testRefreshJourney({
|
await testRefreshJourney({
|
||||||
test: t,
|
test: t,
|
||||||
fetchJourneys: client.journeys,
|
fetchJourneys: client.journeys,
|
||||||
|
|
|
@ -204,7 +204,7 @@ tap.test('locations named Ebertpark', async (t) => {
|
||||||
t.end()
|
t.end()
|
||||||
})
|
})
|
||||||
|
|
||||||
tap.test('station Meckesheim', async (t) => {
|
tap.skip('station Meckesheim', async (t) => {
|
||||||
const s = await client.stop(meckesheim)
|
const s = await client.stop(meckesheim)
|
||||||
|
|
||||||
validate(t, s, ['stop', 'station'], 'station')
|
validate(t, s, ['stop', 'station'], 'station')
|
||||||
|
|
Loading…
Add table
Reference in a new issue