Skip to content

Commit 2c4bd8c

Browse files
committed
E2E: Update jore Quay extension seed data
1 parent 58c91c8 commit 2c4bd8c

13 files changed

Lines changed: 116 additions & 37 deletions

File tree

cypress/datasets/stopRegistry.ts

Lines changed: 35 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import {
1313
StopRegistryShelterType,
1414
StopRegistryTransportModeType,
1515
TerminalInput,
16+
minimalQuayKeyValues,
1617
seedOrganisations,
1718
} from '@hsl/jore4-test-db-manager/dist/CypressSpecExports';
1819
import cloneDeep from 'lodash/cloneDeep';
@@ -67,6 +68,7 @@ const stopPlaceData: Array<StopAreaInput> = [
6768
privateCode: { type: 'HSL/TEST', value: 'X0003' },
6869
name: { lang: 'fin', value: 'Annankatu 15' },
6970
alternativeNames: Annankatu15AltNames,
71+
transportMode: StopRegistryTransportModeType.Bus,
7072
keyValues: [
7173
{ key: KnownValueKey.ValidityStart, values: ['2020-01-01'] },
7274
{ key: KnownValueKey.ValidityEnd, values: ['2050-01-01'] },
@@ -80,6 +82,7 @@ const stopPlaceData: Array<StopAreaInput> = [
8082
publicCode: 'E2E001',
8183
description: { lang: 'fin', value: 'Annankatu 15' },
8284
keyValues: [
85+
...minimalQuayKeyValues,
8386
{ key: KnownValueKey.StreetAddress, values: ['Annankatu 15'] },
8487
{ key: KnownValueKey.ElyNumber, values: ['E2E001'] },
8588
],
@@ -91,6 +94,7 @@ const stopPlaceData: Array<StopAreaInput> = [
9194
publicCode: 'E2E009',
9295
description: { lang: 'fin', value: 'Annankatu 15' },
9396
keyValues: [
97+
...minimalQuayKeyValues,
9498
{ key: KnownValueKey.StreetAddress, values: ['Annankatu 15'] },
9599
{ key: KnownValueKey.ElyNumber, values: ['E2E009'] },
96100
],
@@ -106,6 +110,7 @@ const stopPlaceData: Array<StopAreaInput> = [
106110
StopArea: {
107111
privateCode: { type: 'HSL/TEST', value: 'X0004' },
108112
name: { lang: 'fin', value: 'Kalevankatu 32' },
113+
transportMode: StopRegistryTransportModeType.Bus,
109114
keyValues: [
110115
{ key: KnownValueKey.ValidityStart, values: ['2020-01-01'] },
111116
{ key: KnownValueKey.ValidityEnd, values: ['2050-01-01'] },
@@ -118,6 +123,7 @@ const stopPlaceData: Array<StopAreaInput> = [
118123
{
119124
publicCode: 'E2E003',
120125
keyValues: [
126+
...minimalQuayKeyValues,
121127
{ key: KnownValueKey.StreetAddress, values: ['Kalevankatu 32'] },
122128
{ key: KnownValueKey.ElyNumber, values: ['E2E003'] },
123129
],
@@ -128,6 +134,7 @@ const stopPlaceData: Array<StopAreaInput> = [
128134
{
129135
publicCode: 'E2E006',
130136
keyValues: [
137+
...minimalQuayKeyValues,
131138
{ key: KnownValueKey.StreetAddress, values: ['Kalevankatu 32'] },
132139
{ key: KnownValueKey.ElyNumber, values: ['E2E006'] },
133140
],
@@ -144,6 +151,7 @@ const stopPlaceData: Array<StopAreaInput> = [
144151
privateCode: { type: 'HSL/TEST', value: 'E2E002' },
145152
name: Annankatu20Name,
146153
alternativeNames: Annankatu20AltNames,
154+
transportMode: StopRegistryTransportModeType.Bus,
147155
quays: [
148156
{
149157
publicCode: 'E2E002',
@@ -152,6 +160,7 @@ const stopPlaceData: Array<StopAreaInput> = [
152160
stopCoordinatesByLabel.E2E002,
153161
),
154162
keyValues: [
163+
...minimalQuayKeyValues,
155164
{ key: KnownValueKey.StreetAddress, values: ['Annankatu 20'] },
156165
{ key: KnownValueKey.ElyNumber, values: ['E2E002'] },
157166
],
@@ -165,6 +174,7 @@ const stopPlaceData: Array<StopAreaInput> = [
165174
StopArea: {
166175
privateCode: { type: 'HSL/TEST', value: 'E2E004' },
167176
name: { lang: 'fin', value: 'Albertinkatu 38' },
177+
transportMode: StopRegistryTransportModeType.Bus,
168178
alternativeNames: [
169179
{
170180
nameType: StopRegistryNameType.Translation,
@@ -186,6 +196,7 @@ const stopPlaceData: Array<StopAreaInput> = [
186196
stopCoordinatesByLabel.E2E004,
187197
),
188198
keyValues: [
199+
...minimalQuayKeyValues,
189200
{
190201
key: KnownValueKey.StreetAddress,
191202
values: ['Albertinkatu 38'],
@@ -202,13 +213,15 @@ const stopPlaceData: Array<StopAreaInput> = [
202213
StopArea: {
203214
privateCode: { type: 'HSL/TEST', value: 'E2E005' },
204215
name: { lang: 'fin', value: 'Lönnrotinkatu 32' },
216+
transportMode: StopRegistryTransportModeType.Bus,
205217
quays: [
206218
{
207219
publicCode: 'E2E005',
208220
geometry: coordinatesToStopRegistryGeoJSON(
209221
stopCoordinatesByLabel.E2E005,
210222
),
211223
keyValues: [
224+
...minimalQuayKeyValues,
212225
{
213226
key: KnownValueKey.StreetAddress,
214227
values: ['Lönnrotinkatu 32'],
@@ -225,13 +238,16 @@ const stopPlaceData: Array<StopAreaInput> = [
225238
StopArea: {
226239
privateCode: { type: 'HSL/TEST', value: 'E2E007' },
227240
name: { lang: 'fin', value: 'Kalevankatu 18' },
241+
transportMode: StopRegistryTransportModeType.Bus,
228242
quays: [
229243
{
230244
publicCode: 'E2E007',
231245
geometry: coordinatesToStopRegistryGeoJSON(
232246
stopCoordinatesByLabel.E2E005,
233247
),
234248
keyValues: [
249+
{ key: KnownValueKey.Priority, values: ['10'] },
250+
{ key: KnownValueKey.StopState, values: ['InOperation'] },
235251
{ key: KnownValueKey.StreetAddress, values: ['Kalevankatu 18'] },
236252
{ key: KnownValueKey.ElyNumber, values: ['E2E007'] },
237253
{ key: KnownValueKey.ValidityStart, values: ['2020-03-20'] },
@@ -246,13 +262,16 @@ const stopPlaceData: Array<StopAreaInput> = [
246262
StopArea: {
247263
privateCode: { type: 'HSL/TEST', value: 'E2E008' },
248264
name: { lang: 'fin', value: 'Kuttulammentie' },
265+
transportMode: StopRegistryTransportModeType.Bus,
249266
quays: [
250267
{
251268
publicCode: 'E2E008',
252269
geometry: coordinatesToStopRegistryGeoJSON(
253270
stopCoordinatesByLabel.E2E005,
254271
),
255272
keyValues: [
273+
{ key: KnownValueKey.Priority, values: ['10'] },
274+
{ key: KnownValueKey.StopState, values: ['InOperation'] },
256275
{
257276
key: KnownValueKey.StreetAddress,
258277
values: ['Kuttulammentie 15'],
@@ -299,13 +318,16 @@ const stopPlaceData: Array<StopAreaInput> = [
299318
StopArea: {
300319
privateCode: { type: 'HSL/TEST', value: 'E2E010' },
301320
name: { lang: 'fin', value: 'Finnoonkartano' },
321+
transportMode: StopRegistryTransportModeType.Bus,
302322
quays: [
303323
{
304324
publicCode: 'E2E010',
305325
geometry: coordinatesToStopRegistryGeoJSON(
306326
stopCoordinatesByLabel.E2E005,
307327
),
308328
keyValues: [
329+
{ key: KnownValueKey.Priority, values: ['10'] },
330+
{ key: KnownValueKey.StopState, values: ['InOperation'] },
309331
{ key: KnownValueKey.StreetAddress, values: ['Finnoonkartano'] },
310332
{ key: KnownValueKey.ElyNumber, values: ['E2E010'] },
311333
{ key: KnownValueKey.ValidityStart, values: ['2020-03-20'] },
@@ -320,6 +342,7 @@ const stopPlaceData: Array<StopAreaInput> = [
320342
StopArea: {
321343
privateCode: { type: 'HSL/TEST', value: 'E2E011' },
322344
name: { lang: 'fin', value: 'Eteläinen Hesperiankatu' },
345+
transportMode: StopRegistryTransportModeType.Bus,
323346
keyValues: [
324347
{ key: KnownValueKey.ValidityStart, values: ['2020-01-01'] },
325348
{ key: KnownValueKey.ValidityEnd, values: ['2052-01-01'] },
@@ -339,6 +362,8 @@ const stopPlaceData: Array<StopAreaInput> = [
339362
{ key: KnownValueKey.ElyNumber, values: ['E2E011'] },
340363
{ key: KnownValueKey.ValidityStart, values: ['2020-01-01'] },
341364
{ key: KnownValueKey.ValidityEnd, values: ['2052-01-01'] },
365+
{ key: KnownValueKey.Priority, values: ['10'] },
366+
{ key: KnownValueKey.StopState, values: ['InOperation'] },
342367
],
343368
geometry: coordinatesToStopRegistryGeoJSON(
344369
stopCoordinatesByLabel.E2E011,
@@ -352,6 +377,7 @@ const stopPlaceData: Array<StopAreaInput> = [
352377
StopArea: {
353378
privateCode: { type: 'HSL/TEST', value: 'E2ENQ' },
354379
name: { lang: 'fin', value: 'No quays' },
380+
transportMode: StopRegistryTransportModeType.Bus,
355381
quays: [],
356382
geometry: {
357383
coordinates: [60.16993495, 24.92596546],
@@ -362,9 +388,9 @@ const stopPlaceData: Array<StopAreaInput> = [
362388
},
363389
{
364390
StopArea: {
365-
transportMode: StopRegistryTransportModeType.Tram,
366391
privateCode: { type: 'HSL/TEST', value: 'E2ER001' },
367392
name: { lang: 'fin', value: 'Tram stop area' },
393+
transportMode: StopRegistryTransportModeType.Tram,
368394
quays: [
369395
{
370396
publicCode: 'E2ER001',
@@ -375,6 +401,8 @@ const stopPlaceData: Array<StopAreaInput> = [
375401
{ key: KnownValueKey.StreetAddress, values: ['Tram stop area'] },
376402
{ key: KnownValueKey.ElyNumber, values: ['E2ER001'] },
377403
{ key: KnownValueKey.ValidityStart, values: ['2020-03-20'] },
404+
{ key: KnownValueKey.Priority, values: ['10'] },
405+
{ key: KnownValueKey.StopState, values: ['InOperation'] },
378406
],
379407
},
380408
],
@@ -386,9 +414,9 @@ const stopPlaceData: Array<StopAreaInput> = [
386414
},
387415
{
388416
StopArea: {
389-
transportMode: StopRegistryTransportModeType.Tram,
390417
privateCode: { type: 'HSL/TEST', value: 'E2ER002' },
391418
name: { lang: 'fin', value: 'Tram stop area 2' },
419+
transportMode: StopRegistryTransportModeType.Tram,
392420
quays: [
393421
{
394422
publicCode: 'E2ER002',
@@ -399,6 +427,8 @@ const stopPlaceData: Array<StopAreaInput> = [
399427
{ key: KnownValueKey.StreetAddress, values: ['Tram stop area 2'] },
400428
{ key: KnownValueKey.ElyNumber, values: ['E2ER002'] },
401429
{ key: KnownValueKey.ValidityStart, values: ['2020-03-20'] },
430+
{ key: KnownValueKey.Priority, values: ['10'] },
431+
{ key: KnownValueKey.StopState, values: ['InOperation'] },
402432
],
403433
},
404434
],
@@ -410,9 +440,9 @@ const stopPlaceData: Array<StopAreaInput> = [
410440
},
411441
{
412442
StopArea: {
413-
transportMode: StopRegistryTransportModeType.Tram,
414443
privateCode: { type: 'HSL/TEST', value: 'E2ER003' },
415444
name: { lang: 'fin', value: 'Tram stop area 3' },
445+
transportMode: StopRegistryTransportModeType.Tram,
416446
quays: [
417447
{
418448
publicCode: 'E2ER003',
@@ -423,6 +453,8 @@ const stopPlaceData: Array<StopAreaInput> = [
423453
{ key: KnownValueKey.StreetAddress, values: ['Tram stop area 3'] },
424454
{ key: KnownValueKey.ElyNumber, values: ['E2ER003'] },
425455
{ key: KnownValueKey.ValidityStart, values: ['2020-03-20'] },
456+
{ key: KnownValueKey.Priority, values: ['10'] },
457+
{ key: KnownValueKey.StopState, values: ['InOperation'] },
426458
],
427459
},
428460
],

cypress/e2e/map/createRoute.cy.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import {
77
StopRegistryGeoJsonInput,
88
StopRegistryGeoJsonType,
99
StopRegistryTransportModeType,
10+
minimalQuayKeyValues,
1011
} from '@hsl/jore4-test-db-manager/dist/CypressSpecExports';
1112
import {
1213
buildInfraLinksAlongRoute,
@@ -54,6 +55,7 @@ function constructStopRegistryEntriesForBaseDbResourceStopPoints(
5455
privateCode: { value: label, type: 'HSL/TEST' },
5556
publicCode: label,
5657
geometry,
58+
keyValues: minimalQuayKeyValues.slice(),
5759
},
5860
],
5961
},

cypress/e2e/map/createTerminal.cy.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -279,6 +279,8 @@ describe('Terminal creation tests', rootOpts, () => {
279279
key: KnownValueKey.ValidityStart,
280280
values: ['2020-03-20'],
281281
},
282+
{ key: KnownValueKey.Priority, values: ['10'] },
283+
{ key: KnownValueKey.StopState, values: ['InOperation'] },
282284
],
283285
},
284286
],

cypress/e2e/map/mapFiltering.cy.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,9 @@ describe('Filter map entities', { tags: [Tag.Map] }, () => {
168168
// Wait for map to load
169169
Map.waitForLoadToComplete();
170170

171+
// Make sure bus things are visible
172+
FilterPanel.toggleShowStops(ReusableComponentsVehicleModeEnum.Bus);
173+
171174
// Make sure stop area is visible
172175
Map.getStopAreaById('X0003').shouldBeVisible();
173176

cypress/e2e/stop-registry/stopAreaDetails.cy.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import {
22
KnownValueKey,
33
StopAreaInput,
44
StopRegistryGeoJsonType,
5+
minimalQuayKeyValues,
56
} from '@hsl/jore4-test-db-manager/dist/CypressSpecExports';
67
import { DateTime } from 'luxon';
78
import {
@@ -76,9 +77,11 @@ describe('Stop area details', { tags: Tag.StopRegistry }, () => {
7677
quays: [
7778
{
7879
publicCode: 'E2E001',
80+
keyValues: minimalQuayKeyValues.slice(),
7981
},
8082
{
8183
publicCode: 'E2E009',
84+
keyValues: minimalQuayKeyValues.slice(),
8285
},
8386
],
8487
},
@@ -100,6 +103,7 @@ describe('Stop area details', { tags: Tag.StopRegistry }, () => {
100103
{
101104
publicCode: 'E2E003',
102105
keyValues: [
106+
...minimalQuayKeyValues,
103107
{
104108
key: KnownValueKey.StreetAddress,
105109
values: ['Kalevankatu 32'],
@@ -110,6 +114,7 @@ describe('Stop area details', { tags: Tag.StopRegistry }, () => {
110114
{
111115
publicCode: 'E2E006',
112116
keyValues: [
117+
...minimalQuayKeyValues,
113118
{
114119
key: KnownValueKey.StreetAddress,
115120
values: ['Kalevankatu 32'],

cypress/e2e/stop-registry/stopDetails.cy.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import {
1313
buildTimingPlace,
1414
extractInfrastructureLinkIdsFromResponse,
1515
mapToGetInfrastructureLinksByExternalIdsQuery,
16+
minimalQuayKeyValues,
1617
quayH2003,
1718
quayV1562,
1819
seedInfoSpots,
@@ -83,6 +84,7 @@ const stopAreaInput: Array<StopAreaInput> = [
8384
quays: [
8485
{
8586
publicCode: 'H1122',
87+
keyValues: minimalQuayKeyValues.slice(),
8688
},
8789
],
8890
},

cypress/e2e/stop-registry/stopSearch.cy.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1251,6 +1251,7 @@ describe('Stop search', { tags: [Tag.StopRegistry, Tag.Search] }, () => {
12511251
key: KnownValueKey.ValidityEnd,
12521252
values: [stopPoint.validity_end?.toISODate() ?? null],
12531253
},
1254+
{ key: KnownValueKey.StopState, values: ['InOperation'] },
12541255
{
12551256
key: KnownValueKey.ImportedId,
12561257
values: [

cypress/e2e/stop-registry/stopVersions.cy.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ function makeStopVersion(info: StopVersionInfo): StopVersionOutput {
7272
key: KnownValueKey.ImportedId,
7373
values: [(importedId++).toString(10)],
7474
},
75+
{ key: KnownValueKey.StopState, values: ['InOperation'] },
7576
]),
7677
versionComment: comment,
7778
geometry: {

0 commit comments

Comments
 (0)