graphdb-workbench-tests 3.3.3 → 3.4.0-SPARQL12-TR1

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.
Files changed (74) hide show
  1. package/cypress-flaky.config.js +2 -0
  2. package/cypress-legacy.config.js +2 -2
  3. package/cypress-security.config.js +3 -14
  4. package/e2e-flaky/import/import-server-files-operations.spec.js +1 -1
  5. package/e2e-flaky/import/import-user-data-batch-operations.spec.js +1 -1
  6. package/e2e-flaky/setup/sparql-template-create.js +3 -18
  7. package/e2e-flaky/sparql-editor/actions/execute-update-query.spec.js +2 -12
  8. package/e2e-flaky/sparql-editor/actions/share-query.spec.js +1 -7
  9. package/e2e-flaky/sparql-editor/yasr/table-plugin.spec.js +1 -6
  10. package/e2e-legacy/cluster/cluster-states.spec.js +3 -3
  11. package/e2e-legacy/explore/visual-graph/node-info-panel.spec.js +58 -0
  12. package/e2e-legacy/explore/visual-graph/visual-graph-links-limit.spec.js +142 -0
  13. package/e2e-legacy/explore/visual-graph/visual.graph.spec.js +57 -85
  14. package/e2e-legacy/guides/execute-sparql-query/execute-sparql-query-guide.spec.js +92 -0
  15. package/e2e-legacy/guides/import-rdf-file/confirm-duplicate-rdf-file.spec.js +63 -0
  16. package/e2e-legacy/guides/import-rdf-file/import-rdf-file.spec.js +105 -0
  17. package/e2e-legacy/guides/navigation/navigation-guide.spec.js +64 -0
  18. package/e2e-legacy/guides/rdf-rank/rdf-rank-guide.spec.js +42 -0
  19. package/e2e-legacy/guides/table-graph-explore/table-graph-explore-guide.spec.js +168 -0
  20. package/e2e-legacy/guides/ttyg/configure-agent/configure-agent-guide.spec.js +34 -26
  21. package/e2e-legacy/guides/ttyg/edit-agent/edit-ttyg-agent-guide.spec.js +2 -2
  22. package/e2e-legacy/guides/visual-graph/visual-graph-guide.spec.js +372 -0
  23. package/e2e-legacy/guides/welcome/welcome-guide.spec.js +36 -0
  24. package/e2e-legacy/help/guides/guides-autostart.spec.js +36 -3
  25. package/e2e-legacy/help/guides/guides-confirm-cancel-dialog.js +83 -0
  26. package/e2e-legacy/help/guides/movies-interactive-guide.spec.js +47 -49
  27. package/e2e-legacy/repository/url-with-repository-id-parameter.spec.js +1 -0
  28. package/e2e-legacy/resource/resource.spec.js +34 -19
  29. package/e2e-legacy/setup/aclmanagement/acl-management-with-selected repository.spec.js +44 -0
  30. package/e2e-legacy/setup/aclmanagement/create-rule.spec.js +3 -0
  31. package/e2e-legacy/setup/connectors-lucene.spec.js +24 -8
  32. package/e2e-legacy/sparql-editor/actions/expand-results-over-sameas.spec.js +1 -1
  33. package/e2e-legacy/sparql-editor/actions/show-saved-queries.spec.js +1 -6
  34. package/e2e-legacy/sparql-editor/yasgui-tabs.spec.js +2 -12
  35. package/e2e-legacy/sparql-editor/yasr/pagination.spec.js +5 -18
  36. package/e2e-legacy/sparql-editor/yasr/table-plugin.spec.js +1 -6
  37. package/e2e-legacy/sparql-editor/yasr/toolbar/visual-graph-button.spec.js +90 -41
  38. package/e2e-legacy/sparql-editor/yasr/yasr.spec.js +80 -0
  39. package/e2e-legacy/ttyg/chat-list.spec.js +2 -12
  40. package/e2e-legacy/ttyg/create-agent.spec.js +8 -48
  41. package/e2e-legacy/ttyg/edit-agent.spec.js +2 -12
  42. package/e2e-security/setup/users-and-access/turn-on-security-and-password-change.spec.js +73 -61
  43. package/fixtures/graph/graph-configurations.json +59 -0
  44. package/fixtures/guides/confirm-cancel-dialog/confirm-cancel-dialog-guide.json +15 -0
  45. package/fixtures/guides/execute-sparql-query/execute-sparql-query-guide.json +54 -0
  46. package/fixtures/guides/import-rdf-file/confirm-duplicate-rdf-file-guide.json +30 -0
  47. package/fixtures/guides/import-rdf-file/import-rdf-file-guide.json +21 -0
  48. package/fixtures/guides/navigation/navigation-guide.json +60 -0
  49. package/fixtures/guides/rdf-rank/rdf-rank-guide.json +18 -0
  50. package/fixtures/guides/table-graph-explore/table-graph-explore-guide.json +51 -0
  51. package/fixtures/guides/table-graph-explore/table-graph-explore-without-substeps-guide.json +25 -0
  52. package/fixtures/guides/ttyg/configure-agent/configure-ttyg-agent-guide.json +6 -1
  53. package/fixtures/guides/visual-graph/visual-graph-config-guide.json +39 -0
  54. package/fixtures/guides/visual-graph/visual-graph-guide.json +85 -0
  55. package/fixtures/guides/welcome/welcome-guide.json +18 -0
  56. package/npm-shrinkwrap.json +332 -279
  57. package/package.json +1 -1
  58. package/steps/guides/guide-dialog-steps.js +60 -2
  59. package/steps/guides/movies-guide-steps.js +2 -1
  60. package/steps/main-menu-steps.js +1 -0
  61. package/steps/repository-steps.js +24 -0
  62. package/steps/resource/resource-steps.js +0 -8
  63. package/steps/setup/acl-management-steps.js +16 -0
  64. package/steps/sparql-editor-steps.js +18 -4
  65. package/steps/sparql-steps.js +13 -1
  66. package/steps/ttyg/ttyg-agent-settings-modal.steps.js +1 -1
  67. package/steps/visual-graph-split-button-steps.js +45 -0
  68. package/steps/visual-graph-steps.js +80 -2
  69. package/steps/yasgui/yasqe-steps.js +29 -4
  70. package/steps/yasgui/yasr-steps.js +31 -5
  71. package/stubs/graph-config-stubs.js +17 -0
  72. package/stubs/guides/guides-stubs.js +41 -1
  73. package/support/commands.js +1 -0
  74. package/support/url-commands.js +13 -0
@@ -26,9 +26,9 @@ describe('Visual graph screen validation', () => {
26
26
  cy.deleteRepository(repositoryId);
27
27
  });
28
28
 
29
- context('Embedded', () => {
29
+ describe('Embedded', () => {
30
30
  it('Should not show main manu, header and footer in embedded mode', () => {
31
- cy.visit('/graphs-visualizations?uri=http:%2F%2Fwww.w3.org%2FTR%2F2003%2FPR-owl-guide-20031209%2Fwine%23Chardonnay&embedded')
31
+ cy.visit('/graphs-visualizations?uri=http:%2F%2Fwww.w3.org%2FTR%2F2003%2FPR-owl-guide-20031209%2Fwine%23Chardonnay&embedded');
32
32
  VisualGraphSteps.verifyPageLoaded();
33
33
  MainMenuSteps.getMainMenu().should('not.exist');
34
34
  HomeSteps.getPageFooter().should('not.exist');
@@ -36,7 +36,7 @@ describe('Visual graph screen validation', () => {
36
36
  });
37
37
  });
38
38
 
39
- context('When autocomplete is disabled', () => {
39
+ describe('When autocomplete is disabled', () => {
40
40
  it('Test notification when autocomplete is disabled', () => {
41
41
  cy.visit('graphs-visualizations');
42
42
  cy.window();
@@ -50,7 +50,7 @@ describe('Visual graph screen validation', () => {
50
50
  });
51
51
  });
52
52
 
53
- context('When autocomplete is enabled', () => {
53
+ describe('When autocomplete is enabled', () => {
54
54
  beforeEach(() => {
55
55
  cy.enableAutocomplete(repositoryId);
56
56
  //http://localhost:9000/graphs-visualizations?uri=http:%2F%2Fwww.w3.org%2FTR%2F2003%2FPR-owl-guide-20031209%2Fwine%23USRegion
@@ -66,12 +66,7 @@ describe('Visual graph screen validation', () => {
66
66
  ApplicationSteps.getErrorNotifications().should('be.visible').and('contain', 'Invalid IRI');
67
67
  });
68
68
 
69
- it('Test search for a valid resource', {
70
- retries: {
71
- openMode: 0,
72
- runMode: 1,
73
- },
74
- }, () => {
69
+ it('Test search for a valid resource', () => {
75
70
  AutocompleteStubs.spyAutocompleteStatus();
76
71
  VisualGraphSteps.visit();
77
72
  // Verify autocomplete is ON, because sometimes in CI it is OFF and fails when searching for Resource
@@ -89,12 +84,12 @@ describe('Visual graph screen validation', () => {
89
84
 
90
85
  it('Test default graph state', () => {
91
86
  VisualGraphSteps.openUSRegionUri();
92
- VisualGraphSteps.openVisualGraphSettings();
87
+ // Verify that the default settings are as follows:
88
+ // Maximum links to show: 100
89
+ VisualGraphSteps.getLinksNumberField().and('have.value', '100');
93
90
 
91
+ VisualGraphSteps.openVisualGraphSettings();
94
92
  cy.get('.filter-sidepanel').as('sidepanel').should('be.visible').within(() => {
95
- // Verify that the default settings are as follows:
96
- // Maximum links to show: 20
97
- VisualGraphSteps.getLinksNumberField().and('have.value', '20');
98
93
  // Preferred lang: en
99
94
  cy.get('.preferred-languages .tag-item').should('have.length', 1)
100
95
  .and('contain', 'en');
@@ -131,32 +126,17 @@ describe('Visual graph screen validation', () => {
131
126
 
132
127
  it('Test invalid links limit should show error to user ', () => {
133
128
  VisualGraphSteps.openUSRegionUri();
134
- VisualGraphSteps.openVisualGraphSettings();
135
-
136
- cy.get('.filter-sidepanel').as('sidepanel').should('be.visible').within(() => {
137
- // Verify that the default settings are as follows:
138
- // Maximum links to show: 20
139
- VisualGraphSteps.getLinksNumberField().and('have.value', '20');
140
- // Update default 20
141
- VisualGraphSteps.updateLinksLimitField('1001')
142
- .then(() => {
143
- // Try to put invalid value such as 1001
144
- cy.get('.idError')
145
- .should('be.visible')
146
- .and('contain.text', 'Invalid links limit');
147
- });
148
- // Try to save the invalid value
149
- VisualGraphSteps.getSaveSettingsButton().and('not.be.disabled')
150
- .click();
151
- // Then reset to default settings
152
- VisualGraphSteps.getResetSettingsButton().and('not.be.disabled')
153
- .click()
154
- .then(() => {
155
- VisualGraphSteps.getLinksNumberField().and('have.value', '20');
156
- cy.get('.idError')
157
- .should('not.exist');
158
- });
159
- });
129
+ // Verify that the default settings are as follows:
130
+ // Maximum links to show: 100
131
+ VisualGraphSteps.getLinksNumberField().and('have.value', '100');
132
+ // Update default 100
133
+ VisualGraphSteps.updateLinksLimitField('1001')
134
+ .then(() => {
135
+ // Try to put invalid value such as 1001
136
+ cy.get('.idError')
137
+ .should('be.visible')
138
+ .and('contain.text', 'Enter a number up to 1000');
139
+ });
160
140
  });
161
141
 
162
142
  it('Test search for a valid resource with links', () => {
@@ -167,10 +147,10 @@ describe('Visual graph screen validation', () => {
167
147
  VisualGraphSteps.openVisualGraphHome();
168
148
  // Search for "USRegion" again
169
149
  VisualGraphSteps.searchForResourceAndOpen(VALID_RESOURCE, VALID_RESOURCE);
170
- // Verify that 20 links (nodes) are displayed
171
- VisualGraphSteps.getPredicates().should('have.length', 20);
150
+ // Verify that 36 links (nodes) are displayed
151
+ VisualGraphSteps.getPredicates().should('have.length', 36);
172
152
  // Verify that links are counted by nodes and not by triples (predicates)
173
- VisualGraphSteps.getNodes().and('have.length', 21);
153
+ VisualGraphSteps.getNodes().and('have.length', 37);
174
154
  });
175
155
 
176
156
  it('Test collapse and expand a node', () => {
@@ -218,6 +198,7 @@ describe('Visual graph screen validation', () => {
218
198
  // Verify that before given node is removed there are 4 of them
219
199
  VisualGraphSteps.getNodes().and('have.length', 4);
220
200
  // Click once on node different than parent one with the mouse
201
+ // eslint-disable-next-line cypress/no-unnecessary-waiting
221
202
  cy.get('.node-wrapper circle').eq(1)
222
203
  // The wait is needed because mouseover event will result in
223
204
  // pop-up of menu icons only if nodes are not moving
@@ -269,34 +250,34 @@ describe('Visual graph screen validation', () => {
269
250
  });
270
251
 
271
252
  it('Test verify mouse/keyboard actions', () => {
272
- const mouseActions = 'Mouse actions\n ' +
273
- '\n \n \n \n ' +
274
- 'Single click\n \n ' +
275
- 'View node details and properties\n \n \n \n ' +
276
- 'Double click\n \n ' +
277
- 'Load node connections\n \n \n \n ' +
278
- 'Ctrl/Cmd-click\n \n ' +
279
- 'Removes a node and its links\n \n \n \n ' +
280
- 'Ctrl/Cmd-Shift-click\n \n ' +
281
- 'Restart the view with that node as a central one\n \n \n \n ' +
282
- 'Click and drag a node\n \n ' +
283
- 'Move a node by dragging it (will also pin down the node)\n \n \n \n ' +
284
- 'Right click a node\n \n ' +
285
- 'Pin down or unpin the node\n \n \n \n ' +
286
- 'Click and drag outside a node\n \n ' +
287
- 'Move the whole graph\n';
288
- const touchActions = 'Touch actions\n \n \n \n \n ' +
289
- 'Tap\n \n ' +
290
- 'View node details and properties\n \n \n \n ' +
291
- 'Tap and hold\n \n ' +
292
- 'Removes a node and its links\n \n \n \n ' +
293
- 'Tap twice\n \n ' +
294
- 'Load node connections\n';
295
- const keyboardActions = 'Keyboard actions\n \n \n \n ' +
296
- 'Left arrow\n \n ' +
297
- 'Rotate the graph to the left\n \n \n \n ' +
298
- 'Right arrow\n \n ' +
299
- 'Rotate the graph to the right\n';
253
+ const mouseActions = 'MOUSE ACTIONS\n \n \n ' +
254
+ 'Single click\n ' +
255
+ 'View node details and properties\n \n \n ' +
256
+ 'Double click\n ' +
257
+ 'Load node connections\n \n \n ' +
258
+ 'Ctrl|Cmd\n ' +
259
+ 'Click\n ' +
260
+ 'Removes a node and its links\n \n \n ' +
261
+ 'Ctrl|Cmd\n ' +
262
+ 'Shift\n ' +
263
+ 'Click\n ' +
264
+ 'Restart the view with that node as a central one\n \n \n ' +
265
+ 'Click and drag a node\n ' +
266
+ 'Move a node by dragging it (will also pin down the node)\n \n \n ' +
267
+ 'Right click a node\n ' +
268
+ 'Pin down or unpin the node\n \n \n ' +
269
+ 'Click and drag outside a node\n ' +
270
+ 'Move the whole graph\n \n \n \n \n';
271
+ const touchActions = 'TOUCH ACTIONS\n \n \n ' +
272
+ 'Tap\n ' +
273
+ 'View node details and properties\n \n \n ' +
274
+ 'Tap and hold\n ' +
275
+ 'Removes a node and its links\n \n \n ' +
276
+ 'Tap twice\n ' +
277
+ 'Load node connections\n \n \n \n \n';
278
+ const keyboardActions = 'KEYBOARD ACTIONS\n \n \n \n ' +
279
+ 'Rotate the graph to the left\n \n \n \n ' +
280
+ 'Rotate the graph to the right\n \n \n \n \n \n';
300
281
 
301
282
  VisualGraphSteps.openUSRegionUri();
302
283
  // Click on "mouse and keyboard actions" in the lower right corner of the screen
@@ -316,20 +297,16 @@ describe('Visual graph screen validation', () => {
316
297
  it('Test maximum links to show', () => {
317
298
  VisualGraphSteps.openUSRegionUri();
318
299
 
319
- // Verify that 20 links (nodes) are displayed
320
- VisualGraphSteps.getPredicates().should('have.length', 20);
300
+ // Verify that 36 links (nodes) are displayed
301
+ VisualGraphSteps.getPredicates().should('have.length', 36);
321
302
 
322
- VisualGraphSteps.openVisualGraphSettings();
323
303
  // Set maximum links to 2
324
304
  VisualGraphSteps.updateLinksLimitField('2');
325
- VisualGraphSteps.saveSettings();
326
305
  // Verify that the diagram is updated
327
306
  VisualGraphSteps.getPredicates().should('have.length', 2);
328
307
 
329
- VisualGraphSteps.openVisualGraphSettings();
330
308
  // Set maximum links to 100
331
309
  VisualGraphSteps.updateLinksLimitField('100');
332
- VisualGraphSteps.saveSettings();
333
310
  // Verify that the diagram is updated
334
311
  VisualGraphSteps.getPredicates().should('have.length', 36);
335
312
  });
@@ -340,10 +317,10 @@ describe('Visual graph screen validation', () => {
340
317
  VisualGraphSteps.toggleInferredStatements(true);
341
318
 
342
319
  // Verify that many results are displayed
343
- // Verify that 20 links (nodes) are displayed
344
- VisualGraphSteps.getPredicates().should('have.length', 20);
320
+ // Verify that 36 links (nodes) are displayed
321
+ VisualGraphSteps.getPredicates().should('have.length', 36);
345
322
  // Verify that more than three nodes are displayed
346
- VisualGraphSteps.getNodes().and('have.length', 21);
323
+ VisualGraphSteps.getNodes().and('have.length', 37);
347
324
 
348
325
  // Switch Include Inferred Statements off
349
326
  VisualGraphSteps.toggleInferredStatements(false);
@@ -439,9 +416,6 @@ describe('Visual graph screen validation', () => {
439
416
  // Modify the settings first
440
417
  VisualGraphSteps.openVisualGraphSettings();
441
418
  // Verify that the default settings are as follows:
442
- // Maximum links to show: 20
443
- VisualGraphSteps.updateLinksLimitField('10')
444
- .should('have.value', '10');
445
419
  // Preferred lang: en
446
420
  cy.get('.preferred-languages .tag-item').should('have.length', 1)
447
421
  .eq(0).should('contain', 'en');
@@ -482,8 +456,6 @@ describe('Visual graph screen validation', () => {
482
456
 
483
457
  VisualGraphSteps.openVisualGraphSettings();
484
458
  // Verify that the default settings are as follows:
485
- // Maximum links to show: 20
486
- VisualGraphSteps.getLinksNumberField().and('have.value', '20');
487
459
  // Preferred lang: en
488
460
  cy.get('.preferred-languages .tag-item').should('have.length', 1);
489
461
  // Include inferred: false
@@ -0,0 +1,92 @@
1
+ import {GuideSteps} from '../../../steps/guides/guide-steps.js';
2
+ import {GuideDialogSteps} from '../../../steps/guides/guide-dialog-steps.js';
3
+ import {MainMenuSteps} from '../../../steps/main-menu-steps.js';
4
+ import {GuidesStubs} from '../../../stubs/guides/guides-stubs.js';
5
+ import SparqlSteps from '../../../steps/sparql-steps.js';
6
+ import {YasqeSteps} from '../../../steps/yasgui/yasqe-steps.js';
7
+ import {YasrSteps} from '../../../steps/yasgui/yasr-steps.js';
8
+
9
+ describe('Execute SPARQL query guide steps', () => {
10
+ let repositoryId;
11
+ const FILE_TO_IMPORT = 'swapi-dataset.ttl';
12
+
13
+ beforeEach(() => {
14
+ repositoryId = 'execute-sparql-query-guide-' + Date.now();
15
+ GuidesStubs.stubExecuteSparqlQueryGuide();
16
+ cy.createRepository({id: repositoryId});
17
+ cy.presetRepository(repositoryId);
18
+ cy.importServerFile(repositoryId, FILE_TO_IMPORT);
19
+
20
+ GuideSteps.visit();
21
+ GuideSteps.verifyGuidesListExists();
22
+ cy.wait('@getGuides');
23
+ GuideSteps.runFirstGuide();
24
+ });
25
+
26
+ afterEach(() => {
27
+ cy.deleteRepository(repositoryId);
28
+ });
29
+
30
+ it('Should execute SPARQL query', () => {
31
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Execute SPARQL query — 1/5');
32
+ GuideDialogSteps.assertDialogWithContentIsVisible('The following steps show how to use the SPARQL Query & Update view to execute queries.');
33
+ GuideDialogSteps.clickOnNextButton();
34
+
35
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Execute SPARQL query — 2/5');
36
+ GuideDialogSteps.assertDialogWithContentIsVisible('Click on the SPARQL menu.');
37
+ MainMenuSteps.clickOnSparqlMenu();
38
+
39
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Execute SPARQL query — 3/5');
40
+ GuideDialogSteps.assertDialogWithContentIsVisible('Enter the following SPARQL query: ');
41
+ GuideDialogSteps.assertDialogWithContentIsVisible('Extra content for query.');
42
+ GuideDialogSteps.copyQueryToEditor();
43
+ YasqeSteps.verifyQueryTyped("PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>\n select * where { \n\t?s rdfs:label ?o .\n} limit 3 ")
44
+ GuideDialogSteps.clickOnNextButton();
45
+
46
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Execute SPARQL query — 4/5');
47
+ GuideDialogSteps.assertDialogWithContentIsVisible('Click on the Run button.');
48
+ YasqeSteps.forceExecuteQuery();
49
+
50
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Execute SPARQL query — 5/5');
51
+ GuideDialogSteps.assertDialogWithContentIsVisible('The table shows the results from executing the query.');
52
+ GuideDialogSteps.assertDialogWithContentIsVisible('Extra content for result.');
53
+ GuideDialogSteps.clickOnNextButton();
54
+
55
+ GuideDialogSteps.assertDialogWithTitleIsVisible('SPARQL Query & Update');
56
+ GuideDialogSteps.assertDialogWithContentIsVisible('Some extra explain content');
57
+ GuideDialogSteps.clickOnNextButton();
58
+
59
+ GuideDialogSteps.assertDialogWithTitleIsVisible('SPARQL Query & Update');
60
+ GuideDialogSteps.assertDialogWithContentIsVisible('Click on the rdf:type IRI to explore it.');
61
+ YasrSteps.clickOnResource(0, 1);
62
+ cy.url().should('include', '/resource?uri=https:%2F%2Fswapi.co%2Fresource%2Fplanet%2F25');
63
+ YasrSteps.getResults().should('have.length', 10);
64
+
65
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Execute SPARQL query — 1/5');
66
+ GuideDialogSteps.assertDialogWithContentIsVisible('The following steps show how to use the SPARQL Query & Update view to execute queries.');
67
+ GuideDialogSteps.clickOnNextButton();
68
+
69
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Execute SPARQL query — 2/5');
70
+ GuideDialogSteps.assertDialogWithContentIsVisible('Click on the SPARQL menu.');
71
+ MainMenuSteps.clickOnSparqlMenu();
72
+
73
+ GuideDialogSteps.assertDialogWithTitleIsVisible('SPARQL Query & Update — 3/5');
74
+ GuideDialogSteps.assertDialogWithContentIsVisible('Enter the following SPARQL query:');
75
+ GuideDialogSteps.assertDialogWithContentIsVisible('The query constructs a graph of films and their characters from the Star Wars API.');
76
+ GuideDialogSteps.copyQueryToEditor();
77
+ YasqeSteps.verifyQueryTyped("PREFIX voc: <https://swapi.co/vocabulary/>\nPREFIX swapi: <https://swapi.co/resource/>\n\nCONSTRUCT {\n?film swapi:hasCharacter ?person .\n}\nWHERE {\n?film a voc:Film ;\nvoc:character ?person .\n}")
78
+ GuideDialogSteps.clickOnNextButton();
79
+
80
+ GuideDialogSteps.assertDialogWithTitleIsVisible('SPARQL Query & Update — 4/5');
81
+ GuideDialogSteps.assertDialogWithContentIsVisible('Click on the Run button.');
82
+ YasqeSteps.forceExecuteQuery();
83
+
84
+ GuideDialogSteps.assertDialogWithTitleIsVisible('SPARQL Query & Update — 5/5');
85
+ GuideDialogSteps.assertDialogWithContentIsVisible('Click on the Visual button.');
86
+ SparqlSteps.visualizeConstructQuery();
87
+ cy.url().should('include', '/graphs-visualizations');
88
+
89
+ GuideDialogSteps.clickOnCloseButton();
90
+ GuideDialogSteps.assertDialogIsClosed();
91
+ });
92
+ });
@@ -0,0 +1,63 @@
1
+ import {GuidesStubs} from "../../../stubs/guides/guides-stubs.js";
2
+ import {GuideSteps} from "../../../steps/guides/guide-steps.js";
3
+ import {GuideDialogSteps} from "../../../steps/guides/guide-dialog-steps.js";
4
+ import ImportSteps from "../../../steps/import/import-steps.js";
5
+ import {ImportUserDataSteps} from "../../../steps/import/import-user-data-steps.js";
6
+ import {ImportSettingsDialogSteps} from "../../../steps/import/import-settings-dialog-steps.js";
7
+ import {MainMenuSteps} from "../../../steps/main-menu-steps.js";
8
+ import {FileOverwriteDialogSteps} from "../../../steps/import/file-overwrite-dialog-steps.js";
9
+
10
+ describe('Confirm duplicate RDF file', () => {
11
+ const GUIDE_RESOURCE_FILE = 'starwars.ttl';
12
+ let repositoryId;
13
+
14
+ beforeEach(() => {
15
+ repositoryId = 'confirm-duplicate-rdf-file-guide-step-' + Date.now();
16
+ GuidesStubs.stubConfirmDuplicatedRDFFileGuide();
17
+ cy.createRepository({id: repositoryId});
18
+ cy.presetRepository(repositoryId);
19
+
20
+ GuideSteps.visit();
21
+ GuideSteps.verifyGuidesListExists();
22
+ cy.wait('@getGuides');
23
+ GuideSteps.runFirstGuide()
24
+ });
25
+
26
+ afterEach(() => {
27
+ cy.deleteRepository(repositoryId);
28
+ });
29
+
30
+ it('Should display an additional step that prompts the user to override the already imported file', () => {
31
+ // GIVEN: I have already uploaded an RDF file with the same name as the guide's rdf file.
32
+ ImportSteps.selectFile(`fixtures/guides/${GUIDE_RESOURCE_FILE}`);
33
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Import file');
34
+ GuideDialogSteps.assertDialogWithContentIsVisible('Click on the Import button.');
35
+ ImportSettingsDialogSteps.import();
36
+ ImportUserDataSteps.checkImportedResource(0, GUIDE_RESOURCE_FILE);
37
+
38
+ // WHEN: I run a guide that includes the Import RDF File step.
39
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Import file — 1/6');
40
+ GuideDialogSteps.assertDialogWithContentIsVisible('The following steps show how to use the Import view to import data from a file.');
41
+ GuideDialogSteps.clickOnNextButton();
42
+
43
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Import file — 2/6');
44
+ GuideDialogSteps.assertDialogWithContentIsVisible('Click on the Import menu.');
45
+ MainMenuSteps.clickOnMenuImport();
46
+
47
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Import file — 3/6');
48
+ GuideDialogSteps.assertDialogWithContentIsVisible('Click on the Upload RDF files button and choose a file with the name starwars.ttl.');
49
+ ImportSteps.selectFile(`fixtures/guides/${GUIDE_RESOURCE_FILE}`);
50
+
51
+ // THEN: I should see an additional step that prompts me to override the already imported file.
52
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Import file — 4/6');
53
+ GuideDialogSteps.assertDialogWithContentIsVisible('Click on the Yes button to override the existing file.');
54
+
55
+ // WHEN: The user confirms the override.
56
+ FileOverwriteDialogSteps.overwrite();
57
+
58
+ // THEN: The guide should continue with the import step.
59
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Import file — 5/6');
60
+ GuideDialogSteps.assertDialogWithContentIsVisible('Click on the Import button.');
61
+ GuideDialogSteps.clickOnNextButton();
62
+ });
63
+ });
@@ -0,0 +1,105 @@
1
+ import {GuidesStubs} from "../../../stubs/guides/guides-stubs.js";
2
+ import {GuideSteps} from "../../../steps/guides/guide-steps.js";
3
+ import {GuideDialogSteps} from "../../../steps/guides/guide-dialog-steps.js";
4
+ import ImportSteps from "../../../steps/import/import-steps.js";
5
+ import {ToasterSteps} from "../../../steps/toaster-steps.js";
6
+ import {MainMenuSteps} from "../../../steps/main-menu-steps.js";
7
+ import {ImportSettingsDialogSteps} from "../../../steps/import/import-settings-dialog-steps.js";
8
+
9
+ describe('Import RDF file', () => {
10
+ const GUIDE_RESOURCE_FILE = 'starwars.ttl';
11
+ const WRONG_GUIDE_RESOURCE_FILE = 'movies.ttl';
12
+ let repositoryId;
13
+
14
+ beforeEach(() => {
15
+ repositoryId = 'import-rdf-file-guide-step-' + Date.now();
16
+ GuidesStubs.stubImportRDFFileGuide();
17
+ cy.createRepository({id: repositoryId});
18
+ cy.presetRepository(repositoryId);
19
+
20
+ GuideSteps.visit();
21
+ GuideSteps.verifyGuidesListExists();
22
+ cy.wait('@getGuides');
23
+ GuideSteps.runFirstGuide()
24
+ });
25
+
26
+ afterEach(() => {
27
+ cy.deleteRepository(repositoryId);
28
+ });
29
+
30
+ it('Should import an RDF file (User interaction)', () => {
31
+ // GIVEN: I start a guide that includes the Import RDF File step.
32
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Import file — 1/6');
33
+ GuideDialogSteps.assertDialogWithContentIsVisible('The following steps show how to use the Import view to import data from a file.');
34
+ GuideDialogSteps.clickOnNextButton();
35
+
36
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Import file — 2/6');
37
+ GuideDialogSteps.assertDialogWithContentIsVisible('Click on the Import menu.');
38
+ MainMenuSteps.clickOnMenuImport();
39
+
40
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Import file — 3/6');
41
+ GuideDialogSteps.assertDialogWithContentIsVisible('Click on the Upload RDF files button and choose a file with the name starwars.ttl.');
42
+
43
+ // WHEN: I try to upload a wrong RDF file.
44
+ ImportSteps.selectFile(`fixtures/guides/${WRONG_GUIDE_RESOURCE_FILE}`);
45
+
46
+ // THEN: An error message should be displayed.
47
+ ToasterSteps.verifyError(`The uploaded file does not match the expected resource. Please upload ${GUIDE_RESOURCE_FILE}.`)
48
+ // AND: The guide should still be on the same step.
49
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Import file');
50
+ GuideDialogSteps.assertDialogWithContentIsVisible(`Click on the Upload RDF files button and choose a file with the name ${GUIDE_RESOURCE_FILE}.`);
51
+
52
+ // WHEN: I upload the correct RDF file.
53
+ ImportSteps.selectFile(`fixtures/guides/${GUIDE_RESOURCE_FILE}`);
54
+
55
+ // THEN: I expect the guide to continue.
56
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Import file — 5/6');
57
+ GuideDialogSteps.assertDialogWithContentIsVisible('Click on the Import button.');
58
+ ImportSettingsDialogSteps.import();
59
+
60
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Import file — 6/6');
61
+ GuideDialogSteps.assertDialogWithContentIsVisible('Wait until import finished.');
62
+ GuideDialogSteps.clickOnNextButton();
63
+
64
+ GuideDialogSteps.assertDialogWithTitleIsVisible('End of guide');
65
+ GuideDialogSteps.assertDialogWithContentIsVisible('This guide has ended.');
66
+ });
67
+
68
+ it('Should import an RDF file (Next flow)', () => {
69
+ // GIVEN: I start a guide that includes the Import RDF File step.
70
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Import file — 1/6');
71
+ GuideDialogSteps.assertDialogWithContentIsVisible('The following steps show how to use the Import view to import data from a file.');
72
+ GuideDialogSteps.clickOnNextButton();
73
+
74
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Import file — 2/6');
75
+ GuideDialogSteps.assertDialogWithContentIsVisible('Click on the Import menu.');
76
+ GuideDialogSteps.clickOnNextButton();
77
+
78
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Import file — 3/6');
79
+ GuideDialogSteps.assertDialogWithContentIsVisible('Click on the Upload RDF files button and choose a file with the name starwars.ttl.');
80
+
81
+ // WHEN: I try to continue with the guide without selecting an RDF file.
82
+ GuideDialogSteps.clickOnNextButton();
83
+
84
+ // THEN: An error message should be displayed.
85
+ ToasterSteps.verifyError(`Upload the file ${GUIDE_RESOURCE_FILE} first`);
86
+ // AND: The guide should still be on the same step.
87
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Import file');
88
+ GuideDialogSteps.assertDialogWithContentIsVisible(`Click on the Upload RDF files button and choose a file with the name ${GUIDE_RESOURCE_FILE}.`);
89
+
90
+ // WHEN: I upload the correct RDF file.
91
+ ImportSteps.selectFile(`fixtures/guides/${GUIDE_RESOURCE_FILE}`);
92
+
93
+ // THEN: I expect the guide to continue.
94
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Import file — 5/6');
95
+ GuideDialogSteps.assertDialogWithContentIsVisible('Click on the Import button.');
96
+ GuideDialogSteps.clickOnNextButton();
97
+
98
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Import file — 6/6');
99
+ GuideDialogSteps.assertDialogWithContentIsVisible('Wait until import finished.');
100
+ GuideDialogSteps.clickOnNextButton();
101
+
102
+ GuideDialogSteps.assertDialogWithTitleIsVisible('End of guide');
103
+ GuideDialogSteps.assertDialogWithContentIsVisible('This guide has ended.');
104
+ });
105
+ });
@@ -0,0 +1,64 @@
1
+ import {GuidesStubs} from "../../../stubs/guides/guides-stubs.js";
2
+ import {GuideSteps} from "../../../steps/guides/guide-steps.js";
3
+ import {GuideDialogSteps} from "../../../steps/guides/guide-dialog-steps.js";
4
+ import {NotFoundSteps} from "../../../steps/not-found/not-found-steps.js";
5
+ import {BaseSteps} from "../../../steps/base-steps.js";
6
+ import {RepositoriesStubs} from "../../../stubs/repositories/repositories-stubs.js";
7
+
8
+ describe('navigation guide', () => {
9
+ let repositoryId;
10
+
11
+ beforeEach(() => {
12
+ repositoryId = 'navigation-guide-' + Date.now();
13
+ RepositoriesStubs.stubBaseEndpoints(repositoryId);
14
+ cy.createRepository({id: repositoryId});
15
+ cy.presetRepository(repositoryId);
16
+ GuidesStubs.stubNavigationGuide();
17
+ GuideSteps.visit();
18
+ GuideSteps.verifyGuidesListExists();
19
+ cy.wait('@getGuides');
20
+ GuideSteps.runFirstGuide();
21
+ });
22
+
23
+ afterEach(() => {
24
+ cy.deleteRepository(repositoryId);
25
+ });
26
+
27
+ it('should navigate between microfrontends', () => {
28
+ // Given I am on the 404 page, which is an angular view
29
+ BaseSteps.getUrl().should('include', '404');
30
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Navigation');
31
+ GuideDialogSteps.assertDialogWithContentIsVisible('This is a 404 page');
32
+ GuideDialogSteps.clickOnNextButton();
33
+
34
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Navigation');
35
+ GuideDialogSteps.assertDialogWithContentIsVisible('This is the go back home button');
36
+
37
+ // When I navigate to the home page
38
+ NotFoundSteps.clickGoHomeButton();
39
+
40
+ // Then I should see the home page, which is an angularjs view
41
+ BaseSteps.getUrl().should('include', '/');
42
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Navigation');
43
+ GuideDialogSteps.assertDialogWithContentIsVisible('This is the home page');
44
+ // When, I navigate to an angular view again (/sparql-new)
45
+ GuideDialogSteps.clickOnNextButton();
46
+
47
+ // Then I should see the new sparql view, which is an angular view
48
+ BaseSteps.getUrl().should('include', 'sparql-new');
49
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Navigation');
50
+ GuideDialogSteps.assertDialogWithContentIsVisible('This is the new sparql view');
51
+
52
+ // When, I navigate to an angularjs view again (import)
53
+ GuideDialogSteps.clickOnNextButton();
54
+
55
+ // Then I should see the import page, which is an angularjs view
56
+ BaseSteps.getUrl().should('include', 'import');
57
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Navigation');
58
+ GuideDialogSteps.assertDialogWithContentIsVisible('This is the import view');
59
+ GuideDialogSteps.clickOnNextButton();
60
+
61
+ GuideDialogSteps.assertDialogWithTitleIsVisible('End of guide');
62
+ GuideDialogSteps.assertDialogWithContentIsVisible('This guide has ended');
63
+ });
64
+ });
@@ -0,0 +1,42 @@
1
+ import {GuidesStubs} from "../../../stubs/guides/guides-stubs.js";
2
+ import {GuideSteps} from "../../../steps/guides/guide-steps.js";
3
+ import {GuideDialogSteps} from "../../../steps/guides/guide-dialog-steps.js";
4
+ import {RdfRankSteps} from "../../../steps/setup/rdf-rank-steps.js";
5
+
6
+ describe('RDF rank', () => {
7
+ let repositoryId;
8
+
9
+ beforeEach(() => {
10
+ repositoryId = 'rdf-rank-guide-step-' + Date.now();
11
+ GuidesStubs.stubRDFRankGuide();
12
+ cy.createRepository({id: repositoryId});
13
+ cy.presetRepository(repositoryId);
14
+
15
+ GuideSteps.visit();
16
+ GuideSteps.verifyGuidesListExists();
17
+ cy.wait('@getGuides');
18
+ GuideSteps.runFirstGuide()
19
+ });
20
+
21
+ afterEach(() => {
22
+ cy.deleteRepository(repositoryId);
23
+ });
24
+
25
+ it('Should compute RDF Rank (User interaction)', () => {
26
+ GuideDialogSteps.assertDialogWithTitleIsVisible('RDF Rank');
27
+ GuideDialogSteps.assertDialogWithContentIsVisible('Click on Compute Full to start the RDF Rank computation.');
28
+ RdfRankSteps.computeRdfRank();
29
+
30
+ GuideDialogSteps.assertDialogWithTitleIsVisible('End of guide');
31
+ GuideDialogSteps.assertDialogWithContentIsVisible('This guide has ended.');
32
+ });
33
+
34
+ it('Should compute RDF Rank (Next flow)', () => {
35
+ GuideDialogSteps.assertDialogWithTitleIsVisible('RDF Rank');
36
+ GuideDialogSteps.assertDialogWithContentIsVisible('Click on Compute Full to start the RDF Rank computation.');
37
+ GuideDialogSteps.clickOnNextButton();
38
+
39
+ GuideDialogSteps.assertDialogWithTitleIsVisible('End of guide');
40
+ GuideDialogSteps.assertDialogWithContentIsVisible('This guide has ended.');
41
+ });
42
+ });