graphdb-workbench-tests 2.4.0-RC6 → 2.4.0-RC7
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.
|
@@ -269,6 +269,7 @@ describe('Similarity screen validation', () => {
|
|
|
269
269
|
|
|
270
270
|
function disableSimilarityPlugin() {
|
|
271
271
|
const disableSimilarityPluginQuery = 'INSERT DATA { <u:a> <http://www.ontotext.com/owlim/system#stopplugin> \'similarity\' . }';
|
|
272
|
+
cy.waitUntilQueryIsVisible();
|
|
272
273
|
cy.pasteQuery(disableSimilarityPluginQuery);
|
|
273
274
|
cy.executeQuery();
|
|
274
275
|
}
|
|
@@ -411,6 +412,7 @@ describe('Similarity screen validation', () => {
|
|
|
411
412
|
let shouldAnalogicalTabBeVisible = (isPredication ? '' : 'not.') + 'be.visible';
|
|
412
413
|
getAnalogicalQueryTab().should(shouldAnalogicalTabBeVisible);
|
|
413
414
|
if (isPredication) {
|
|
415
|
+
cy.waitUntilQueryIsVisible();
|
|
414
416
|
cy.verifyQueryAreaContains('SELECT ?entity ?score {');
|
|
415
417
|
}
|
|
416
418
|
}
|
|
@@ -421,6 +423,7 @@ describe('Similarity screen validation', () => {
|
|
|
421
423
|
'filter(isLiteral(?documentText)) \n' +
|
|
422
424
|
'}order by asc(str(?documentID))';
|
|
423
425
|
|
|
426
|
+
cy.waitUntilQueryIsVisible();
|
|
424
427
|
cy.pasteQuery(MODIFIED_DATA_QUERY);
|
|
425
428
|
cy.get('.test-query-btn').click();
|
|
426
429
|
cy.get('.sparql-loader').should('not.exist');
|
|
@@ -430,6 +433,7 @@ describe('Similarity screen validation', () => {
|
|
|
430
433
|
|
|
431
434
|
function changeSearchQuery() {
|
|
432
435
|
getSearchQueryTab().scrollIntoView().should('be.visible').click();
|
|
436
|
+
cy.waitUntilQueryIsVisible();
|
|
433
437
|
cy.pasteQuery(MODIFIED_SEARCH_QUERY);
|
|
434
438
|
}
|
|
435
439
|
|
|
@@ -438,6 +442,7 @@ describe('Similarity screen validation', () => {
|
|
|
438
442
|
.scrollIntoView()
|
|
439
443
|
.should('be.visible').click()
|
|
440
444
|
.then(() => {
|
|
445
|
+
cy.waitUntilQueryIsVisible();
|
|
441
446
|
cy.pasteQuery(MODIFIED_ANALOGICAL_QUERY);
|
|
442
447
|
});
|
|
443
448
|
}
|
|
@@ -476,6 +481,7 @@ describe('Similarity screen validation', () => {
|
|
|
476
481
|
|
|
477
482
|
function verifyQueryIsChanged() {
|
|
478
483
|
const query = 'OPTIONAL { ?result <http://dbpedia.org/ontology/birthPlace> ?birthDate .';
|
|
484
|
+
cy.waitUntilQueryIsVisible();
|
|
479
485
|
cy.verifyQueryAreaContains(query);
|
|
480
486
|
}
|
|
481
487
|
});
|
|
@@ -128,12 +128,12 @@ describe('My Settings', () => {
|
|
|
128
128
|
|
|
129
129
|
//clear default query and paste a new one that will generate more than 1000 results
|
|
130
130
|
cy.get('#queryEditor .CodeMirror').find('textarea')
|
|
131
|
-
.type(Cypress.env('modifierKey') + 'a{backspace}', {force: true})
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
131
|
+
.type(Cypress.env('modifierKey') + 'a{backspace}', {force: true});
|
|
132
|
+
|
|
133
|
+
cy.get('#queryEditor .CodeMirror').find('textarea')
|
|
134
|
+
.invoke('val', testResultCountQuery).trigger('change', {force: true})
|
|
135
|
+
cy.waitUntilQueryIsVisible();
|
|
136
|
+
cy.verifyQueryAreaContains(testResultCountQuery);
|
|
137
137
|
|
|
138
138
|
cy.get('#wb-sparql-runQuery')
|
|
139
139
|
.should('be.visible')
|
|
@@ -225,6 +225,7 @@ describe('SPARQL screen validation', () => {
|
|
|
225
225
|
|
|
226
226
|
let describeQuery = 'describe ?t {bind (<<?s ?p ?o>> as ?t) .}';
|
|
227
227
|
|
|
228
|
+
cy.waitUntilQueryIsVisible();
|
|
228
229
|
cy.pasteQuery(describeQuery);
|
|
229
230
|
|
|
230
231
|
SparqlSteps.executeQuery();
|
|
@@ -305,6 +306,7 @@ describe('SPARQL screen validation', () => {
|
|
|
305
306
|
it('Test execute (Describe) query', () => {
|
|
306
307
|
let describeQuery = 'DESCRIBE <http://www.ontotext.com/SYSINFO> FROM <http://www.ontotext.com/SYSINFO>';
|
|
307
308
|
|
|
309
|
+
cy.waitUntilQueryIsVisible();
|
|
308
310
|
cy.pasteQuery(describeQuery);
|
|
309
311
|
|
|
310
312
|
SparqlSteps.executeQuery();
|
|
@@ -332,6 +334,7 @@ describe('SPARQL screen validation', () => {
|
|
|
332
334
|
it('Test execute (ASK) query', () => {
|
|
333
335
|
let askQuery = 'ASK WHERE { ?s ?p ?o .FILTER (regex(?o, "ontotext.com")) }';
|
|
334
336
|
|
|
337
|
+
cy.waitUntilQueryIsVisible();
|
|
335
338
|
cy.pasteQuery(askQuery);
|
|
336
339
|
SparqlSteps.executeQuery();
|
|
337
340
|
|
|
@@ -347,6 +350,7 @@ describe('SPARQL screen validation', () => {
|
|
|
347
350
|
// This test depends on external service http://factforge.net/repositories/ff-news which can occasionally fail.
|
|
348
351
|
it.skip('Test execute (CONSTRUCT) query', () => {
|
|
349
352
|
cy.fixture('queries/construct-query.sparql').then(constructQuery => {
|
|
353
|
+
cy.waitUntilQueryIsVisible();
|
|
350
354
|
cy.pasteQuery(constructQuery);
|
|
351
355
|
});
|
|
352
356
|
|
|
@@ -367,6 +371,7 @@ describe('SPARQL screen validation', () => {
|
|
|
367
371
|
});
|
|
368
372
|
|
|
369
373
|
it('should test text mining plugin', () => {
|
|
374
|
+
cy.waitUntilQueryIsVisible();
|
|
370
375
|
cy.pasteQuery(GATE_CLIENT_CREATE_QUERY);
|
|
371
376
|
cy.executeQuery();
|
|
372
377
|
cy.pasteQuery(GATE_CLIENT_SEARCH_QUERY);
|
|
@@ -412,6 +417,7 @@ describe('SPARQL screen validation', () => {
|
|
|
412
417
|
'\t?s ?p ?o .\n' +
|
|
413
418
|
'}';
|
|
414
419
|
|
|
420
|
+
cy.waitUntilQueryIsVisible();
|
|
415
421
|
cy.pasteQuery(defaultQueryWithoutLimit);
|
|
416
422
|
SparqlSteps.executeQuery();
|
|
417
423
|
|
|
@@ -446,6 +452,7 @@ describe('SPARQL screen validation', () => {
|
|
|
446
452
|
' :a ?p ?o .\n' +
|
|
447
453
|
'}';
|
|
448
454
|
|
|
455
|
+
cy.waitUntilQueryIsVisible();
|
|
449
456
|
cy.pasteQuery(updateToExecute);
|
|
450
457
|
SparqlSteps.executeQuery();
|
|
451
458
|
getUpdateMessage()
|
|
@@ -687,6 +694,7 @@ describe('SPARQL screen validation', () => {
|
|
|
687
694
|
it('Test create, edit and delete saved query', () => {
|
|
688
695
|
let savedQueryName = 'Saved query - ' + Date.now();
|
|
689
696
|
|
|
697
|
+
cy.waitUntilQueryIsVisible();
|
|
690
698
|
cy.pasteQuery(QUERY_FOR_SAVING);
|
|
691
699
|
|
|
692
700
|
saveQuery();
|
|
@@ -885,6 +893,7 @@ describe('SPARQL screen validation', () => {
|
|
|
885
893
|
|
|
886
894
|
it('Test URL to current query', () => {
|
|
887
895
|
const query = 'SELECT ?sub ?pred ?obj WHERE {?sub ?pred ?obj .} LIMIT 100';
|
|
896
|
+
cy.waitUntilQueryIsVisible();
|
|
888
897
|
cy.pasteQuery(query);
|
|
889
898
|
|
|
890
899
|
// Press the link icon to generate a link for a query
|
package/package.json
CHANGED
|
@@ -20,8 +20,8 @@ Cypress.Commands.add('verifyResultsPageLength', (resultLength) => {
|
|
|
20
20
|
|
|
21
21
|
Cypress.Commands.add('verifyResultsMessage', (msg) => {
|
|
22
22
|
cy.waitUntil(() =>
|
|
23
|
-
getResultsMessage()
|
|
24
|
-
|
|
23
|
+
getResultsMessage().then((resultInfo) => resultInfo && resultInfo.text().trim().length > 0));
|
|
24
|
+
getResultsMessage().should('contain', msg);
|
|
25
25
|
});
|
|
26
26
|
|
|
27
27
|
Cypress.Commands.add('getResultsMessage', () => {
|
|
@@ -60,10 +60,11 @@ function waitUntilQueryIsVisible() {
|
|
|
60
60
|
}
|
|
61
61
|
|
|
62
62
|
function verifyQueryAreaContains(query) {
|
|
63
|
-
// Using the CodeMirror instance because getting the value from the DOM is very cumbersome
|
|
64
63
|
cy.waitUntil(() =>
|
|
65
64
|
getQueryArea()
|
|
66
|
-
.then(codeMirrorEl => codeMirrorEl && codeMirrorEl[0].CodeMirror.getValue()
|
|
65
|
+
.then(codeMirrorEl => codeMirrorEl && typeof codeMirrorEl[0].CodeMirror.getValue() === 'string'));
|
|
66
|
+
// Using the CodeMirror instance because getting the value from the DOM is very cumbersome
|
|
67
|
+
getQueryArea().then(codeMirrorEl => codeMirrorEl && codeMirrorEl[0].CodeMirror.getValue()).should('contain', query);
|
|
67
68
|
}
|
|
68
69
|
|
|
69
70
|
function getRunQueryButton() {
|