disable some more live e2e tests

This commit is contained in:
Traines 2025-03-19 00:38:48 +00:00
parent 6c2081c14e
commit 2ea47f7792
2 changed files with 237 additions and 234 deletions

View file

@ -99,7 +99,8 @@ const potsdamHbf = '8012666';
const berlinSüdkreuz = '8011113'; const berlinSüdkreuz = '8011113';
const kölnHbf = '8000207'; const kölnHbf = '8000207';
tap.test('journeys  Berlin Schwedter Str. to München Hbf', async (t) => { if (!process.env.VCR_OFF) {
tap.test('journeys  Berlin Schwedter Str. to München Hbf', async (t) => {
const res = await client.journeys(blnSchwedterStr, münchenHbf, { const res = await client.journeys(blnSchwedterStr, münchenHbf, {
results: 4, results: 4,
departure: when, departure: when,
@ -123,9 +124,9 @@ tap.test('journeys  Berlin Schwedter Str. to München Hbf', async (t) => {
} }
} }
t.end(); t.end();
}); });
tap.test('refreshJourney valid tickets', async (t) => { tap.test('refreshJourney valid tickets', async (t) => {
const T_MOCK = 1710831600 * 1000; // 2024-03-19T08:00:00+01:00 const T_MOCK = 1710831600 * 1000; // 2024-03-19T08:00:00+01:00
const when = createWhen(dbProfile.timezone, dbProfile.locale, T_MOCK); const when = createWhen(dbProfile.timezone, dbProfile.locale, T_MOCK);
@ -147,11 +148,11 @@ tap.test('refreshJourney valid tickets', async (t) => {
} }
t.end(); t.end();
}); });
// todo: journeys, only one product // todo: journeys, only one product
tap.test('journeys fails with no product', async (t) => { tap.test('journeys fails with no product', async (t) => {
await journeysFailsWithNoProduct({ await journeysFailsWithNoProduct({
test: t, test: t,
fetchJourneys: client.journeys, fetchJourneys: client.journeys,
@ -161,9 +162,9 @@ tap.test('journeys fails with no product', async (t) => {
products: dbProfile.products, products: dbProfile.products,
}); });
t.end(); t.end();
}); });
tap.test('Berlin Schwedter Str. to Torfstraße 17', async (t) => { tap.test('Berlin Schwedter Str. to Torfstraße 17', async (t) => {
const torfstr = { const torfstr = {
type: 'location', type: 'location',
address: 'Torfstraße 17', address: 'Torfstraße 17',
@ -183,9 +184,9 @@ tap.test('Berlin Schwedter Str. to Torfstraße 17', async (t) => {
to: torfstr, to: torfstr,
}); });
t.end(); t.end();
}); });
tap.test('Berlin Schwedter Str. to ATZE Musiktheater', async (t) => { tap.test('Berlin Schwedter Str. to ATZE Musiktheater', async (t) => {
const atze = { const atze = {
type: 'location', type: 'location',
id: '991598902', id: '991598902',
@ -207,9 +208,9 @@ tap.test('Berlin Schwedter Str. to ATZE Musiktheater', async (t) => {
to: atze, to: atze,
}); });
t.end(); t.end();
}); });
tap.test('journeys: via works with detour', async (t) => { tap.test('journeys: via works with detour', async (t) => {
// Going from Westhafen to Wedding via Württembergallee without detour // Going from Westhafen to Wedding via Württembergallee without detour
// is currently impossible. We check if the routing engine computes a detour. // is currently impossible. We check if the routing engine computes a detour.
const res = await client.journeys(westhafen, wedding, { const res = await client.journeys(westhafen, wedding, {
@ -226,11 +227,11 @@ tap.test('journeys: via works with detour', async (t) => {
detourIds: [württembergallee], detourIds: [württembergallee],
}); });
t.end(); t.end();
}); });
// todo: walkingSpeed "Berlin - Charlottenburg, Hallerstraße" -> jungfernheide
// todo: without detour
// todo: walkingSpeed "Berlin - Charlottenburg, Hallerstraße" -> jungfernheide
// todo: without detour
}
// todo: with the DB endpoint, earlierRef/laterRef is missing queries many days in the future // 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) => { tap.skip('earlier/later journeys, Jungfernheide -> München Hbf', async (t) => {

View file

@ -151,7 +151,8 @@ tap.test('refreshJourney valid tickets', async (t) => {
// todo: journeys, only one product // todo: journeys, only one product
tap.test('journeys fails with no product', async (t) => { if (!process.env.VCR_OFF) {
tap.test('journeys fails with no product', async (t) => {
await journeysFailsWithNoProduct({ await journeysFailsWithNoProduct({
test: t, test: t,
fetchJourneys: client.journeys, fetchJourneys: client.journeys,
@ -161,9 +162,9 @@ tap.test('journeys fails with no product', async (t) => {
products: dbProfile.products, products: dbProfile.products,
}); });
t.end(); t.end();
}); });
tap.test('Berlin Schwedter Str. to Torfstraße 17', async (t) => { tap.test('Berlin Schwedter Str. to Torfstraße 17', async (t) => {
const torfstr = { const torfstr = {
type: 'location', type: 'location',
address: 'Torfstraße 17', address: 'Torfstraße 17',
@ -183,9 +184,9 @@ tap.test('Berlin Schwedter Str. to Torfstraße 17', async (t) => {
to: torfstr, to: torfstr,
}); });
t.end(); t.end();
}); });
tap.test('Berlin Schwedter Str. to ATZE Musiktheater', async (t) => { tap.test('Berlin Schwedter Str. to ATZE Musiktheater', async (t) => {
const atze = { const atze = {
type: 'location', type: 'location',
id: '991598902', id: '991598902',
@ -207,9 +208,9 @@ tap.test('Berlin Schwedter Str. to ATZE Musiktheater', async (t) => {
to: atze, to: atze,
}); });
t.end(); t.end();
}); });
tap.test('journeys: via works with detour', async (t) => { tap.test('journeys: via works with detour', async (t) => {
// Going from Westhafen to Wedding via Württembergallee without detour // Going from Westhafen to Wedding via Württembergallee without detour
// is currently impossible. We check if the routing engine computes a detour. // is currently impossible. We check if the routing engine computes a detour.
const res = await client.journeys(westhafen, wedding, { const res = await client.journeys(westhafen, wedding, {
@ -226,14 +227,14 @@ tap.test('journeys: via works with detour', async (t) => {
detourIds: [württembergallee], detourIds: [württembergallee],
}); });
t.end(); t.end();
}); });
// todo: walkingSpeed "Berlin - Charlottenburg, Hallerstraße" -> jungfernheide // todo: walkingSpeed "Berlin - Charlottenburg, Hallerstraße" -> jungfernheide
// todo: without detour // todo: without detour
// todo: with the DB endpoint, earlierRef/laterRef is missing queries many days in the future // 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) => { 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,
@ -244,9 +245,9 @@ tap.skip('earlier/later journeys, Jungfernheide -> München Hbf', async (t) => {
}); });
t.end(); t.end();
}); });
if (!process.env.VCR_MODE) { if (!process.env.VCR_MODE) {
tap.test('journeys leg cycle & alternatives', async (t) => { tap.test('journeys leg cycle & alternatives', async (t) => {
await testLegCycleAlternatives({ await testLegCycleAlternatives({
test: t, test: t,
@ -257,9 +258,9 @@ if (!process.env.VCR_MODE) {
}); });
t.end(); t.end();
}); });
} }
tap.test('refreshJourney', async (t) => { tap.test('refreshJourney', async (t) => {
const T_MOCK = 1710831600 * 1000; // 2024-03-19T08:00:00+01:00 const T_MOCK = 1710831600 * 1000; // 2024-03-19T08:00:00+01:00
const when = createWhen(dbProfile.timezone, dbProfile.locale, T_MOCK); const when = createWhen(dbProfile.timezone, dbProfile.locale, T_MOCK);
const validate = createValidate({...cfg, when}); const validate = createValidate({...cfg, when});
@ -274,7 +275,8 @@ tap.test('refreshJourney', async (t) => {
when, when,
}); });
t.end(); t.end();
}); });
}
/* /*
tap.skip('journeysFromTrip U Mehringdamm to U Naturkundemuseum, reroute to Spittelmarkt.', async (t) => { tap.skip('journeysFromTrip U Mehringdamm to U Naturkundemuseum, reroute to Spittelmarkt.', async (t) => {