graphdb-workbench-tests 2.3.0-TR6 → 2.3.0-TR7

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.
@@ -646,7 +646,7 @@
646
646
  "query.editor.autocomplete.hint": "Hint: \"abC\" matches \"abC*\", \"ab c*\" and \"ab-c*\"",
647
647
  "query.editor.progress.msg": "{{progressMessage}}... {{timeHuman}}",
648
648
  "query.editor.extra.msg": "\n{{extraMessage}}",
649
- "query.editor.warning.msg": "Explain only works with SELECT or CONSTRUCT queries.",
649
+ "query.editor.warning.msg": "Explain only works with SELECT, CONSTRUCT or DESCRIBE queries.",
650
650
  "query.editor.virtual.repo.warning.msg": "Explain not supported for Virtual repositories.",
651
651
  "query.editor.virtual.repo.update.warning.msg": "Updates are not supported for Virtual repositories.",
652
652
  "query.editor.get.saved.queries.error": "Error! Could not get saved queries",
@@ -1049,6 +1049,7 @@
1049
1049
  "repoTooltips.ontop.obdaFile": "Describes the mapping from SQL to RDF in either the OBDA or the R2RML format.",
1050
1050
  "repoTooltips.ontop.owlFile": "Specifies relations between the classes and properties in the cosntructed RDF graph. It can be in any supported RDF format.",
1051
1051
  "repoTooltips.ontop.constraintFile": "Specifies override of SQL primary and foreign keys.",
1052
+ "repoTooltips.ontop.lensesFile": "Specifies aditional contstraints attached to relation.",
1052
1053
  "repoTooltips.ontop.dbMetadataFile": "Specifies metadata for the SQL database.",
1053
1054
  "repoTooltips.ontop.testConn": "Attempts to establish a connection to the SQL database to test if the supplied configuration is correct.",
1054
1055
  "repoTooltips.fedx.repositoryNotExistWarning": "The repository member has been removed from the local repositories",
@@ -0,0 +1,522 @@
1
+ {
2
+ "head": {
3
+ "vars": [
4
+ "log",
5
+ "time",
6
+ "g",
7
+ "s",
8
+ "p",
9
+ "o",
10
+ "i"
11
+ ]
12
+ },
13
+ "results": {
14
+ "bindings": [
15
+ {
16
+ "log": {
17
+ "type": "bnode",
18
+ "value": "83222b124ff949648bd78ee778d22f601149"
19
+ },
20
+ "time": {
21
+ "datatype": "http://www.w3.org/2001/XMLSchema#dateTime",
22
+ "type": "literal",
23
+ "value": "2023-05-17T12:24:16.352+03:00"
24
+ },
25
+ "s": {
26
+ "type": "uri",
27
+ "value": "urn:Kirk"
28
+ },
29
+ "p": {
30
+ "type": "uri",
31
+ "value": "urn:name"
32
+ },
33
+ "o": {
34
+ "type": "literal",
35
+ "value": "James Tiberius Kirk"
36
+ },
37
+ "i": {
38
+ "datatype": "http://www.w3.org/2001/XMLSchema#boolean",
39
+ "type": "literal",
40
+ "value": "false"
41
+ }
42
+ },
43
+ {
44
+ "log": {
45
+ "type": "bnode",
46
+ "value": "83222b124ff949648bd78ee778d22f601149"
47
+ },
48
+ "time": {
49
+ "datatype": "http://www.w3.org/2001/XMLSchema#dateTime",
50
+ "type": "literal",
51
+ "value": "2023-05-17T12:24:02.366+03:00"
52
+ },
53
+ "s": {
54
+ "type": "uri",
55
+ "value": "urn:Kirk"
56
+ },
57
+ "p": {
58
+ "type": "uri",
59
+ "value": "urn:name"
60
+ },
61
+ "o": {
62
+ "type": "literal",
63
+ "value": "James T. Kirk"
64
+ },
65
+ "i": {
66
+ "datatype": "http://www.w3.org/2001/XMLSchema#boolean",
67
+ "type": "literal",
68
+ "value": "false"
69
+ }
70
+ },
71
+ {
72
+ "log": {
73
+ "type": "bnode",
74
+ "value": "83222b124ff949648bd78ee778d22f601149"
75
+ },
76
+ "time": {
77
+ "datatype": "http://www.w3.org/2001/XMLSchema#dateTime",
78
+ "type": "literal",
79
+ "value": "2023-05-17T12:24:02.366+03:00"
80
+ },
81
+ "s": {
82
+ "type": "uri",
83
+ "value": "urn:Kirk"
84
+ },
85
+ "p": {
86
+ "type": "uri",
87
+ "value": "urn:name"
88
+ },
89
+ "o": {
90
+ "type": "literal",
91
+ "value": "James Tiberius Kirk"
92
+ },
93
+ "i": {
94
+ "datatype": "http://www.w3.org/2001/XMLSchema#boolean",
95
+ "type": "literal",
96
+ "value": "true"
97
+ }
98
+ },
99
+ {
100
+ "log": {
101
+ "type": "bnode",
102
+ "value": "83222b124ff949648bd78ee778d22f601149"
103
+ },
104
+ "time": {
105
+ "datatype": "http://www.w3.org/2001/XMLSchema#dateTime",
106
+ "type": "literal",
107
+ "value": "2023-05-17T12:23:47.811+03:00"
108
+ },
109
+ "s": {
110
+ "type": "uri",
111
+ "value": "urn:Human"
112
+ },
113
+ "p": {
114
+ "type": "uri",
115
+ "value": "http://www.w3.org/2000/01/rdf-schema#subClassOf"
116
+ },
117
+ "o": {
118
+ "type": "uri",
119
+ "value": "urn:Mammal"
120
+ },
121
+ "i": {
122
+ "datatype": "http://www.w3.org/2001/XMLSchema#boolean",
123
+ "type": "literal",
124
+ "value": "true"
125
+ }
126
+ },
127
+ {
128
+ "log": {
129
+ "type": "bnode",
130
+ "value": "83222b124ff949648bd78ee778d22f601149"
131
+ },
132
+ "time": {
133
+ "datatype": "http://www.w3.org/2001/XMLSchema#dateTime",
134
+ "type": "literal",
135
+ "value": "2023-05-17T12:23:47.811+03:00"
136
+ },
137
+ "s": {
138
+ "type": "uri",
139
+ "value": "urn:Commander"
140
+ },
141
+ "p": {
142
+ "type": "uri",
143
+ "value": "http://www.w3.org/2000/01/rdf-schema#subClassOf"
144
+ },
145
+ "o": {
146
+ "type": "uri",
147
+ "value": "urn:StarfleetOfficer"
148
+ },
149
+ "i": {
150
+ "datatype": "http://www.w3.org/2001/XMLSchema#boolean",
151
+ "type": "literal",
152
+ "value": "true"
153
+ }
154
+ },
155
+ {
156
+ "log": {
157
+ "type": "bnode",
158
+ "value": "83222b124ff949648bd78ee778d22f601149"
159
+ },
160
+ "time": {
161
+ "datatype": "http://www.w3.org/2001/XMLSchema#dateTime",
162
+ "type": "literal",
163
+ "value": "2023-05-17T12:23:47.811+03:00"
164
+ },
165
+ "s": {
166
+ "type": "uri",
167
+ "value": "urn:Captain"
168
+ },
169
+ "p": {
170
+ "type": "uri",
171
+ "value": "http://www.w3.org/2000/01/rdf-schema#subClassOf"
172
+ },
173
+ "o": {
174
+ "type": "uri",
175
+ "value": "urn:StarfleetOfficer"
176
+ },
177
+ "i": {
178
+ "datatype": "http://www.w3.org/2001/XMLSchema#boolean",
179
+ "type": "literal",
180
+ "value": "true"
181
+ }
182
+ },
183
+ {
184
+ "log": {
185
+ "type": "bnode",
186
+ "value": "83222b124ff949648bd78ee778d22f601149"
187
+ },
188
+ "time": {
189
+ "datatype": "http://www.w3.org/2001/XMLSchema#dateTime",
190
+ "type": "literal",
191
+ "value": "2023-05-17T12:23:47.811+03:00"
192
+ },
193
+ "s": {
194
+ "type": "uri",
195
+ "value": "urn:Kirk"
196
+ },
197
+ "p": {
198
+ "type": "uri",
199
+ "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#type"
200
+ },
201
+ "o": {
202
+ "type": "uri",
203
+ "value": "urn:Human"
204
+ },
205
+ "i": {
206
+ "datatype": "http://www.w3.org/2001/XMLSchema#boolean",
207
+ "type": "literal",
208
+ "value": "true"
209
+ }
210
+ },
211
+ {
212
+ "log": {
213
+ "type": "bnode",
214
+ "value": "83222b124ff949648bd78ee778d22f601149"
215
+ },
216
+ "time": {
217
+ "datatype": "http://www.w3.org/2001/XMLSchema#dateTime",
218
+ "type": "literal",
219
+ "value": "2023-05-17T12:23:47.811+03:00"
220
+ },
221
+ "g": {
222
+ "type": "uri",
223
+ "value": "http://www.ontotext.com/implicit"
224
+ },
225
+ "s": {
226
+ "type": "uri",
227
+ "value": "urn:Kirk"
228
+ },
229
+ "p": {
230
+ "type": "uri",
231
+ "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#type"
232
+ },
233
+ "o": {
234
+ "type": "uri",
235
+ "value": "urn:Mammal"
236
+ },
237
+ "i": {
238
+ "datatype": "http://www.w3.org/2001/XMLSchema#boolean",
239
+ "type": "literal",
240
+ "value": "true"
241
+ }
242
+ },
243
+ {
244
+ "log": {
245
+ "type": "bnode",
246
+ "value": "83222b124ff949648bd78ee778d22f601149"
247
+ },
248
+ "time": {
249
+ "datatype": "http://www.w3.org/2001/XMLSchema#dateTime",
250
+ "type": "literal",
251
+ "value": "2023-05-17T12:23:47.811+03:00"
252
+ },
253
+ "s": {
254
+ "type": "uri",
255
+ "value": "urn:Kirk"
256
+ },
257
+ "p": {
258
+ "type": "uri",
259
+ "value": "urn:dateOfBirth"
260
+ },
261
+ "o": {
262
+ "datatype": "http://www.w3.org/2001/XMLSchema#date",
263
+ "type": "literal",
264
+ "value": "2233-03-22"
265
+ },
266
+ "i": {
267
+ "datatype": "http://www.w3.org/2001/XMLSchema#boolean",
268
+ "type": "literal",
269
+ "value": "true"
270
+ }
271
+ },
272
+ {
273
+ "log": {
274
+ "type": "bnode",
275
+ "value": "83222b124ff949648bd78ee778d22f601149"
276
+ },
277
+ "time": {
278
+ "datatype": "http://www.w3.org/2001/XMLSchema#dateTime",
279
+ "type": "literal",
280
+ "value": "2023-05-17T12:23:47.811+03:00"
281
+ },
282
+ "s": {
283
+ "type": "uri",
284
+ "value": "urn:Kirk"
285
+ },
286
+ "p": {
287
+ "type": "uri",
288
+ "value": "urn:name"
289
+ },
290
+ "o": {
291
+ "type": "literal",
292
+ "value": "James T. Kirk"
293
+ },
294
+ "i": {
295
+ "datatype": "http://www.w3.org/2001/XMLSchema#boolean",
296
+ "type": "literal",
297
+ "value": "true"
298
+ }
299
+ },
300
+ {
301
+ "log": {
302
+ "type": "bnode",
303
+ "value": "83222b124ff949648bd78ee778d22f601149"
304
+ },
305
+ "time": {
306
+ "datatype": "http://www.w3.org/2001/XMLSchema#dateTime",
307
+ "type": "literal",
308
+ "value": "2023-05-17T12:23:47.811+03:00"
309
+ },
310
+ "s": {
311
+ "type": "uri",
312
+ "value": "urn:Kirk"
313
+ },
314
+ "p": {
315
+ "type": "uri",
316
+ "value": "urn:rank"
317
+ },
318
+ "o": {
319
+ "type": "uri",
320
+ "value": "urn:Commander"
321
+ },
322
+ "i": {
323
+ "datatype": "http://www.w3.org/2001/XMLSchema#boolean",
324
+ "type": "literal",
325
+ "value": "true"
326
+ }
327
+ },
328
+ {
329
+ "log": {
330
+ "type": "bnode",
331
+ "value": "83222b124ff949648bd78ee778d22f601149"
332
+ },
333
+ "time": {
334
+ "datatype": "http://www.w3.org/2001/XMLSchema#dateTime",
335
+ "type": "literal",
336
+ "value": "2023-05-17T12:23:47.811+03:00"
337
+ },
338
+ "g": {
339
+ "type": "uri",
340
+ "value": "http://www.ontotext.com/implicit"
341
+ },
342
+ "s": {
343
+ "type": "uri",
344
+ "value": "urn:dateOfBirth"
345
+ },
346
+ "p": {
347
+ "type": "uri",
348
+ "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#type"
349
+ },
350
+ "o": {
351
+ "type": "uri",
352
+ "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#Property"
353
+ },
354
+ "i": {
355
+ "datatype": "http://www.w3.org/2001/XMLSchema#boolean",
356
+ "type": "literal",
357
+ "value": "true"
358
+ }
359
+ },
360
+ {
361
+ "log": {
362
+ "type": "bnode",
363
+ "value": "83222b124ff949648bd78ee778d22f601149"
364
+ },
365
+ "time": {
366
+ "datatype": "http://www.w3.org/2001/XMLSchema#dateTime",
367
+ "type": "literal",
368
+ "value": "2023-05-17T12:23:47.811+03:00"
369
+ },
370
+ "g": {
371
+ "type": "uri",
372
+ "value": "http://www.ontotext.com/implicit"
373
+ },
374
+ "s": {
375
+ "type": "uri",
376
+ "value": "urn:dateOfBirth"
377
+ },
378
+ "p": {
379
+ "type": "uri",
380
+ "value": "http://www.w3.org/2000/01/rdf-schema#subPropertyOf"
381
+ },
382
+ "o": {
383
+ "type": "uri",
384
+ "value": "urn:dateOfBirth"
385
+ },
386
+ "i": {
387
+ "datatype": "http://www.w3.org/2001/XMLSchema#boolean",
388
+ "type": "literal",
389
+ "value": "true"
390
+ }
391
+ },
392
+ {
393
+ "log": {
394
+ "type": "bnode",
395
+ "value": "83222b124ff949648bd78ee778d22f601149"
396
+ },
397
+ "time": {
398
+ "datatype": "http://www.w3.org/2001/XMLSchema#dateTime",
399
+ "type": "literal",
400
+ "value": "2023-05-17T12:23:47.811+03:00"
401
+ },
402
+ "g": {
403
+ "type": "uri",
404
+ "value": "http://www.ontotext.com/implicit"
405
+ },
406
+ "s": {
407
+ "type": "uri",
408
+ "value": "urn:name"
409
+ },
410
+ "p": {
411
+ "type": "uri",
412
+ "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#type"
413
+ },
414
+ "o": {
415
+ "type": "uri",
416
+ "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#Property"
417
+ },
418
+ "i": {
419
+ "datatype": "http://www.w3.org/2001/XMLSchema#boolean",
420
+ "type": "literal",
421
+ "value": "true"
422
+ }
423
+ },
424
+ {
425
+ "log": {
426
+ "type": "bnode",
427
+ "value": "83222b124ff949648bd78ee778d22f601149"
428
+ },
429
+ "time": {
430
+ "datatype": "http://www.w3.org/2001/XMLSchema#dateTime",
431
+ "type": "literal",
432
+ "value": "2023-05-17T12:23:47.811+03:00"
433
+ },
434
+ "g": {
435
+ "type": "uri",
436
+ "value": "http://www.ontotext.com/implicit"
437
+ },
438
+ "s": {
439
+ "type": "uri",
440
+ "value": "urn:name"
441
+ },
442
+ "p": {
443
+ "type": "uri",
444
+ "value": "http://www.w3.org/2000/01/rdf-schema#subPropertyOf"
445
+ },
446
+ "o": {
447
+ "type": "uri",
448
+ "value": "urn:name"
449
+ },
450
+ "i": {
451
+ "datatype": "http://www.w3.org/2001/XMLSchema#boolean",
452
+ "type": "literal",
453
+ "value": "true"
454
+ }
455
+ },
456
+ {
457
+ "log": {
458
+ "type": "bnode",
459
+ "value": "83222b124ff949648bd78ee778d22f601149"
460
+ },
461
+ "time": {
462
+ "datatype": "http://www.w3.org/2001/XMLSchema#dateTime",
463
+ "type": "literal",
464
+ "value": "2023-05-17T12:23:47.811+03:00"
465
+ },
466
+ "g": {
467
+ "type": "uri",
468
+ "value": "http://www.ontotext.com/implicit"
469
+ },
470
+ "s": {
471
+ "type": "uri",
472
+ "value": "urn:rank"
473
+ },
474
+ "p": {
475
+ "type": "uri",
476
+ "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#type"
477
+ },
478
+ "o": {
479
+ "type": "uri",
480
+ "value": "http://www.w3.org/1999/02/22-rdf-syntax-ns#Property"
481
+ },
482
+ "i": {
483
+ "datatype": "http://www.w3.org/2001/XMLSchema#boolean",
484
+ "type": "literal",
485
+ "value": "true"
486
+ }
487
+ },
488
+ {
489
+ "log": {
490
+ "type": "bnode",
491
+ "value": "83222b124ff949648bd78ee778d22f601149"
492
+ },
493
+ "time": {
494
+ "datatype": "http://www.w3.org/2001/XMLSchema#dateTime",
495
+ "type": "literal",
496
+ "value": "2023-05-17T12:23:47.811+03:00"
497
+ },
498
+ "g": {
499
+ "type": "uri",
500
+ "value": "http://www.ontotext.com/implicit"
501
+ },
502
+ "s": {
503
+ "type": "uri",
504
+ "value": "urn:rank"
505
+ },
506
+ "p": {
507
+ "type": "uri",
508
+ "value": "http://www.w3.org/2000/01/rdf-schema#subPropertyOf"
509
+ },
510
+ "o": {
511
+ "type": "uri",
512
+ "value": "urn:rank"
513
+ },
514
+ "i": {
515
+ "datatype": "http://www.w3.org/2001/XMLSchema#boolean",
516
+ "type": "literal",
517
+ "value": "true"
518
+ }
519
+ }
520
+ ]
521
+ }
522
+ }
@@ -235,10 +235,10 @@ describe('Home screen validation', () => {
235
235
  const repositoryId = HomeSteps.createRepo();
236
236
  HomeSteps.selectRepo(repositoryId);
237
237
 
238
- HomeSteps.verifyQueryLink('Add statements', true, '/sparql?savedQueryName=Add%20statements&owner=admin&execute');
239
- HomeSteps.verifyQueryLink('Clear graph', true, '/sparql?savedQueryName=Clear%20graph&owner=admin&execute');
240
- HomeSteps.verifyQueryLink('Remove statements', true, '/sparql?savedQueryName=Remove%20statements&owner=admin&execute');
241
- HomeSteps.verifyQueryLink('SPARQL Select template', false, '/sparql?savedQueryName=SPARQL%20Select%20template&owner=admin&execute');
238
+ HomeSteps.verifyQueryLink('Add statements', true);
239
+ HomeSteps.verifyQueryLink('Clear graph', true);
240
+ HomeSteps.verifyQueryLink('Remove statements', true);
241
+ HomeSteps.verifyQueryLink('SPARQL Select template', false);
242
242
 
243
243
  cy.deleteRepository(repositoryId);
244
244
  });
@@ -377,10 +377,12 @@ describe('Repositories', () => {
377
377
  getOntologyFileField().should('be.visible');
378
378
  getPropertiesFileField().should('be.visible');
379
379
  getConstraintFileField().should('be.visible');
380
+ getLensesFileField().should('be.visible');
380
381
  getOBDAUploadButton().scrollIntoView().should('be.visible').and('not.be.disabled');
381
382
  getOntologyUploadButton().scrollIntoView().should('be.visible').and('not.be.disabled');
382
383
  getPropertiesUploadButton().scrollIntoView().should('be.visible').and('not.be.disabled');
383
384
  getConstraintUploadButton().scrollIntoView().should('be.visible').and('not.be.disabled');
385
+ getLensesUploadButton().scrollIntoView().should('be.visible').and('not.be.disabled');
384
386
  });
385
387
 
386
388
  //Create Ontop repository and test ontop functionality
@@ -435,6 +437,11 @@ describe('Repositories', () => {
435
437
  name: 'constraintFile',
436
438
  value: ''
437
439
  },
440
+ lensesFile: {
441
+ label: 'Lenses file',
442
+ name: 'lensesFile',
443
+ value: ''
444
+ },
438
445
  id: {
439
446
  label: 'Repository ID',
440
447
  name: 'id',
@@ -525,97 +532,49 @@ describe('Repositories', () => {
525
532
  testOntopConfigurationElementsVisibility('Additional Ontop/JDBC properties', '#additionalProperties');
526
533
  testOntopConfigurationElementsVisibility('OBDA or R2RML file*', '#obdaFile');
527
534
  testOntopConfigurationElementsVisibility('Constraint file', '#constraintFile');
535
+ testOntopConfigurationElementsVisibility('Lenses file', '#lensesFile');
528
536
  testOntopConfigurationElementsVisibility('Ontology file', '#owlFile');
529
537
 
530
538
  //Select MySQL driver type and verify elements and download url (if available)
531
- selectDatabaseDriver('MySQL');
532
- getDatabaseDriver().should('contain', 'MySQL');
533
-
534
- testOntopConfigurationElementsVisibility('Hostname*', '#hostName');
535
- testOntopConfigurationElementsVisibility('Port', '#port');
536
- testOntopConfigurationElementsVisibility('Database name*', '#databaseName');
537
- testOntopConfigurationElementsVisibility('Username*', '#userName');
538
- testOntopConfigurationElementsVisibility('Password', '#password');
539
- testOntopConfigurationElementsVisibility('Driver class', '#driverClass');
540
- testOntopConfigurationElementsVisibility('URL', '#url');
541
- testOntopConfigurationElementsVisibility('Additional Ontop/JDBC properties', '#additionalProperties');
542
- testOntopConfigurationElementsVisibility('OBDA or R2RML file*', '#obdaFile');
543
- testOntopConfigurationElementsVisibility('Constraint file', '#constraintFile');
544
- testOntopConfigurationElementsVisibility('Ontology file', '#owlFile');
545
- //verify driver download url
546
- compareDriverDownloadUrl('https://dev.mysql.com/downloads/connector/j/');
539
+ testOntopDriverConfigurations('MySQL', 'Hostname*', 'Database name*',
540
+ 'https://www.google.com/search?q=mysql+jdbc+download');
547
541
 
548
542
  //Select postgreSQL driver type and verify elements and download url (if available)
549
- selectDatabaseDriver('PostgreSQL');
550
- getDatabaseDriver().should('contain', 'PostgreSQL');
551
-
552
- testOntopConfigurationElementsVisibility('Hostname*', '#hostName');
553
- testOntopConfigurationElementsVisibility('Port', '#port');
554
- testOntopConfigurationElementsVisibility('Database name*', '#databaseName');
555
- testOntopConfigurationElementsVisibility('Username*', '#userName');
556
- testOntopConfigurationElementsVisibility('Password', '#password');
557
- testOntopConfigurationElementsVisibility('Driver class', '#driverClass');
558
- testOntopConfigurationElementsVisibility('URL', '#url');
559
- testOntopConfigurationElementsVisibility('Additional Ontop/JDBC properties', '#additionalProperties');
560
- testOntopConfigurationElementsVisibility('OBDA or R2RML file*', '#obdaFile');
561
- testOntopConfigurationElementsVisibility('Constraint file', '#constraintFile');
562
- testOntopConfigurationElementsVisibility('Ontology file', '#owlFile');
563
- //verify driver download url
564
- compareDriverDownloadUrl('https://jdbc.postgresql.org/download');
543
+ testOntopDriverConfigurations('PostgreSQL', 'Hostname*', 'Database name*',
544
+ 'https://www.google.com/search?q=postgresql+jdbc+download');
565
545
 
566
546
  //Select Oracle driver type and verify elements and download url (if available)
567
- selectDatabaseDriver('Oracle');
568
- getDatabaseDriver().should('contain', 'Oracle');
569
-
570
- testOntopConfigurationElementsVisibility('Hostname*', '#hostName');
571
- testOntopConfigurationElementsVisibility('Port', '#port');
572
- testOntopConfigurationElementsVisibility('Database name*', '#databaseName');
573
- testOntopConfigurationElementsVisibility('Username*', '#userName');
574
- testOntopConfigurationElementsVisibility('Password', '#password');
575
- testOntopConfigurationElementsVisibility('Driver class', '#driverClass');
576
- testOntopConfigurationElementsVisibility('URL', '#url');
577
- testOntopConfigurationElementsVisibility('Additional Ontop/JDBC properties', '#additionalProperties');
578
- testOntopConfigurationElementsVisibility('OBDA or R2RML file*', '#obdaFile');
579
- testOntopConfigurationElementsVisibility('Constraint file', '#constraintFile');
580
- testOntopConfigurationElementsVisibility('Ontology file', '#owlFile');
581
- //verify driver download url
582
- compareDriverDownloadUrl('https://www.cdata.com/drivers/oracledb/jdbc/');
547
+ testOntopDriverConfigurations('Oracle', 'Hostname*', 'Database name*',
548
+ 'https://www.google.com/search?q=oracle+jdbc+download');
583
549
 
584
550
  //Select MS SQL Server driver type and verify elements and download url (if available)
585
- selectDatabaseDriver('MS SQL Server');
586
- getDatabaseDriver().should('contain', 'MS SQL Server');
587
-
588
- testOntopConfigurationElementsVisibility('Hostname*', '#hostName');
589
- testOntopConfigurationElementsVisibility('Port', '#port');
590
- testOntopConfigurationElementsVisibility('Database name*', '#databaseName');
591
- testOntopConfigurationElementsVisibility('Username*', '#userName');
592
- testOntopConfigurationElementsVisibility('Password', '#password');
593
- testOntopConfigurationElementsVisibility('Driver class', '#driverClass');
594
- testOntopConfigurationElementsVisibility('URL', '#url');
595
- testOntopConfigurationElementsVisibility('Additional Ontop/JDBC properties', '#additionalProperties');
596
- testOntopConfigurationElementsVisibility('OBDA or R2RML file*', '#obdaFile');
597
- testOntopConfigurationElementsVisibility('Constraint file', '#constraintFile');
598
- testOntopConfigurationElementsVisibility('Ontology file', '#owlFile');
599
- //verify driver download url
600
- compareDriverDownloadUrl('https://docs.microsoft.com/en-us/sql/connect/jdbc/download-microsoft-jdbc-driver-for-sql-server');
551
+ testOntopDriverConfigurations('MS SQL Server', 'Hostname*', 'Database name*',
552
+ 'https://www.google.com/search?q=mssql+jdbc+download');
601
553
 
602
554
  //Select DB2 driver type and verify elements and download url (if available)
603
- selectDatabaseDriver('DB2');
604
- getDatabaseDriver().should('contain', 'DB2');
555
+ testOntopDriverConfigurations('DB2', 'Hostname*', 'Database name*',
556
+ 'https://www.google.com/search?q=db2+jdbc+download');
605
557
 
606
- testOntopConfigurationElementsVisibility('Hostname*', '#hostName');
607
- testOntopConfigurationElementsVisibility('Port', '#port');
608
- testOntopConfigurationElementsVisibility('Database name*', '#databaseName');
609
- testOntopConfigurationElementsVisibility('Username*', '#userName');
610
- testOntopConfigurationElementsVisibility('Password', '#password');
611
- testOntopConfigurationElementsVisibility('Driver class', '#driverClass');
612
- testOntopConfigurationElementsVisibility('URL', '#url');
613
- testOntopConfigurationElementsVisibility('Additional Ontop/JDBC properties', '#additionalProperties');
614
- testOntopConfigurationElementsVisibility('OBDA or R2RML file*', '#obdaFile');
615
- testOntopConfigurationElementsVisibility('Constraint file', '#constraintFile');
616
- testOntopConfigurationElementsVisibility('Ontology file', '#owlFile');
617
- //verify driver download url
618
- compareDriverDownloadUrl('https://www.ibm.com/support/pages/db2-jdbc-driver-versions-and-downloads');
558
+ //Select Dremio driver type and verify elements and download url (if available)
559
+ testOntopDriverConfigurations('Dremio', 'Hostname*', 'Schema*',
560
+ 'https://www.google.com/search?q=dremio+jdbc+download');
561
+
562
+ //Verify that the default settings work correctly
563
+ verifyDefaultConfigSettings('MySQL');
564
+
565
+ //Select Databricks driver type and verify elements and download url (if available)
566
+ testOntopDriverConfigurations('Databricks', 'Hostname*', 'HttpPath*',
567
+ 'https://www.google.com/search?q=databricks+jdbc+download');
568
+
569
+ //Verify that the default settings work correctly
570
+ verifyDefaultConfigSettings('MySQL');
571
+
572
+ //Select Snowflake driver type and verify elements and download url (if available)
573
+ testOntopDriverConfigurations('Snowflake', 'Account identifier*', 'Warehouse',
574
+ 'https://www.google.com/search?q=snowflake+jdbc+download');
575
+
576
+ //Verify that the default settings work correctly
577
+ verifyDefaultConfigSettings('MySQL');
619
578
  });
620
579
 
621
580
  it('should restart an existing repository', () => {
@@ -911,6 +870,10 @@ describe('Repositories', () => {
911
870
  return cy.get('div').contains("Constraint file");
912
871
  }
913
872
 
873
+ function getLensesFileField() {
874
+ return cy.get('div').contains("Lenses file");
875
+ }
876
+
914
877
  function getOBDAUploadButton() {
915
878
  return cy.get('span[for="obdaFile"]').contains("Upload file...");
916
879
  }
@@ -927,6 +890,10 @@ describe('Repositories', () => {
927
890
  return cy.get('span[for="constraintFile"]').contains("Upload file...");
928
891
  }
929
892
 
893
+ function getLensesUploadButton() {
894
+ return cy.get('span[for="lensesFile"]').contains("Upload file...");
895
+ }
896
+
930
897
  function getOntopFunctionalityDisabledMessage() {
931
898
  return cy.get('.repository-errors div.alert')
932
899
  .should('be.visible')
@@ -958,6 +925,34 @@ describe('Repositories', () => {
958
925
  });
959
926
  }
960
927
 
928
+ function verifyDefaultConfigSettings(driver) {
929
+ selectDatabaseDriver(driver);
930
+ getDatabaseDriver().should('contain', driver);
931
+
932
+ testOntopConfigurationElementsVisibility('Hostname*', '#hostName');
933
+ testOntopConfigurationElementsVisibility('Database name*', '#databaseName');
934
+ }
935
+
936
+ function testOntopDriverConfigurations(driver, hostName, databaseName, downloadLink) {
937
+ selectDatabaseDriver(driver);
938
+ getDatabaseDriver().should('contain', driver);
939
+
940
+ testOntopConfigurationElementsVisibility(hostName, '#hostName');
941
+ testOntopConfigurationElementsVisibility('Port', '#port');
942
+ testOntopConfigurationElementsVisibility(databaseName, '#databaseName');
943
+ testOntopConfigurationElementsVisibility('Username*', '#userName');
944
+ testOntopConfigurationElementsVisibility('Password', '#password');
945
+ testOntopConfigurationElementsVisibility('Driver class', '#driverClass');
946
+ testOntopConfigurationElementsVisibility('URL', '#url');
947
+ testOntopConfigurationElementsVisibility('Additional Ontop/JDBC properties', '#additionalProperties');
948
+ testOntopConfigurationElementsVisibility('OBDA or R2RML file*', '#obdaFile');
949
+ testOntopConfigurationElementsVisibility('Constraint file', '#constraintFile');
950
+ testOntopConfigurationElementsVisibility('Lenses file', '#lensesFile');
951
+ testOntopConfigurationElementsVisibility('Ontology file', '#owlFile');
952
+ //verify driver download url
953
+ compareDriverDownloadUrl(downloadLink);
954
+ }
955
+
961
956
  function compareDriverDownloadUrl(expectedUrl){
962
957
  cy.get('.uri')
963
958
  .should('be.visible')
@@ -0,0 +1,84 @@
1
+ import SparqlSteps from "../../steps/sparql-steps";
2
+ import {QueryStubs} from "../../stubs/query-stubs";
3
+
4
+ describe('Formatting of SPARQL result bindings.', () => {
5
+ let repositoryId;
6
+
7
+ beforeEach(() => {
8
+ repositoryId = 'sparql-' + Date.now();
9
+ SparqlSteps.createRepoAndVisit(repositoryId);
10
+ });
11
+
12
+ afterEach(() => {
13
+ cy.deleteRepository(repositoryId);
14
+ });
15
+
16
+ it('should format result cell properly if result binding is IRI', () => {
17
+ // When I execute a query that returns IRI result.
18
+ SparqlSteps.typeQuery('select * where { values (?x ) { (<http://example.com/foobarbaz/meow/123>) }}');
19
+ SparqlSteps.executeQuery();
20
+
21
+ // Then I expect "/" character and "://" sequence to be followed by <wbr> tag.
22
+ SparqlSteps.getResultCellLink(0, 1).then(function($el) {
23
+ expect($el.html()).to.eq('http://<wbr>example.com/<wbr>foobarbaz/<wbr>meow/<wbr>123');
24
+ });
25
+ // and break-word is applied,
26
+ SparqlSteps.getResultCellLink(0, 1).should('have.css', 'word-wrap', 'break-word');
27
+ SparqlSteps.getResultUriCell(0, 1).should('have.attr', 'lang', 'xx');
28
+ });
29
+
30
+ it('should format properly result cell if result binding is literal and has language tag', () => {
31
+ // When I execute a query that returns literal result.
32
+ SparqlSteps.typeQuery('select * where { values (?x ) { ("some text "@en-GB) }}');
33
+ SparqlSteps.executeQuery();
34
+
35
+ SparqlSteps.getResultNoUriCell(0, 1).then(function($el) {
36
+ expect($el.html()).to.eq('"some text "<sup>@en-GB</sup>');
37
+ });
38
+ // Then I expect break-word is applied,
39
+ SparqlSteps.getResultNoUriCell(0, 1).should('have.css', 'word-wrap', 'break-word');
40
+ // language attribute is applied.
41
+ SparqlSteps.getResultLiteralCell(0, 1).should('have.attr', 'lang', 'en-GB');
42
+ SparqlSteps.getResultLiteralCell(0, 1).should('have.css', 'hyphens', 'auto');
43
+ });
44
+
45
+ it('should format properly result cell if result binding is literal and has not language tag', () => {
46
+ // When I execute a query that returns literal result.
47
+ SparqlSteps.typeQuery('select * where { values (?x ) { ("some text ") }}');
48
+ SparqlSteps.executeQuery();
49
+
50
+ // Then I expect break-word is applied,
51
+ SparqlSteps.getResultNoUriCell(0, 1).should('have.css', 'word-wrap', 'break-word');
52
+ // language attribute is applied.
53
+ SparqlSteps.getResultLiteralCell(0, 1).should('have.attr', 'lang', 'xx');
54
+ SparqlSteps.getResultLiteralCell(0, 1).should('have.css', 'hyphens', 'auto');
55
+ });
56
+
57
+ it('should format result cell properly if result binding is literal and contains data type value', () => {
58
+ // When I execute a query that returns literal result.
59
+ SparqlSteps.typeQuery('select * where { values (?x ) { ("some text with data type 2.0^^xsd:floatsup") }}');
60
+ SparqlSteps.executeQuery();
61
+
62
+ // Then I expect "^^" to be prefixed with <wbr> tag,
63
+ SparqlSteps.getResultNoUriCell(0, 1).then(function($el) {
64
+ expect($el.html()).to.eq("\"some text with data type 2.0<wbr>^^xsd:<wbr>floatsup\"");
65
+ });
66
+
67
+ // and I expect break-word is applied,
68
+ SparqlSteps.getResultCell(0, 1).should('have.css', 'word-wrap', 'break-word');
69
+ // and language attribute is applied.
70
+ SparqlSteps.getResultLiteralCell(0, 1).should('have.attr', 'lang', 'xx');
71
+ SparqlSteps.getResultLiteralCell(0, 1).should('have.css', 'hyphens', 'auto');
72
+ });
73
+
74
+ it('should format bnode', () => {
75
+ // When I execute a query that returns bnode.
76
+ QueryStubs.stubSparqlHistoryResponse(repositoryId);
77
+ SparqlSteps.executeQuery();
78
+
79
+ // Then I expect the "_:" prefix of bnode to not be followed by <wbr> tag,
80
+ SparqlSteps.getResultNoUriCell(0, 1).then(function($el) {
81
+ expect($el.html()).to.eq('_:83222b124ff949648bd78ee778d22f601149');
82
+ });
83
+ });
84
+ });
@@ -88,7 +88,7 @@ describe('SPARQL screen validation', () => {
88
88
 
89
89
  it('Test modify default query', () => {
90
90
  // Run custom query returning 1001 results
91
- typeQuery(DEFAULT_QUERY_MODIFIED);
91
+ SparqlSteps.typeQuery(DEFAULT_QUERY_MODIFIED);
92
92
 
93
93
  verifyQueryAreaEquals(DEFAULT_QUERY_MODIFIED);
94
94
 
@@ -109,7 +109,7 @@ describe('SPARQL screen validation', () => {
109
109
  it('Test execute sparqlstar query', () => {
110
110
  cy.importServerFile(repositoryId, RDF_STAR_FILE_TO_IMPORT);
111
111
 
112
- typeQuery(SPARQL_STAR_QUERY);
112
+ SparqlSteps.typeQuery(SPARQL_STAR_QUERY);
113
113
 
114
114
  verifyQueryAreaEquals(SPARQL_STAR_QUERY);
115
115
 
@@ -119,9 +119,9 @@ describe('SPARQL screen validation', () => {
119
119
 
120
120
  verifyResultsPageLength(104);
121
121
 
122
- getTableResultRows().should('contain', '<<');
122
+ SparqlSteps.getTableResultRows().should('contain', '<<');
123
123
 
124
- getTableResultRows().should('contain', 'http://bigdata.com/RDF#bob');
124
+ SparqlSteps.getTableResultRows().should('contain', 'http://bigdata.com/RDF#bob');
125
125
  });
126
126
 
127
127
  it('Test execute sparqlstar select with bind query', () => {
@@ -129,7 +129,7 @@ describe('SPARQL screen validation', () => {
129
129
 
130
130
  let selectQuery = 'select * {bind (<<?s ?p ?o>> as ?t) .}';
131
131
 
132
- typeQuery(selectQuery);
132
+ SparqlSteps.typeQuery(selectQuery);
133
133
 
134
134
  verifyQueryAreaEquals(selectQuery);
135
135
 
@@ -139,9 +139,9 @@ describe('SPARQL screen validation', () => {
139
139
 
140
140
  verifyResultsPageLength(3);
141
141
 
142
- getTableResultRows().should('contain', '<<');
142
+ SparqlSteps.getTableResultRows().should('contain', '<<');
143
143
 
144
- getTableResultRows().should('contain', 'http://bigdata.com/RDF#bob');
144
+ SparqlSteps.getTableResultRows().should('contain', 'http://bigdata.com/RDF#bob');
145
145
  });
146
146
 
147
147
  it('Test execute sparqlstar insert query', () => {
@@ -149,7 +149,7 @@ describe('SPARQL screen validation', () => {
149
149
 
150
150
  let insertQuery = 'insert data {<<<urn:a> <urn:p> 1>> <urn:x> 2}';
151
151
 
152
- typeQuery(insertQuery);
152
+ SparqlSteps.typeQuery(insertQuery);
153
153
 
154
154
  verifyQueryAreaEquals(insertQuery);
155
155
 
@@ -168,7 +168,7 @@ describe('SPARQL screen validation', () => {
168
168
  let selectQuery = "PREFIX bd: <http://bigdata.com/RDF#>\nPREFIX foaf: <http://xmlns.com/foaf/0.1/>\n" +
169
169
  "select * where {<<bd:bob foaf:mbox <mailto:bob@home>>> ?p ?o .}";
170
170
 
171
- typeQuery(selectQuery);
171
+ SparqlSteps.typeQuery(selectQuery);
172
172
 
173
173
  verifyQueryAreaEquals(selectQuery);
174
174
 
@@ -178,7 +178,7 @@ describe('SPARQL screen validation', () => {
178
178
 
179
179
  verifyResultsPageLength(4);
180
180
 
181
- getTableResultRows().should('contain', 'http://hr.example.com/employees/bob');
181
+ SparqlSteps.getTableResultRows().should('contain', 'http://hr.example.com/employees/bob');
182
182
  });
183
183
 
184
184
  it('Test execute sparqlstar delete query and search for deleted triple', () => {
@@ -188,7 +188,7 @@ describe('SPARQL screen validation', () => {
188
188
  "PREFIX dc: <http://purl.org/dc/terms/>\nPREFIX re: <http://reasoner.example.com/engines#>\n" +
189
189
  "delete data {<<bd:alice foaf:knows bd:bob>> dc:source re:engine_1.}";
190
190
 
191
- typeQuery(deleteQuery);
191
+ SparqlSteps.typeQuery(deleteQuery);
192
192
 
193
193
  verifyQueryAreaEquals(deleteQuery);
194
194
 
@@ -204,7 +204,7 @@ describe('SPARQL screen validation', () => {
204
204
  "PREFIX dc: <http://purl.org/dc/terms/>\nPREFIX re: <http://reasoner.example.com/engines#>\n" +
205
205
  "select * where {<<bd:alice foaf:knows bd:bob>> dc:source re:engine_1.}";
206
206
 
207
- typeQuery(selectQuery);
207
+ SparqlSteps.typeQuery(selectQuery);
208
208
 
209
209
  verifyQueryAreaEquals(selectQuery);
210
210
 
@@ -232,15 +232,15 @@ describe('SPARQL screen validation', () => {
232
232
  cy.verifyResultsMessage('Showing results');
233
233
  cy.verifyResultsMessage('Query took');
234
234
 
235
- getResultsWrapper()
235
+ SparqlSteps.getResultsWrapper()
236
236
  .should('be.visible');
237
237
 
238
238
  getResultPages().should('have.length', 1);
239
239
  verifyResultsPageLength(9);
240
240
 
241
- getTableResultRows().should('contain', '<<');
241
+ SparqlSteps.getTableResultRows().should('contain', '<<');
242
242
 
243
- getTableResultRows().should('contain', 'http://bigdata.com/RDF#bob');
243
+ SparqlSteps.getTableResultRows().should('contain', 'http://bigdata.com/RDF#bob');
244
244
 
245
245
  // Confirm that all tabs Raw Response, Pivot Table, Google chart are enabled
246
246
  getTableResponseButton().should('be.visible').and('not.be.disabled');
@@ -252,7 +252,7 @@ describe('SPARQL screen validation', () => {
252
252
  it('Should check for XML star download format', () => {
253
253
  cy.importServerFile(repositoryId, RDF_STAR_FILE_TO_IMPORT);
254
254
 
255
- typeQuery(SPARQL_STAR_QUERY);
255
+ SparqlSteps.typeQuery(SPARQL_STAR_QUERY);
256
256
 
257
257
  verifyQueryAreaEquals(SPARQL_STAR_QUERY);
258
258
 
@@ -288,7 +288,7 @@ describe('SPARQL screen validation', () => {
288
288
  // Yasqe blows when inserting prefixes for some reason....
289
289
  disableExceptions();
290
290
 
291
- typeQuery(prefixQuery);
291
+ SparqlSteps.typeQuery(prefixQuery);
292
292
  });
293
293
 
294
294
  // Should have inserted the prefixes
@@ -298,7 +298,7 @@ describe('SPARQL screen validation', () => {
298
298
  SparqlSteps.executeQuery();
299
299
 
300
300
  cy.getResultsMessage();
301
- getResultsWrapper()
301
+ SparqlSteps.getResultsWrapper()
302
302
  .should('be.visible');
303
303
  });
304
304
 
@@ -311,7 +311,7 @@ describe('SPARQL screen validation', () => {
311
311
 
312
312
  cy.verifyResultsMessage('Showing results')
313
313
  cy.verifyResultsMessage('Query took');
314
- getResultsWrapper()
314
+ SparqlSteps.getResultsWrapper()
315
315
  .should('be.visible');
316
316
 
317
317
  // Confirm that all tabs Raw Response, Pivot Table, Google chart are enabled
@@ -353,7 +353,7 @@ describe('SPARQL screen validation', () => {
353
353
  SparqlSteps.executeQuery();
354
354
 
355
355
  cy.getResultsMessage();
356
- getResultsWrapper()
356
+ SparqlSteps.getResultsWrapper()
357
357
  .should('be.visible');
358
358
 
359
359
  // Confirm that all tabs (Table, Pivot Table, Google chart) are disabled
@@ -375,18 +375,18 @@ describe('SPARQL screen validation', () => {
375
375
  verifyResultsPageLength(44);
376
376
  cy.pasteQuery(LIST_TEXT_MINING_SERVICES);
377
377
  cy.executeQuery();
378
- getTableResultRows().should('contain', 'http://www.ontotext.com/textmining/instance#gateService');
378
+ SparqlSteps.getTableResultRows().should('contain', 'http://www.ontotext.com/textmining/instance#gateService');
379
379
  cy.pasteQuery(LIST_TEXT_MINING_INSTANCE_CONFIG);
380
380
  cy.executeQuery();
381
- getTableResultRows().should('contain', 'http://www.ontotext.com/textmining#Gate');
382
- getTableResultRows().should('contain', 'http://www.ontotext.com/textmining#connect');
383
- getTableResultRows().should('contain', 'https://cloud-api.gate.ac.uk');
381
+ SparqlSteps.getTableResultRows().should('contain', 'http://www.ontotext.com/textmining#Gate');
382
+ SparqlSteps.getTableResultRows().should('contain', 'http://www.ontotext.com/textmining#connect');
383
+ SparqlSteps.getTableResultRows().should('contain', 'https://cloud-api.gate.ac.uk');
384
384
  cy.pasteQuery(DROP_TEXT_MINING_INSTANCE);
385
385
  cy.executeQuery();
386
386
  cy.pasteQuery(LIST_TEXT_MINING_SERVICES);
387
387
  cy.executeQuery();
388
388
  getResultPages().should('have.length', 1);
389
- getTableResultRows().should('contain', 'No data available in table');
389
+ SparqlSteps.getTableResultRows().should('contain', 'No data available in table');
390
390
  });
391
391
  });
392
392
 
@@ -416,7 +416,7 @@ describe('SPARQL screen validation', () => {
416
416
  SparqlSteps.executeQuery();
417
417
 
418
418
  cy.verifyResultsMessage('1,000 of 7,065');
419
- getResultsWrapper()
419
+ SparqlSteps.getResultsWrapper()
420
420
  .should('be.visible');
421
421
  verifyResultsPageLength(1000);
422
422
 
@@ -574,7 +574,7 @@ describe('SPARQL screen validation', () => {
574
574
  SparqlSteps.executeQuery();
575
575
 
576
576
  // Wait until results are visible before verifying the download menu
577
- getResultsWrapper().should('be.visible');
577
+ SparqlSteps.getResultsWrapper().should('be.visible');
578
578
  verifyResultsPageLength(70);
579
579
 
580
580
  openDownloadAsMenu();
@@ -593,12 +593,12 @@ describe('SPARQL screen validation', () => {
593
593
  SparqlSteps.executeQuery();
594
594
 
595
595
  openRawResponse();
596
- getResultsWrapper()
596
+ SparqlSteps.getResultsWrapper()
597
597
  .find('.CodeMirror-code')
598
598
  .should('be.visible');
599
599
 
600
600
  openPivotTable();
601
- getResultsWrapper()
601
+ SparqlSteps.getResultsWrapper()
602
602
  .find('.pivotTable table.pvtUi')
603
603
  .should('be.visible');
604
604
 
@@ -606,7 +606,7 @@ describe('SPARQL screen validation', () => {
606
606
  disableExceptions();
607
607
 
608
608
  openGoogleChart();
609
- getResultsWrapper()
609
+ SparqlSteps.getResultsWrapper()
610
610
  .find('#yasr-inner_gchartWrapper .google-visualization-table')
611
611
  .should('be.visible');
612
612
  });
@@ -929,11 +929,11 @@ describe('SPARQL screen validation', () => {
929
929
 
930
930
  const expectedQuery = queryBegin + wineUri + queryEnd;
931
931
 
932
- clearQuery();
932
+ SparqlSteps.clearQuery();
933
933
 
934
- typeQuery(queryBegin, false);
934
+ SparqlSteps.typeQuery(queryBegin, false);
935
935
  // TODO: Need to test Alt-Enter too
936
- typeQuery('Dry' + Cypress.env('modifierKey') + ' ', false, true);
936
+ SparqlSteps.typeQuery('Dry' + Cypress.env('modifierKey') + ' ', false, true);
937
937
 
938
938
  getAutoSuggestHints()
939
939
  .should('be.visible')
@@ -942,13 +942,13 @@ describe('SPARQL screen validation', () => {
942
942
  .click()
943
943
  .should('not.exist');
944
944
 
945
- typeQuery(queryEnd, false);
945
+ SparqlSteps.typeQuery(queryEnd, false);
946
946
 
947
947
  verifyQueryAreaEquals(expectedQuery);
948
948
 
949
949
  SparqlSteps.executeQuery();
950
950
 
951
- getResultsWrapper().should('be.visible');
951
+ SparqlSteps.getResultsWrapper().should('be.visible');
952
952
 
953
953
  verifyResultsPageLength(10);
954
954
  });
@@ -957,11 +957,11 @@ describe('SPARQL screen validation', () => {
957
957
  repositoryId = 'sparql-' + Date.now();
958
958
  SparqlSteps.createRepoAndVisit(repositoryId);
959
959
 
960
- clearQuery();
960
+ SparqlSteps.clearQuery();
961
961
 
962
- typeQuery(queryBegin, false);
962
+ SparqlSteps.typeQuery(queryBegin, false);
963
963
  // TODO: Need to test Alt-Enter too
964
- typeQuery('Dry' + Cypress.env('modifierKey') + ' ', false, true);
964
+ SparqlSteps.typeQuery('Dry' + Cypress.env('modifierKey') + ' ', false, true);
965
965
 
966
966
  getAutoSuggestHints().should('not.exist');
967
967
  getToast()
@@ -976,12 +976,8 @@ describe('SPARQL screen validation', () => {
976
976
  const YASR_SELECTOR = '#yasr';
977
977
  const YASR_INNER_SELECTOR = '#yasr-inner';
978
978
 
979
- function getTableResultRows() {
980
- return getResultsWrapper().find('.resultsTable tbody tr');
981
- }
982
-
983
979
  function verifyResultsPageLength(resultLength) {
984
- getTableResultRows()
980
+ SparqlSteps.getTableResultRows()
985
981
  .should('have.length', resultLength);
986
982
  }
987
983
 
@@ -1072,27 +1068,10 @@ describe('SPARQL screen validation', () => {
1072
1068
  });
1073
1069
  }
1074
1070
 
1075
- function getQueryTextArea() {
1076
- return SparqlSteps.getQueryArea().find('textarea');
1077
- }
1078
-
1079
1071
  function getNoQueryRun() {
1080
1072
  return cy.get('#yasr-inner .no-query-run');
1081
1073
  }
1082
1074
 
1083
- function clearQuery() {
1084
- // Using force because the textarea is not visible
1085
- getQueryTextArea().type(Cypress.env('modifierKey') + 'a{backspace}', {force: true});
1086
- }
1087
-
1088
- function typeQuery(query, clear = true, parseSpecialCharSequences = false) {
1089
- if (clear) {
1090
- clearQuery();
1091
- }
1092
- // Using force because the textarea is not visible
1093
- getQueryTextArea().type(query, {force: true, parseSpecialCharSequences});
1094
- }
1095
-
1096
1075
  function goToPage(page) {
1097
1076
  getResultPages().contains(page).click();
1098
1077
  SparqlSteps.getLoader().should('not.exist');
@@ -1214,10 +1193,6 @@ describe('SPARQL screen validation', () => {
1214
1193
  return cy.get('#wb-sparql-copyToClipboardQuery');
1215
1194
  }
1216
1195
 
1217
- function getResultsWrapper() {
1218
- return cy.get('#yasr-inner .yasr_results');
1219
- }
1220
-
1221
1196
  function getResultsHeader() {
1222
1197
  return cy.get('#yasr .yasr_header');
1223
1198
  }
@@ -1248,7 +1223,7 @@ describe('SPARQL screen validation', () => {
1248
1223
  }
1249
1224
 
1250
1225
  function getBooleanResult() {
1251
- return getResultsWrapper().find('.booleanBootResult');
1226
+ return SparqlSteps.getResultsWrapper().find('.booleanBootResult');
1252
1227
  }
1253
1228
 
1254
1229
  function getResultsDownloadButton() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "graphdb-workbench-tests",
3
- "version": "2.3.0-TR6",
3
+ "version": "2.3.0-TR7",
4
4
  "description": "Cypress tests for GraphDB workbench",
5
5
  "scripts": {
6
6
  "start": "cypress open",
@@ -40,10 +40,9 @@ class HomeSteps {
40
40
  .click({force: true});
41
41
  }
42
42
 
43
- static verifyQueryLink(queryName, modifiesRepoModal, queryURL) {
43
+ static verifyQueryLink(queryName, modifiesRepoModal) {
44
44
  HomeSteps.selectSPARQLQueryToExecute(queryName);
45
45
  modifiesRepoModal ? cy.get('.modal-body').should('be.visible') : cy.get('.modal-body').should('not.exist');
46
- cy.url().should('eq', Cypress.config("baseUrl") + queryURL);
47
46
  HomeSteps.visitAndWaitLoader();
48
47
  }
49
48
 
@@ -149,6 +149,51 @@ class SparqlSteps {
149
149
  static getResultsDescription() {
150
150
  return cy.get('.results-description');
151
151
  }
152
+
153
+ static typeQuery(query, clear = true, parseSpecialCharSequences = false) {
154
+ if (clear) {
155
+ SparqlSteps.clearQuery();
156
+ }
157
+ // Using force because the textarea is not visible
158
+ SparqlSteps.getQueryTextArea().type(query, {force: true, parseSpecialCharSequences});
159
+ }
160
+
161
+ static clearQuery() {
162
+ // Using force because the textarea is not visible
163
+ SparqlSteps.getQueryTextArea().type(Cypress.env('modifierKey') + 'a{backspace}', {force: true});
164
+ }
165
+
166
+ static getQueryTextArea() {
167
+ return SparqlSteps.getQueryArea().find('textarea');
168
+ }
169
+
170
+ static getResultsWrapper() {
171
+ return cy.get('#yasr-inner .yasr_results');
172
+ }
173
+
174
+ static getTableResultRows() {
175
+ return SparqlSteps.getResultsWrapper().find('.resultsTable tbody tr');
176
+ }
177
+
178
+ static getResultCell(rowIndex, columnIndex) {
179
+ return SparqlSteps.getTableResultRows().eq(rowIndex).find('td').eq(columnIndex);
180
+ }
181
+
182
+ static getResultCellLink(rowIndex, columnIndex) {
183
+ return SparqlSteps.getResultCell(rowIndex, columnIndex).find('a').eq(0);
184
+ }
185
+
186
+ static getResultUriCell(rowIndex, columnIndex) {
187
+ return SparqlSteps.getResultCell(rowIndex, columnIndex).find('.uri-cell');
188
+ }
189
+
190
+ static getResultLiteralCell(rowIndex, columnIndex) {
191
+ return SparqlSteps.getResultCell(rowIndex, columnIndex).find('.literal-cell');
192
+ }
193
+
194
+ static getResultNoUriCell(rowIndex, columnIndex) {
195
+ return SparqlSteps.getResultCell(rowIndex, columnIndex).find('.nonUri');
196
+ }
152
197
  }
153
198
 
154
199
  export default SparqlSteps;
@@ -0,0 +1,9 @@
1
+ export class QueryStubs {
2
+
3
+ static stubSparqlHistoryResponse(repositoryId, withDelay = 0) {
4
+ QueryStubs.stubQueryResponse(`/repositories/${repositoryId}`, '/sparql/history-response.json', 'history-response', withDelay);
5
+ }
6
+ static stubQueryResponse(url, fixture, alias, withDelay = 0) {
7
+ cy.intercept(url, {fixture, delay: withDelay}).as(alias);
8
+ }
9
+ }