graphdb-workbench-tests 3.0.0-TR5 → 3.0.0-TR6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,562 @@
1
+ @prefix : <https://swapi.co/resource/> .
2
+ @prefix affected: <http://www.ontotext.com/semantic-object/affected> .
3
+ @prefix dash: <http://datashapes.org/dash#> .
4
+ @prefix dct: <http://purl.org/dc/terms/> .
5
+ @prefix droid: <https://swapi.co/resource/droid/> .
6
+ @prefix gn: <http://www.geonames.org/ontology#> .
7
+ @prefix graphql: <http://datashapes.org/graphql#> .
8
+ @prefix onto: <http://www.ontotext.com/> .
9
+ @prefix owl: <http://www.w3.org/2002/07/owl#> .
10
+ @prefix puml: <http://plantuml.com/ontology#> .
11
+ @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
12
+ @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
13
+ @prefix res: <http://www.ontotext.com/semantic-object/result/> .
14
+ @prefix rsx: <http://rdf4j.org/shacl-extensions#> .
15
+ @prefix sh: <http://www.w3.org/ns/shacl#> .
16
+ @prefix skos: <http://www.w3.org/2004/02/skos/core#> .
17
+ @prefix so: <http://www.ontotext.com/semantic-object/> .
18
+ @prefix voc: <https://swapi.co/vocabulary/> .
19
+ @prefix vocsh: <https://swapi.co/vocabulary/shacl> .
20
+ @prefix void: <http://rdfs.org/ns/void#> .
21
+ @prefix wgs84: <http://www.w3.org/2003/01/geo/wgs84_pos#> .
22
+ @prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
23
+
24
+ voc:CharacterSchema a graphql:Schema;
25
+ rdfs:label "Character GraphQL Schema";
26
+ graphql:privateShape vocsh:Starship;
27
+ graphql:protectedClass voc:Film;
28
+ graphql:publicClass voc:Character .
29
+
30
+ vocsh:CharacterShape
31
+ a sh:NodeShape ;
32
+ sh:targetClass voc:Character ;
33
+ sh:property [ sh:path rdfs:label ;
34
+ graphql:name "label" ;
35
+ sh:minCount 1 ;
36
+ so:lang "en,ANY";
37
+ sh:or ( [ sh:datatype xsd:string ; ]
38
+ [ sh:datatype rdf:langString ; ] ) ; ] ;
39
+ sh:property [ sh:path voc:gender ;
40
+ sh:datatype xsd:string ;
41
+ sh:maxCount 1 ; ] ;
42
+ sh:property [ sh:path voc:birthYear ;
43
+ sh:maxCount 1 ;
44
+ sh:datatype xsd:string ; ] ;
45
+ sh:property [ sh:path voc:height ;
46
+ sh:maxCount 1 ;
47
+ sh:datatype xsd:decimal ; ] ;
48
+ sh:property [ sh:path voc:film ;
49
+ sh:class voc:Film ] .
50
+
51
+
52
+ vocsh:Starship
53
+ a sh:NodeShape ;
54
+ sh:targetClass voc:Starship ;
55
+ sh:property [ sh:path rdfs:label ;
56
+ graphql:name "name" ;
57
+ sh:minCount 1 ;
58
+ so:lang "en,ANY";
59
+ sh:or ( [ sh:datatype xsd:string ; ]
60
+ [ sh:datatype rdf:langString ; ] ) ; ] .
61
+
62
+ vocsh:Film
63
+ a sh:NodeShape ;
64
+ sh:targetClass voc:Film ;
65
+ sh:property [ sh:path rdfs:label ;
66
+ graphql:name "name" ;
67
+ sh:minCount 1 ;
68
+ so:lang "en,ANY";
69
+ sh:or ( [ sh:datatype xsd:string ; ]
70
+ [ sh:datatype rdf:langString ; ] ) ; ] ;
71
+ sh:property [ sh:path voc:starship ;
72
+ sh:class voc:Starship ] .
73
+
74
+
75
+ # ===================================================
76
+
77
+ voc:SwapiSchema a graphql:Schema;
78
+ rdfs:label "Swapi GraphQL Schema";
79
+ graphql:publicShape vocsh:LocationShape ;
80
+ graphql:publicShape vocsh:CountryShape ;
81
+ graphql:publicShape vocsh:StarshipShape ;
82
+ graphql:publicShape vocsh:VehicleShape ;
83
+ graphql:publicShape vocsh:DroitShape;
84
+ graphql:publicShape vocsh:WookieeShape ;
85
+ graphql:publicShape vocsh:HumanShape ;
86
+ graphql:publicShape vocsh:PersonShape ;
87
+ graphql:publicShape voc:Character ;
88
+ graphql:publicShape vocsh:Species ;
89
+ graphql:publicShape vocsh:ResidentShape ;
90
+ graphql:publicShape vocsh:PlanetShape ;
91
+ graphql:publicShape vocsh:FilmShape ;
92
+ graphql:publicShape vocsh:FilmRoleShape .
93
+
94
+ voc:Character a owl:Class .
95
+
96
+ voc:Human a owl:Class ;
97
+ rdfs:subClassOf voc:Character .
98
+
99
+ voc:Droid a owl:Class ;
100
+ rdfs:subClassOf voc:Character .
101
+
102
+ voc:Wookiee a owl:Class ;
103
+ rdfs:subClassOf voc:Character .
104
+
105
+ vocsh:LocationShape
106
+ a sh:NodeShape ;
107
+ sh:targetClass voc:Location ;
108
+ sh:property [ sh:path rdfs:label ;
109
+ graphql:name "name" ;
110
+ sh:minCount 1 ;
111
+ sh:or ( [ sh:datatype xsd:string ; ]
112
+ [ sh:datatype rdf:langString ; ] ) ; ] ;
113
+ sh:property [ sh:path voc:country ;
114
+ sh:class voc:Country
115
+ ] .
116
+
117
+ vocsh:CountryShape
118
+ a sh:NodeShape ;
119
+ sh:targetClass voc:Country ;
120
+ sh:property [ sh:path rdfs:label ;
121
+ graphql:name "name" ;
122
+ sh:minCount 1 ;
123
+ sh:or ( [ sh:datatype xsd:string ; ]
124
+ [ sh:datatype rdf:langString ; ] ) ; ] ;
125
+ sh:property [ sh:path voc:country ;
126
+ sh:class voc:Country
127
+ ] .
128
+ # why is necessary to have property of type Country of object Country?
129
+
130
+ vocsh:StarshipShape
131
+ a sh:NodeShape ;
132
+ sh:targetClass voc:Starship ;
133
+ sh:property [ sh:path rdfs:label ;
134
+ graphql:name "name" ;
135
+ sh:minCount 1 ;
136
+ sh:or ( [ sh:datatype xsd:string ; ]
137
+ [ sh:datatype rdf:langString ; ] ) ; ] ;
138
+ sh:property [ sh:path voc:model ;
139
+ sh:datatype xsd:string ;
140
+ sh:maxCount 1
141
+ ];
142
+ sh:property [ sh:path voc:mglt ;
143
+ sh:datatype xsd:integer ;
144
+ sh:maxCount 1
145
+ ];
146
+ sh:property [ sh:path voc:crew ;
147
+ sh:datatype xsd:integer ;
148
+ sh:maxCount 1
149
+ ] ;
150
+ sh:property [ sh:path voc:cargoCapacity ;
151
+ sh:datatype xsd:integer ;
152
+ sh:maxCount 1
153
+ ];
154
+ sh:property [ sh:path voc:hyperdriveRating ;
155
+ sh:datatype xsd:decimal ;
156
+ sh:maxCount 1
157
+ ];
158
+ sh:property [ sh:path voc:starshipClass ;
159
+ sh:datatype xsd:string ;
160
+ sh:maxCount 1
161
+ ];
162
+ sh:property [ sh:path voc:consumables ;
163
+ sh:datatype xsd:string ;
164
+ sh:maxCount 1
165
+ ] ;
166
+ sh:property [ sh:path voc:costInCredits ;
167
+ sh:datatype xsd:integer ;
168
+ sh:maxCount 1
169
+ ] ;
170
+ sh:property [ sh:path voc:length ;
171
+ sh:datatype xsd:decimal ;
172
+ sh:maxCount 1
173
+ ] ;
174
+ sh:property [ sh:path voc:manufacturer ;
175
+ sh:datatype xsd:string ;
176
+ sh:maxCount 1
177
+ ] ;
178
+ sh:property [ sh:path voc:maxAtmospheringSpeed ;
179
+ sh:datatype xsd:integer ;
180
+ sh:maxCount 1
181
+ ] ;
182
+ sh:property [ sh:path voc:passengers ;
183
+ sh:datatype xsd:integer ;
184
+ sh:maxCount 1
185
+ ] ;
186
+ sh:property [ sh:path voc:film ;
187
+ sh:class voc:Film
188
+ ] ;
189
+ sh:property [ sh:path voc:pilot ;
190
+ sh:class voc:Character
191
+ ] .
192
+
193
+ vocsh:VehicleShape
194
+ a sh:NodeShape ;
195
+ sh:targetClass voc:Vehicle ;
196
+ sh:property [ sh:path rdfs:label ;
197
+ graphql:name "name" ;
198
+ sh:minCount 1 ;
199
+ sh:or ( [ sh:datatype xsd:string ; ]
200
+ [ sh:datatype rdf:langString ; ] ) ; ] ;
201
+ sh:property [ sh:path voc:desc ;
202
+ sh:or ( [ sh:datatype xsd:string ; ]
203
+ [ sh:datatype rdf:langString ; ] ) ;
204
+ ] ;
205
+ sh:property [ sh:path voc:cargoCapacity ;
206
+ sh:datatype xsd:integer ;
207
+ sh:maxCount 1
208
+ ] ;
209
+ sh:property [ sh:path voc:crew ;
210
+ sh:datatype xsd:integer ;
211
+ sh:maxCount 1
212
+ ] ;
213
+ sh:property [ sh:path voc:model ;
214
+ sh:datatype xsd:string ;
215
+ sh:maxCount 1
216
+ ] ;
217
+ sh:property [ sh:path voc:consumables ;
218
+ sh:datatype xsd:string ;
219
+ sh:maxCount 1
220
+ ] ;
221
+ sh:property [ sh:path voc:costInCredits ;
222
+ sh:datatype xsd:integer ;
223
+ sh:maxCount 1
224
+ ] ;
225
+ sh:property [ sh:path voc:length ;
226
+ sh:datatype xsd:decimal ;
227
+ sh:maxCount 1
228
+ ] ;
229
+ sh:property [ sh:path voc:manufacturer ;
230
+ sh:datatype xsd:string ;
231
+ sh:maxCount 1
232
+ ] ;
233
+ sh:property [ sh:path voc:maxAtmospheringSpeed ;
234
+ sh:datatype xsd:integer ;
235
+ sh:maxCount 1
236
+ ] ;
237
+ sh:property [ sh:path voc:passengers ;
238
+ sh:datatype xsd:integer ;
239
+ sh:maxCount 1
240
+ ] ;
241
+ sh:property [ sh:path voc:vehicleClass ;
242
+ sh:datatype xsd:string ;
243
+ sh:maxCount 1
244
+ ] ;
245
+ sh:property [ sh:path voc:film ;
246
+ sh:class voc:Film
247
+ ] ;
248
+ sh:property [ sh:path voc:pilot ;
249
+ sh:class voc:Character
250
+ ] .
251
+
252
+ vocsh:Species
253
+ a sh:NodeShape ;
254
+ sh:targetClass voc:Species ;
255
+ sh:property [ sh:path rdfs:label ;
256
+ graphql:name "name" ;
257
+ sh:minCount 1 ;
258
+ sh:or ( [ sh:datatype xsd:string ; ]
259
+ [ sh:datatype rdf:langString ; ] ) ] ;
260
+ sh:property [ sh:path voc:averageHeight ;
261
+ sh:datatype xsd:decimal ;
262
+ sh:maxCount 1
263
+ ];
264
+ sh:property [ sh:path voc:averageLifespan ;
265
+ sh:datatype xsd:string ;
266
+ sh:maxCount 1
267
+ ];
268
+ sh:property [ sh:path voc:eyeColor ;
269
+ sh:datatype xsd:string ;
270
+ sh:maxCount 1
271
+ ];
272
+ sh:property [ sh:path voc:hairColor ;
273
+ sh:datatype xsd:string ;
274
+ sh:maxCount 1
275
+ ];
276
+ sh:property [ sh:path voc:language ;
277
+ sh:datatype xsd:string ;
278
+ sh:maxCount 1
279
+ ];
280
+ sh:property [ sh:path voc:skinColor ;
281
+ sh:datatype xsd:string ;
282
+ sh:maxCount 1
283
+ ];
284
+ sh:property [ sh:path voc:character ;
285
+ sh:class voc:Character
286
+ ];
287
+ sh:property [ sh:path voc:homeworld ;
288
+ sh:class voc:Planet
289
+ ];
290
+ sh:property [ sh:path voc:film ;
291
+ sh:class voc:Film
292
+ ] .
293
+
294
+ vocsh:PersonShape
295
+ a sh:NodeShape ;
296
+ sh:targetClass voc:Person ;
297
+ sh:property [ sh:path rdfs:label ;
298
+ graphql:name "name" ;
299
+ sh:minCount 1 ;
300
+ sh:or ( [ sh:datatype xsd:string ; ]
301
+ [ sh:datatype rdf:langString ; ] ) ] ;
302
+ sh:property [ sh:path voc:birthDate ;
303
+ sh:datatype xsd:date ;
304
+ sh:maxCount 1
305
+ ] ;
306
+ sh:property [ sh:path voc:desc ;
307
+ sh:or ( [ sh:datatype xsd:string ; ]
308
+ [ sh:datatype rdf:langString ; ] ) ;
309
+ sh:maxCount 1
310
+ ] ;
311
+ sh:property [ sh:path voc:gender ;
312
+ sh:datatype xsd:string ;
313
+ sh:maxCount 1
314
+ ] ;
315
+ sh:property [ sh:path voc:birthPlace ;
316
+ sh:datatype voc:Location ;
317
+ sh:maxCount 1
318
+ ] ;
319
+ sh:property [ sh:path voc:citizenOf ;
320
+ sh:datatype voc:Location ;
321
+ sh:maxCount 1
322
+ ] ;
323
+ sh:property [ sh:path voc:residentOf ;
324
+ sh:datatype voc:Location ;
325
+ sh:maxCount 1
326
+ ] .
327
+
328
+ voc:Character
329
+ a sh:NodeShape, owl:Class ;
330
+ graphql:isInterface true ;
331
+ sh:property [ sh:path rdfs:label ;
332
+ graphql:name "name" ;
333
+ sh:minCount 1 ;
334
+ sh:or ( [ sh:datatype xsd:string ; ]
335
+ [ sh:datatype rdf:langString ; ] ) ] ;
336
+ sh:property [ sh:path voc:desc ;
337
+ sh:or ( [ sh:datatype xsd:string ; ]
338
+ [ sh:datatype rdf:langString ; ] ) ;
339
+ sh:maxCount 1
340
+ ] ;
341
+ sh:property [ sh:path voc:gender ;
342
+ sh:datatype xsd:string ;
343
+ sh:maxCount 1
344
+ ] ;
345
+ sh:property [ sh:path voc:eyeColor ;
346
+ sh:datatype xsd:string ;
347
+ sh:maxCount 1
348
+ ] ;
349
+ sh:property [ sh:path voc:skinColor ;
350
+ sh:datatype xsd:string ;
351
+ sh:maxCount 1
352
+ ] ;
353
+ sh:property [ sh:path voc:hairColor ;
354
+ sh:datatype xsd:string ;
355
+ sh:maxCount 1
356
+ ] ;
357
+ sh:property [ sh:path voc:birthYear ;
358
+ sh:maxCount 1 ;
359
+ sh:datatype xsd:string
360
+ ] ;
361
+ sh:property [ sh:path voc:mass ;
362
+ sh:maxCount 1 ;
363
+ sh:datatype xsd:decimal ] ;
364
+ sh:property [ sh:path voc:height ;
365
+ sh:maxCount 1 ;
366
+ sh:datatype xsd:decimal ] ;
367
+ sh:property [ sh:path voc:vehicle ;
368
+ sh:class voc:Vehicle
369
+ ] ;
370
+ sh:property [ sh:path voc:starship ;
371
+ sh:class voc:Starship
372
+ ] ;
373
+ sh:property [ sh:path voc:homeworld ;
374
+ sh:class voc:Planet
375
+ ] ;
376
+ sh:property [ sh:path voc:film ;
377
+ sh:class voc:Film
378
+ ] ;
379
+ sh:property [ sh:path [ sh:inversePath voc:character ] ;
380
+ sh:name "species" ;
381
+ sh:class voc:Species ;
382
+ sh:minCount 1
383
+ ] .
384
+
385
+ vocsh:HumanShape
386
+ a sh:NodeShape ;
387
+ sh:targetClass voc:Human ;
388
+ sh:property [ sh:path rdfs:label ;
389
+ graphql:name "name" ;
390
+ sh:minCount 1 ;
391
+ sh:or ( [ sh:datatype xsd:string ; ]
392
+ [ sh:datatype rdf:langString ; ] ) ] ;
393
+ sh:property [ sh:path voc:averageLifespan ;
394
+ sh:datatype xsd:string ;
395
+ sh:maxCount 1
396
+ ] .
397
+
398
+ vocsh:DroitShape
399
+ a sh:NodeShape ;
400
+ sh:targetClass voc:Droid ;
401
+ sh:property [ sh:path rdfs:label ;
402
+ graphql:name "name" ;
403
+ sh:minCount 1 ;
404
+ sh:or ( [ sh:datatype xsd:string ; ]
405
+ [ sh:datatype rdf:langString ; ] ) ] ;
406
+ sh:property [ sh:path voc:averageLifespan ;
407
+ sh:datatype xsd:string ;
408
+ sh:maxCount 1
409
+ ] .
410
+
411
+
412
+ vocsh:WookieeShape
413
+ a sh:NodeShape ;
414
+ sh:targetClass voc:Wookiee ;
415
+ sh:property [ sh:path rdfs:label ;
416
+ graphql:name "name" ;
417
+ sh:minCount 1 ;
418
+ sh:or ( [ sh:datatype xsd:string ; ]
419
+ [ sh:datatype rdf:langString ; ] ) ] ;
420
+ sh:property [ sh:path voc:averageLifespan ;
421
+ sh:datatype xsd:string ;
422
+ sh:maxCount 1
423
+ ] ;
424
+ sh:property [ sh:path voc:language ;
425
+ sh:datatype xsd:string ;
426
+ sh:maxCount 1
427
+ ] .
428
+
429
+ vocsh:PlanetShape
430
+ a sh:NodeShape ;
431
+ sh:targetClass voc:Planet ;
432
+ sh:property [ sh:path rdfs:label ;
433
+ graphql:name "name" ;
434
+ sh:minCount 1 ;
435
+ sh:or ( [ sh:datatype xsd:string ; ]
436
+ [ sh:datatype rdf:langString ; ] ) ; ] ;
437
+ sh:property [ sh:path voc:desc ;
438
+ sh:or ( [ sh:datatype xsd:string ; ]
439
+ [ sh:datatype rdf:langString ; ] ) ;
440
+ sh:maxCount 1 ;
441
+ ] ;
442
+ sh:property [
443
+ sh:path voc:climate ;
444
+ sh:datatype xsd:string ;
445
+ sh:maxCount 1 ] ;
446
+ sh:property [
447
+ sh:path voc:diameter ;
448
+ sh:datatype xsd:integer ;
449
+ sh:maxCount 1 ;
450
+ ] ;
451
+ sh:property [
452
+ sh:path voc:gravity ;
453
+ sh:datatype xsd:string ;
454
+ sh:maxCount 1 ;
455
+ ];
456
+ sh:property [
457
+ sh:path voc:orbitalPeriod ;
458
+ sh:datatype xsd:integer ;
459
+ sh:maxCount 1 ;
460
+ ];
461
+ sh:property [
462
+ sh:path voc:population ;
463
+ sh:datatype xsd:integer ;
464
+ sh:maxCount 1 ;
465
+ ];
466
+ sh:property [
467
+ sh:path voc:rotationPeriod ;
468
+ sh:datatype xsd:integer ;
469
+ sh:maxCount 1 ;
470
+ ];
471
+ sh:property [
472
+ sh:path voc:surfaceWater ;
473
+ sh:datatype xsd:integer ;
474
+ sh:maxCount 1 ;
475
+ ];
476
+ sh:property [
477
+ sh:path voc:terrain ;
478
+ sh:datatype xsd:string ;
479
+ sh:maxCount 1 ;
480
+ ] ;
481
+ sh:property [
482
+ sh:path voc:resident ;
483
+ sh:class voc:Character ] ;
484
+ sh:property [
485
+ sh:path voc:film ;
486
+ sh:class voc:Film ] .
487
+
488
+ vocsh:FilmShape
489
+ a sh:NodeShape ;
490
+ sh:targetClass voc:Film ;
491
+ sh:property [ sh:path rdfs:label ;
492
+ graphql:name "name" ;
493
+ sh:minCount 1 ;
494
+ sh:or ( [ sh:datatype xsd:string ; ]
495
+ [ sh:datatype rdf:langString ; ] ) ; ] ;
496
+ sh:property [ sh:path voc:boxOffice ;
497
+ sh:datatype xsd:integer ;
498
+ sh:maxCount 1 ;
499
+ ] ;
500
+ sh:property [ sh:path voc:desc ;
501
+ sh:or ( [ sh:datatype xsd:string ; ]
502
+ [ sh:datatype rdf:langString ; ] ) ;
503
+ sh:maxCount 1 ;
504
+ ] ;
505
+ sh:property [ sh:path voc:episodeId ;
506
+ sh:datatype xsd:integer ;
507
+ sh:maxCount 1 ;
508
+ ] ;
509
+ sh:property [ sh:path voc:openingCrawl ;
510
+ sh:datatype xsd:string ;
511
+ sh:maxCount 1 ;
512
+ ] ;
513
+ sh:property [ sh:path voc:releaseDate ;
514
+ sh:datatype xsd:date ;
515
+ sh:maxCount 1 ;
516
+ ] ;
517
+ sh:property [ sh:path voc:planet ;
518
+ sh:class voc:Planet ;
519
+ sh:maxCount 1 ;
520
+ ] ;
521
+ sh:property [ sh:path voc:character ;
522
+ sh:class voc:Character
523
+ ] ;
524
+ sh:property [ sh:path voc:vehicle ;
525
+ sh:class voc:Vehicle
526
+ ] ;
527
+ sh:property [ sh:path voc:starship ;
528
+ sh:class voc:Starship
529
+ ] ;
530
+ sh:property [ sh:path [ sh:inversePath voc:film ] ;
531
+ sh:name "role" ;
532
+ sh:class voc:FilmRole ;
533
+ sh:minCount 1
534
+ ] .
535
+
536
+ vocsh:FilmRoleShape
537
+ a sh:NodeShape ;
538
+ sh:targetClass voc:FilmRole ;
539
+ sh:property [ sh:path rdfs:label ;
540
+ graphql:name "name" ;
541
+ sh:minCount 1 ;
542
+ sh:or ( [ sh:datatype xsd:string ; ]
543
+ [ sh:datatype rdf:langString ; ] ) ; ] ;
544
+ sh:property [ sh:path voc:role ;
545
+ sh:datatype xsd:string ;
546
+ sh:maxCount 1 ;
547
+ ] ;
548
+ sh:property [ sh:path voc:person ;
549
+ sh:class voc:Person
550
+ ] ;
551
+ sh:property [ sh:path voc:character ;
552
+ sh:class voc:Character
553
+ ] ;
554
+ sh:property [ sh:path voc:film ;
555
+ sh:class voc:Film
556
+ ] .
557
+
558
+ vocsh:ResidentShape
559
+ a sh:NodeShape ;
560
+ sh:targetClass voc:Character .
561
+
562
+ # ======================================================
@@ -2,14 +2,14 @@
2
2
  "repository": "test",
3
3
  "endpoints": [
4
4
  {
5
- "id": "countries",
6
- "graphQL": "/rest/repositories/test/graphql/countries",
5
+ "endpointId": "countries",
6
+ "endpointURI": "/rest/repositories/test/graphql/countries",
7
7
  "active": true,
8
8
  "default": false
9
9
  },
10
10
  {
11
- "id": "rickmorty",
12
- "graphQL": "/rest/repositories/test/graphql/rickmorty",
11
+ "endpointId": "rickmorty",
12
+ "endpointURI": "/rest/repositories/test/graphql/rickmorty",
13
13
  "active": true,
14
14
  "default": false
15
15
  }
@@ -2,20 +2,20 @@
2
2
  "repository": "test",
3
3
  "endpoints": [
4
4
  {
5
- "id": "swapi",
6
- "graphQL": "/rest/repositories/swapi/graphql/swapi",
5
+ "endpointId": "swapi",
6
+ "endpointURI": "/rest/repositories/swapi/graphql/swapi",
7
7
  "active": true,
8
8
  "default": false
9
9
  },
10
10
  {
11
- "id": "film-restricted",
12
- "graphQL": "/rest/repositories/swapi/graphql/film-restricted",
11
+ "endpointId": "film-restricted",
12
+ "endpointURI": "/rest/repositories/swapi/graphql/film-restricted",
13
13
  "active": true,
14
14
  "default": true
15
15
  },
16
16
  {
17
- "id": "swapi-characters",
18
- "graphQL": "/rest/repositories/swapi/graphql/swapi-characters",
17
+ "endpointId": "swapi-characters",
18
+ "endpointURI": "/rest/repositories/swapi/graphql/swapi-characters",
19
19
  "active": false,
20
20
  "default": false
21
21
  }
@@ -12,10 +12,11 @@ describe('Graphql: create endpoint', () => {
12
12
  cy.createRepository({id: repositoryId});
13
13
  cy.presetRepository(repositoryId);
14
14
  // TODO: remove stubs and enable next imports when REST API is ready
15
- // cy.importServerFile(repositoryId, 'swapi-dataset.ttl');
16
- // cy.uploadGraphqlSchema(repositoryId, 'graphql/schema/swapi-schema.yaml', 'swapi');
17
- GraphqlStubs.stubGetNoEndpointsInfo(repositoryId);
18
- GraphqlStubs.stubGetEndpoints(repositoryId, 'graphql-swapi-endpoints.json');
15
+ cy.importServerFile(repositoryId, 'swapi-dataset.ttl');
16
+ // cy.importServerFile(repositoryId, 'ontology-and-shapes.ttl');
17
+ // cy.uploadGraphqlSchema(repositoryId, 'graphql/soml/swapi-schema.yaml', 'swapi');
18
+ // GraphqlStubs.stubGetNoEndpointsInfo(repositoryId);
19
+ // GraphqlStubs.stubGetEndpoints(repositoryId, 'graphql-swapi-endpoints.json');
19
20
  RepositoriesStubs.spyGetRepositories();
20
21
  });
21
22
 
@@ -23,7 +24,7 @@ describe('Graphql: create endpoint', () => {
23
24
  cy.deleteRepository(repositoryId);
24
25
  });
25
26
 
26
- it('should be able to start graphql endpoint creation wizard', () => {
27
+ it('should be able to start graphql endpoint creation wizard - no source data', () => {
27
28
  // Given I have a repository with no active GraphQL endpoints
28
29
  // When I visit the endpoint management view
29
30
  GraphqlEndpointManagementSteps.visit();
@@ -38,12 +39,193 @@ describe('Graphql: create endpoint', () => {
38
39
  CreateGraphqlEndpointSteps.getSourceRepositorySelector().should('be.visible');
39
40
  // And the source repository should be preselected to the active repository
40
41
  CreateGraphqlEndpointSteps.getSelectedSourceRepository().should('have.text', repositoryId);
42
+
41
43
  // And the active step should be the first step
42
44
  CreateGraphqlEndpointSteps.getActiveStep().should('contain', 'Select schema source');
43
45
  CreateGraphqlEndpointSteps.getSelectSchemaSourceView().should('be.visible');
44
46
  // And the schema source should be preselected to the first option
45
47
  CreateGraphqlEndpointSteps.getSchemaSourceTypes().should('have.length', 2);
46
48
  CreateGraphqlEndpointSteps.getSelectedSchemaSource().parent().should('contain', 'GraphQL schema shapes');
49
+ // And there must be no graphql schema shapes in the source repository
50
+ CreateGraphqlEndpointSteps.getGraphqlSchemaShapesNotFound().should('be.visible');
51
+
52
+ // When I switch to the second schema source option
53
+ CreateGraphqlEndpointSteps.selectOntologiesAndShaclShapesOption();
54
+ // Then I expect the schema source to be switched to ontologies and SHACL shapes
55
+ CreateGraphqlEndpointSteps.getOntologiesAndShaclShapesView().should('be.visible');
56
+ CreateGraphqlEndpointSteps.getEndpointParamsForm().should('be.visible');
57
+ // And endpoint params form should be empty
58
+ CreateGraphqlEndpointSteps.getEndpointIdFieldInput().should('have.value', '');
59
+ CreateGraphqlEndpointSteps.getEndpointLabelFieldInput().should('have.value', '');
60
+ CreateGraphqlEndpointSteps.getVocabularyPrefixSelectSelectedOption().should('be.empty');
61
+
62
+ // And Use all graphs option should be selected by default
63
+ CreateGraphqlEndpointSteps.getSelectedGraphSource().parent().should('contain', 'Use all graphs');
64
+ // And No graphs should be found
65
+ CreateGraphqlEndpointSteps.getGraphsNotFound().should('be.visible');
66
+
67
+ // When I switch to shacl shape graphs option
68
+ CreateGraphqlEndpointSteps.selectUseShaclShapeGraphsOption();
69
+ CreateGraphqlEndpointSteps.getShaclShapeGraphsNotFound().should('be.visible');
70
+
71
+ // When I switch to pick graphs option
72
+ CreateGraphqlEndpointSteps.selectPickGraphsOption();
73
+ CreateGraphqlEndpointSteps.getPickGraphsNoGraphsFound().should('be.visible');
74
+
75
+ // And the next button should be disabled
76
+ CreateGraphqlEndpointSteps.getNextStepButton().should('be.disabled');
77
+ });
78
+
79
+ it('should be able to select graphql schema shapes and open next step', () => {
80
+ // Given I have a repository with graphql shapes in it
81
+ cy.importServerFile(repositoryId, 'ontology-and-shapes.ttl');
82
+ // When I start the endpoint creation wizard
83
+ GraphqlEndpointManagementSteps.visit();
84
+ cy.wait('@getRepositories');
85
+ GraphqlEndpointManagementSteps.createEndpoint();
86
+ CreateGraphqlEndpointSteps.getView().should('be.visible');
87
+ CreateGraphqlEndpointSteps.getSelectedSourceRepository().should('have.text', repositoryId);
88
+ // Then the select schema source view is visible
89
+ CreateGraphqlEndpointSteps.getActiveStep().should('contain', 'Select schema source');
90
+ CreateGraphqlEndpointSteps.getSelectSchemaSourceView().should('be.visible');
91
+ // And the graphql schema selector is visible
92
+ CreateGraphqlEndpointSteps.getGraphqlSchemaSelector().should('be.visible');
93
+ // And the graphql schema shapes are found
94
+ CreateGraphqlEndpointSteps.getAvailableGraphqlShapes().should('have.length', 2);
95
+ CreateGraphqlEndpointSteps.getSelectedGraphqlShapes().should('have.length', 0);
96
+ CreateGraphqlEndpointSteps.getSelectedGraphqlShapesCountBanner().should('not.exist');
97
+ // And I can select or deselect the graphql shapes
98
+ CreateGraphqlEndpointSteps.selectAllGraphqlShapes();
99
+ CreateGraphqlEndpointSteps.getAvailableGraphqlShapes().should('have.length', 0);
100
+ CreateGraphqlEndpointSteps.getSelectedGraphqlShapes().should('have.length', 2);
101
+ CreateGraphqlEndpointSteps.getSelectedGraphqlShapesCountBanner().should('contain', '2 GraphQL schema shapes included');
102
+ // And the next button should be enabled because I have selected the shapes
103
+ CreateGraphqlEndpointSteps.getNextStepButton().should('be.enabled');
104
+
105
+ CreateGraphqlEndpointSteps.deselectAllGraphqlShapes();
106
+ CreateGraphqlEndpointSteps.getAvailableGraphqlShapes().should('have.length', 2);
107
+ CreateGraphqlEndpointSteps.getSelectedGraphqlShapes().should('have.length', 0);
108
+ CreateGraphqlEndpointSteps.getSelectedGraphqlShapesCountBanner().should('not.exist');
109
+ // And the next button should be disabled because I have not selected any shapes
110
+ CreateGraphqlEndpointSteps.getNextStepButton().should('be.disabled');
111
+
112
+ CreateGraphqlEndpointSteps.selectGraphqlShape(0);
113
+ CreateGraphqlEndpointSteps.getAvailableGraphqlShapes().should('have.length', 1);
114
+ CreateGraphqlEndpointSteps.getAvailableGraphqlShape(0).should('contain', 'Swapi GraphQL Schema');
115
+ CreateGraphqlEndpointSteps.getSelectedGraphqlShapes().should('have.length', 1);
116
+ CreateGraphqlEndpointSteps.getSelectedGraphqlShape(0).should('contain', 'Character GraphQL Schema');
117
+ CreateGraphqlEndpointSteps.getSelectedGraphqlShapesCountBanner().should('contain', '1 GraphQL schema shapes included');
118
+ CreateGraphqlEndpointSteps.deselectAllGraphqlShape(0);
119
+ CreateGraphqlEndpointSteps.getAvailableGraphqlShapes().should('have.length', 2);
120
+ CreateGraphqlEndpointSteps.getSelectedGraphqlShapes().should('have.length', 0);
121
+ CreateGraphqlEndpointSteps.getSelectedGraphqlShapesCountBanner().should('not.exist');
122
+
123
+ // And I can filter the graphql shapes
124
+ CreateGraphqlEndpointSteps.filterSelectedGraphqlShapes('swapi');
125
+ CreateGraphqlEndpointSteps.getAvailableGraphqlShapes().should('have.length', 1);
126
+ CreateGraphqlEndpointSteps.getAvailableGraphqlShape(0).should('contain', 'Swapi GraphQL Schema');
127
+ CreateGraphqlEndpointSteps.filterSelectedGraphqlShapes('non-existing');
128
+ CreateGraphqlEndpointSteps.getAvailableGraphqlShapes().should('have.length', 0);
129
+ CreateGraphqlEndpointSteps.clearSelectedGraphqlShapesFilter();
130
+ CreateGraphqlEndpointSteps.getAvailableGraphqlShapes().should('have.length', 2);
131
+
132
+ // When I select a graphql shacl shape
133
+ CreateGraphqlEndpointSteps.selectGraphqlShape(1);
134
+ // And I proceed to the next step
135
+ CreateGraphqlEndpointSteps.next();
136
+ // Then I should be on the next step
137
+ CreateGraphqlEndpointSteps.getActiveStep().should('contain', 'Configure endpoint');
138
+ CreateGraphqlEndpointSteps.getConfigureEndpointView().should('be.visible');
139
+ // And I should see the cancel button
140
+ CreateGraphqlEndpointSteps.getCancelButton().should('be.visible');
141
+ // And I should see the back button
142
+ CreateGraphqlEndpointSteps.getBackButton().should('be.visible');
143
+
144
+ // When I click on the back button
145
+ CreateGraphqlEndpointSteps.back();
146
+ // Then I should be back on the previous step
147
+ CreateGraphqlEndpointSteps.getActiveStep().should('contain', 'Select schema source');
148
+ // And the graphql schema shapes should be selected as before
149
+ CreateGraphqlEndpointSteps.getAvailableGraphqlShapes().should('have.length', 1);
150
+ CreateGraphqlEndpointSteps.getAvailableGraphqlShape(0).should('contain', 'Character GraphQL Schema');
151
+ CreateGraphqlEndpointSteps.getSelectedGraphqlShapes().should('have.length', 1);
152
+ CreateGraphqlEndpointSteps.getSelectedGraphqlShape(0).should('contain', 'Swapi GraphQL Schema');
153
+ });
154
+
155
+ it('should be able to select graphs and endpoint properties and open next step', () => {
156
+ // Given I have a repository with graphql shapes in it
157
+ cy.importServerFile(repositoryId, 'ontology-and-shapes.ttl');
158
+ // When we upload a SOML schema, two graphs are created, and we can use this to test the behavior for graphs selection
159
+ cy.uploadGraphqlSchema(repositoryId, 'graphql/soml/swapi-schema.yaml', 'swapi');
160
+ // When I start the endpoint creation wizard
161
+ GraphqlEndpointManagementSteps.visit();
162
+ cy.wait('@getRepositories');
163
+ GraphqlEndpointManagementSteps.createEndpoint();
164
+ CreateGraphqlEndpointSteps.getView().should('be.visible');
165
+ CreateGraphqlEndpointSteps.getSelectedSourceRepository().should('have.text', repositoryId);
166
+
167
+ // When I switch to the second schema source option
168
+ CreateGraphqlEndpointSteps.selectOntologiesAndShaclShapesOption();
169
+ CreateGraphqlEndpointSteps.getOntologiesAndShaclShapesView().should('be.visible');
170
+ CreateGraphqlEndpointSteps.getSelectedGraphSource().parent().should('contain', 'Use all graphs');
171
+ // Then I should see the message that all graphs will be used
172
+ CreateGraphqlEndpointSteps.getAllGraphsWillBeUsedMessage().should('be.visible');
173
+ // And the next button should be disabled until endpoint params are filled
174
+ CreateGraphqlEndpointSteps.getNextStepButton().should('be.disabled');
175
+
176
+ // When I fill in the endpoint params
177
+ CreateGraphqlEndpointSteps.typeEndpointId('swapi-endpoint');
178
+ // The next button should still be disabled because there are more required fields
179
+ CreateGraphqlEndpointSteps.getNextStepButton().should('be.disabled');
180
+ // When I fill in the endpoint label which is optional
181
+ CreateGraphqlEndpointSteps.typeEndpointLabel('Swapi endpoint');
182
+ // The next button should still be disabled because there are more required fields
183
+ CreateGraphqlEndpointSteps.getNextStepButton().should('be.disabled');
184
+ // When I select the vocabulary prefix
185
+ CreateGraphqlEndpointSteps.selectVocabularyPrefix('voc');
186
+ // Then the next button should be enabled
187
+ CreateGraphqlEndpointSteps.getNextStepButton().should('be.enabled');
188
+
189
+ // When I switch to SHACL shape graphs option
190
+ CreateGraphqlEndpointSteps.selectUseShaclShapeGraphsOption();
191
+ CreateGraphqlEndpointSteps.getShaclShapeGraphsNotFound().should('be.visible');
192
+ // And the next button should be disabled because there are no graphs to select
193
+ CreateGraphqlEndpointSteps.getNextStepButton().should('be.disabled');
194
+
195
+ // When I switch to pick graphs option
196
+ CreateGraphqlEndpointSteps.selectPickGraphsOption();
197
+ // And the next button should be disabled because no graphs are still selected
198
+ CreateGraphqlEndpointSteps.getNextStepButton().should('be.disabled');
199
+ // And I can select graphs
200
+ CreateGraphqlEndpointSteps.getGraphsSelector().should('be.visible');
201
+ CreateGraphqlEndpointSteps.getAvailableGraphs().should('have.length', 2);
202
+ CreateGraphqlEndpointSteps.getSelectedGraphs().should('have.length', 0);
203
+ CreateGraphqlEndpointSteps.getSelectedGraphsCountBanner().should('not.exist');
204
+ CreateGraphqlEndpointSteps.selectAllGraphs();
205
+ CreateGraphqlEndpointSteps.getAvailableGraphs().should('have.length', 0);
206
+ CreateGraphqlEndpointSteps.getSelectedGraphs().should('have.length', 2);
207
+ CreateGraphqlEndpointSteps.getSelectedGraphsCountBanner().should('contain', '2 SHACL shape graphs are included');
208
+ CreateGraphqlEndpointSteps.getNextStepButton().should('be.enabled');
209
+
210
+ // When I click next
211
+ CreateGraphqlEndpointSteps.next();
212
+ // Then I should be on the next step
213
+ CreateGraphqlEndpointSteps.getActiveStep().should('contain', 'Configure endpoint');
214
+ CreateGraphqlEndpointSteps.getConfigureEndpointView().should('be.visible');
215
+ // And I should see the cancel button
216
+ CreateGraphqlEndpointSteps.getCancelButton().should('be.visible');
217
+ // And I should see the back button
218
+ CreateGraphqlEndpointSteps.getBackButton().should('be.visible');
219
+ // When I click on the back button
220
+ CreateGraphqlEndpointSteps.back();
221
+ // Then I should be back on the previous step
222
+ CreateGraphqlEndpointSteps.getActiveStep().should('contain', 'Select schema source');
223
+ CreateGraphqlEndpointSteps.getSelectedSchemaSource().parent().should('contain', 'OWL ontologies/SHACL shapes');
224
+ CreateGraphqlEndpointSteps.getSelectedGraphSource().parent().should('contain', 'Select one or more graphs');
225
+ CreateGraphqlEndpointSteps.getSelectedGraphs().should('have.length', 2);
226
+ CreateGraphqlEndpointSteps.getEndpointIdFieldInput().should('have.value', 'swapi-endpoint');
227
+ CreateGraphqlEndpointSteps.getEndpointLabelFieldInput().should('have.value', 'Swapi endpoint');
228
+ CreateGraphqlEndpointSteps.getVocabularyPrefixSelectSelectedOption().should('have.text', 'voc');
47
229
  });
48
230
 
49
231
  it('should be able to cancel the endpoint creation wizard', () => {
@@ -75,4 +257,5 @@ describe('Graphql: create endpoint', () => {
75
257
  ModalDialogSteps.getDialog().should('not.exist');
76
258
  cy.url().should('include', '/graphql/endpoints');
77
259
  });
260
+
78
261
  });
@@ -10,7 +10,7 @@ describe('GraphQL endpoints filtering', () => {
10
10
  cy.presetRepository(repositoryId);
11
11
  // TODO: remove stubs and enable next imports when REST API is ready
12
12
  // cy.importServerFile(repositoryId, 'swapi-dataset.ttl');
13
- // cy.uploadGraphqlSchema(repositoryId, 'graphql/schema/swapi-schema.yaml', 'swapi');
13
+ // cy.uploadGraphqlSchema(repositoryId, 'graphql/soml/swapi-schema.yaml', 'swapi');
14
14
  GraphqlStubs.stubGetEndpointsInfo(repositoryId);
15
15
  GraphqlStubs.stubGetEndpoints(repositoryId, 'graphql-swapi-endpoints.json');
16
16
  });
@@ -12,7 +12,7 @@ describe('GraphQL endpoints management', () => {
12
12
  cy.presetRepository(repositoryId);
13
13
  // TODO: remove stubs and enable next imports when REST API is ready
14
14
  // cy.importServerFile(repositoryId, 'swapi-dataset.ttl');
15
- // cy.uploadGraphqlSchema(repositoryId, 'graphql/schema/swapi-schema.yaml', 'swapi');
15
+ // cy.uploadGraphqlSchema(repositoryId, 'graphql/soml/swapi-schema.yaml', 'swapi');
16
16
  GraphqlStubs.stubGetEndpointsInfo(repositoryId);
17
17
  GraphqlStubs.stubGetEndpoints(repositoryId, 'graphql-swapi-endpoints.json');
18
18
  });
@@ -1,5 +1,6 @@
1
1
  import {ImportServerFilesSteps} from "../../steps/import/import-server-files-steps";
2
2
  import {ImportSettingsDialogSteps} from "../../steps/import/import-settings-dialog-steps";
3
+ import {SERVER_FILES_COUNT} from "../../steps/import/import-test-constants";
3
4
 
4
5
  describe('Import server files - Batch operations', () => {
5
6
 
@@ -11,7 +12,7 @@ describe('Import server files - Batch operations', () => {
11
12
  repositoryId = 'server-import-' + Date.now();
12
13
  cy.createRepository({id: repositoryId});
13
14
  ImportServerFilesSteps.visitServerImport(repositoryId);
14
- ImportServerFilesSteps.getResources().should('have.length', 19);
15
+ ImportServerFilesSteps.getResources().should('have.length', SERVER_FILES_COUNT);
15
16
  });
16
17
 
17
18
  afterEach(() => {
@@ -48,7 +49,7 @@ describe('Import server files - Batch operations', () => {
48
49
  // When I select All files from the menu
49
50
  ImportServerFilesSteps.selectAllResources();
50
51
  // Then I should see all files selected
51
- ImportServerFilesSteps.getSelectedResources().should('have.length', 19);
52
+ ImportServerFilesSteps.getSelectedResources().should('have.length', SERVER_FILES_COUNT);
52
53
  // When I select None from the menu
53
54
  ImportServerFilesSteps.deselectAllResources();
54
55
  // Then I should see no files selected
@@ -65,7 +66,7 @@ describe('Import server files - Batch operations', () => {
65
66
  // When I select Not Imported from the menu
66
67
  ImportServerFilesSteps.selectNotImportedResources();
67
68
  // Then I should see only not imported files selected
68
- ImportServerFilesSteps.getSelectedResources().should('have.length', 18);
69
+ ImportServerFilesSteps.getSelectedResources().should('have.length', SERVER_FILES_COUNT - 1);
69
70
  // Deselect all for the next step
70
71
  ImportServerFilesSteps.deselectAllResources();
71
72
  ImportServerFilesSteps.getSelectedResources().should('have.length', 0);
@@ -2,7 +2,7 @@ import {ImportUserDataSteps} from "../../steps/import/import-user-data-steps";
2
2
  import {ImportServerFilesSteps} from "../../steps/import/import-server-files-steps";
3
3
  import {ImportSettingsDialogSteps} from "../../steps/import/import-settings-dialog-steps";
4
4
  import {ImportResourceMessageDialog} from "../../steps/import/import-resource-message-dialog";
5
- import {ApplicationSteps} from "../../steps/application-steps";
5
+ import {SERVER_FILES_COUNT} from "../../steps/import/import-test-constants";
6
6
 
7
7
  describe('Import server files', () => {
8
8
 
@@ -14,7 +14,7 @@ describe('Import server files', () => {
14
14
  repositoryId = 'server-import-' + Date.now();
15
15
  cy.createRepository({id: repositoryId});
16
16
  ImportServerFilesSteps.visitServerImport(repositoryId);
17
- ImportServerFilesSteps.getResources().should('have.length', 19);
17
+ ImportServerFilesSteps.getResources().should('have.length', SERVER_FILES_COUNT);
18
18
  });
19
19
 
20
20
  afterEach(() => {
@@ -66,7 +66,7 @@ describe('Import server files', () => {
66
66
  // When the server files tab is loaded
67
67
  // Then I should see all the files and folders by default
68
68
  ImportServerFilesSteps.getShowAllResourceTypesButton().should('have.class', 'active');
69
- ImportServerFilesSteps.getResources().should('have.length', 19);
69
+ ImportServerFilesSteps.getResources().should('have.length', SERVER_FILES_COUNT);
70
70
  // When I select the folders only filter
71
71
  ImportServerFilesSteps.selectFoldersOnlyFilter();
72
72
  // Then I should see only the folders
@@ -75,7 +75,7 @@ describe('Import server files', () => {
75
75
  // When I select the files only filter
76
76
  ImportServerFilesSteps.selectFilesOnlyFilter();
77
77
  // Then I should see only the files
78
- ImportServerFilesSteps.getResources().should('have.length', 17);
78
+ ImportServerFilesSteps.getResources().should('have.length', SERVER_FILES_COUNT - 2);
79
79
  });
80
80
 
81
81
  it('should be able to import the whole directory', () => {
@@ -180,8 +180,8 @@ describe('Import server files', () => {
180
180
  ImportServerFilesSteps.getResource(5).should('contain', "rdfxml.rdf");
181
181
  ImportServerFilesSteps.getResource(6).should('contain', "jsonld-file.jsonld");
182
182
  // checks files in root
183
- ImportServerFilesSteps.getResource(15).should('contain', "0007-import-file.jsonld");
184
- ImportServerFilesSteps.getResource(16).should('contain', "test_turtlestar.ttls");
185
- ImportServerFilesSteps.getResource(17).should('contain', "bnodes.ttl");
183
+ ImportServerFilesSteps.getResource(17).should('contain', "0007-import-file.jsonld");
184
+ ImportServerFilesSteps.getResource(18).should('contain', "test_turtlestar.ttls");
185
+ ImportServerFilesSteps.getResource(19).should('contain', "bnodes.ttl");
186
186
  });
187
187
  });
@@ -3,6 +3,7 @@ import {ImportUserDataSteps} from "../../steps/import/import-user-data-steps";
3
3
  import {ImportServerFilesSteps} from "../../steps/import/import-server-files-steps";
4
4
  import ImportSteps from "../../steps/import/import-steps";
5
5
  import HomeSteps from "../../steps/home-steps";
6
+ import {SERVER_FILES_COUNT} from "../../steps/import/import-test-constants";
6
7
 
7
8
  const bnodes = `_:node0 <http://purl.org/dc/elements/1.1/title> "A new book" ;
8
9
  \t<http://purl.org/dc/elements/1.1/creator> "A.N.Other" .`;
@@ -39,7 +40,7 @@ describe('Import view', () => {
39
40
  // When I switch to the server files tab
40
41
  ImportUserDataSteps.openServerFilesTab();
41
42
  // Then I should see the server files only
42
- ImportServerFilesSteps.getResources().should('have.length', 19);
43
+ ImportServerFilesSteps.getResources().should('have.length', SERVER_FILES_COUNT);
43
44
  // When I switch back to the user data tab
44
45
  ImportServerFilesSteps.openUserDataTab();
45
46
  // Then I should see the uploaded file
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "graphdb-workbench-tests",
3
- "version": "3.0.0-TR5",
3
+ "version": "3.0.0-TR6",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "graphdb-workbench-tests",
9
- "version": "3.0.0-TR5",
9
+ "version": "3.0.0-TR6",
10
10
  "license": "Apache-2.0",
11
11
  "devDependencies": {
12
12
  "cypress": "^13.3.1",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "graphdb-workbench-tests",
3
- "version": "3.0.0-TR5",
3
+ "version": "3.0.0-TR6",
4
4
  "description": "Cypress tests for GraphDB workbench",
5
5
  "scripts": {
6
6
  "prepack": "npm shrinkwrap",
@@ -19,6 +19,10 @@ export class CreateGraphqlEndpointSteps {
19
19
  return this.getView().find('.wizard-step.active');
20
20
  }
21
21
 
22
+ // ===================================
23
+ // Schema source view
24
+ // ===================================
25
+
22
26
  static getSelectSchemaSourceView() {
23
27
  return this.getView().find('.select-schema-source-view');
24
28
  }
@@ -31,7 +35,219 @@ export class CreateGraphqlEndpointSteps {
31
35
  return this.getSelectSchemaSourceView().find('.schema-source-type input[type=radio]:checked');
32
36
  }
33
37
 
38
+ static selectOntologiesAndShaclShapesOption() {
39
+ this.getSelectSchemaSourceView().find(`.schema-source-type input[type=radio]`).eq(1).click();
40
+ }
41
+
42
+ // ===================================
43
+ // Graphql schema shapes view
44
+ // ===================================
45
+
46
+ static getGraphqlSchemaShapesView() {
47
+ return this.getView().find('.graphql-schema-shapes');
48
+ }
49
+
50
+ static getGraphqlSchemaShapesNotFound() {
51
+ return this.getGraphqlSchemaShapesView().find('.no-shapes');
52
+ }
53
+
54
+ static getGraphqlSchemaSelector() {
55
+ return this.getGraphqlSchemaShapesView().find('.graphql-shapes-selector .shuttle-multiselect');
56
+ }
57
+
58
+ static getSelectedGraphqlShapesCountBanner() {
59
+ return this.getGraphqlSchemaSelector().find('.toolbar-right .selected-items-message');
60
+ }
61
+
62
+ static getAvailableGraphqlShapes() {
63
+ return this.getGraphqlSchemaSelector().find('.available-options .option-item');
64
+ }
65
+
66
+ static getAvailableGraphqlShape(index) {
67
+ return this.getAvailableGraphqlShapes().eq(index);
68
+ }
69
+
70
+ static getSelectedGraphqlShapes() {
71
+ return this.getGraphqlSchemaSelector().find('.selected-options .option-item');
72
+ }
73
+
74
+ static getSelectedGraphqlShape(index) {
75
+ return this.getSelectedGraphqlShapes().eq(index);
76
+ }
77
+
78
+ static selectAllGraphqlShapes() {
79
+ this.getGraphqlSchemaSelector().find('.add-all-btn').click();
80
+ }
81
+
82
+ static deselectAllGraphqlShapes() {
83
+ this.getGraphqlSchemaSelector().find('.remove-all-btn').click();
84
+ }
85
+
86
+ static selectGraphqlShape(index) {
87
+ this.getAvailableGraphqlShapes().eq(index).find('.add-btn').click();
88
+ }
89
+
90
+ static deselectAllGraphqlShape(index) {
91
+ this.getSelectedGraphqlShapes().eq(index).find('.remove-btn').click();
92
+ }
93
+
94
+ static filterSelectedGraphqlShapes(term) {
95
+ this.getGraphqlSchemaSelector().find('.toolbar-left .filter-selected').clear().type(term);
96
+ }
97
+
98
+ static clearSelectedGraphqlShapesFilter() {
99
+ this.getGraphqlSchemaSelector().find('.toolbar-left .filter-selected').clear();
100
+ }
101
+
102
+ // ===================================
103
+ // Ontologies and SHACL shapes view
104
+ // ===================================
105
+
106
+ static getOntologiesAndShaclShapesView() {
107
+ return this.getView().find('.ontologies-and-shacl-shapes');
108
+ }
109
+
110
+ static getGraphSourceTypes() {
111
+ return this.getOntologiesAndShaclShapesView().find('.graph-source-type input[type=radio]');
112
+ }
113
+
114
+ static getSelectedGraphSource() {
115
+ return this.getOntologiesAndShaclShapesView().find('.graph-source-type input[type=radio]:checked');
116
+ }
117
+
118
+ static selectUseAllGraphsOption() {
119
+ this.getOntologiesAndShaclShapesView().find(`.graph-source-type input[type=radio]`).eq(0).click();
120
+ }
121
+
122
+ static selectUseShaclShapeGraphsOption() {
123
+ this.getOntologiesAndShaclShapesView().find(`.graph-source-type input[type=radio]`).eq(1).click();
124
+ }
125
+
126
+ static selectPickGraphsOption() {
127
+ this.getOntologiesAndShaclShapesView().find(`.graph-source-type input[type=radio]`).eq(2).click();
128
+ }
129
+
130
+ static getGraphsNotFound() {
131
+ return this.getOntologiesAndShaclShapesView().find('.use-all-graphs .no-graphs');
132
+ }
133
+
134
+ static getAllGraphsWillBeUsedMessage() {
135
+ return this.getOntologiesAndShaclShapesView().find('.use-all-graphs .all-graphs-selected');
136
+ }
137
+
138
+ static getPickGraphsNoGraphsFound() {
139
+ return this.getOntologiesAndShaclShapesView().find('.select-graphs .no-graphs');
140
+ }
141
+
142
+ static getShaclShapeGraphsNotFound() {
143
+ return this.getOntologiesAndShaclShapesView().find('.use-all-shacl-shape-graphs .no-shacl-shapes');
144
+ }
145
+
146
+ static getEndpointParamsForm() {
147
+ return this.getView().find('.endpoint-params-form');
148
+ }
149
+
150
+ // Endpoint ID field
151
+ static getEndpointIdField() {
152
+ return this.getEndpointParamsForm().find('.endpoint-id');
153
+ }
154
+
155
+ static getEndpointIdFieldInput() {
156
+ return this.getEndpointIdField().find('input');
157
+ }
158
+
159
+ static typeEndpointId(endpointId) {
160
+ this.getEndpointIdFieldInput().clear().type(endpointId);
161
+ }
162
+
163
+ // Endpoint label field
164
+ static getEndpointLabelField() {
165
+ return this.getEndpointParamsForm().find('.endpoint-label');
166
+ }
167
+
168
+ static getEndpointLabelFieldInput() {
169
+ return this.getEndpointLabelField().find('input');
170
+ }
171
+
172
+ static typeEndpointLabel(endpointLabel) {
173
+ this.getEndpointLabelFieldInput().clear().type(endpointLabel);
174
+ }
175
+
176
+ // Vocabulary prefix select
177
+ static getVocabularyPrefixSelectField() {
178
+ return this.getEndpointParamsForm().find('.vocabulary-prefix');
179
+ }
180
+
181
+ static getVocabularyPrefixSelect() {
182
+ return this.getVocabularyPrefixSelectField().find('select');
183
+ }
184
+
185
+ static getVocabularyPrefixSelectOptions() {
186
+ return this.getVocabularyPrefixSelect().find('option');
187
+ }
188
+
189
+ static getVocabularyPrefixSelectSelectedOption() {
190
+ return this.getVocabularyPrefixSelect().find('option:selected');
191
+ }
192
+
193
+ static selectVocabularyPrefix(prefix) {
194
+ this.getVocabularyPrefixSelect().select(prefix);
195
+ }
196
+
197
+ // Graphs selector
198
+ static getGraphsSelector() {
199
+ return this.getOntologiesAndShaclShapesView().find('.graphs-selector .shuttle-multiselect');
200
+ }
201
+
202
+ static getAvailableGraphs() {
203
+ return this.getGraphsSelector().find('.available-options .option-item');
204
+ }
205
+
206
+ static getSelectedGraphs() {
207
+ return this.getGraphsSelector().find('.selected-options .option-item');
208
+ }
209
+
210
+ static getSelectedGraphsCountBanner() {
211
+ return this.getGraphsSelector().find('.toolbar-right .selected-items-message');
212
+ }
213
+
214
+ static selectAllGraphs() {
215
+ this.getGraphsSelector().find('.add-all-btn').click();
216
+ }
217
+
218
+ // ===================================
219
+ // Configure endpoint view
220
+ // ===================================
221
+
222
+ static getConfigureEndpointView() {
223
+ return this.getView().find('.endpoint-configuration-view');
224
+ }
225
+
226
+ // ===================================
227
+ // Wizard actions
228
+ // ===================================
229
+
230
+ static getCancelButton() {
231
+ return this.getView().find('.cancel-btn');
232
+ }
233
+
34
234
  static cancelEndpointCreation() {
35
- this.getView().find('.cancel-btn').click();
235
+ this.getCancelButton().click();
236
+ }
237
+
238
+ static getNextStepButton() {
239
+ return this.getView().find('.next-btn');
240
+ }
241
+
242
+ static next() {
243
+ this.getNextStepButton().click();
244
+ }
245
+
246
+ static getBackButton() {
247
+ return this.getView().find('.back-btn');
248
+ }
249
+
250
+ static back() {
251
+ this.getBackButton().click();
36
252
  }
37
253
  }
@@ -0,0 +1 @@
1
+ export const SERVER_FILES_COUNT = 20;