graphdb-workbench-tests 3.3.3 → 3.4.0-RC1

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 (84) 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 +167 -0
  13. package/e2e-legacy/explore/visual-graph/visual.graph.spec.js +57 -85
  14. package/e2e-legacy/graphql/graphql-in-remote-location.spec.js +49 -0
  15. package/e2e-legacy/guides/execute-sparql-query/execute-sparql-query-guide.spec.js +92 -0
  16. package/e2e-legacy/guides/import-rdf-file/confirm-duplicate-rdf-file.spec.js +63 -0
  17. package/e2e-legacy/guides/import-rdf-file/import-rdf-file.spec.js +105 -0
  18. package/e2e-legacy/guides/navigation/navigation-guide.spec.js +64 -0
  19. package/e2e-legacy/guides/rdf-rank/rdf-rank-guide.spec.js +42 -0
  20. package/e2e-legacy/guides/table-graph-explore/table-graph-explore-guide.spec.js +168 -0
  21. package/e2e-legacy/guides/ttyg/configure-agent/configure-agent-guide.spec.js +34 -26
  22. package/e2e-legacy/guides/ttyg/edit-agent/edit-ttyg-agent-guide.spec.js +2 -2
  23. package/e2e-legacy/guides/visual-graph/visual-graph-guide.spec.js +372 -0
  24. package/e2e-legacy/guides/welcome/welcome-guide.spec.js +36 -0
  25. package/e2e-legacy/help/guides/guides-autostart.spec.js +36 -3
  26. package/e2e-legacy/help/guides/guides-confirm-cancel-dialog.js +83 -0
  27. package/e2e-legacy/help/guides/movies-interactive-guide.spec.js +47 -49
  28. package/e2e-legacy/repository/attach-remote-location.spec.js +47 -12
  29. package/e2e-legacy/repository/url-with-repository-id-parameter.spec.js +1 -0
  30. package/e2e-legacy/resource/resource.spec.js +34 -19
  31. package/e2e-legacy/setup/aclmanagement/acl-management-with-selected repository.spec.js +44 -0
  32. package/e2e-legacy/setup/aclmanagement/create-rule.spec.js +3 -0
  33. package/e2e-legacy/setup/connectors-lucene.spec.js +24 -8
  34. package/e2e-legacy/sparql-editor/actions/expand-results-over-sameas.spec.js +9 -9
  35. package/e2e-legacy/sparql-editor/actions/include-inferred-statements.spec.js +4 -4
  36. package/e2e-legacy/sparql-editor/actions/inferred-sameas.spec.js +3 -3
  37. package/e2e-legacy/sparql-editor/actions/show-saved-queries.spec.js +1 -6
  38. package/e2e-legacy/sparql-editor/yasgui-tabs.spec.js +2 -12
  39. package/e2e-legacy/sparql-editor/yasr/pagination.spec.js +5 -18
  40. package/e2e-legacy/sparql-editor/yasr/table-plugin.spec.js +1 -6
  41. package/e2e-legacy/sparql-editor/yasr/toolbar/visual-graph-button.spec.js +90 -41
  42. package/e2e-legacy/sparql-editor/yasr/yasr.spec.js +80 -0
  43. package/e2e-legacy/ttyg/chat-list.spec.js +2 -12
  44. package/e2e-legacy/ttyg/create-agent.spec.js +8 -48
  45. package/e2e-legacy/ttyg/edit-agent.spec.js +2 -12
  46. package/e2e-security/setup/users-and-access/turn-on-security-and-password-change.spec.js +73 -61
  47. package/fixtures/graph/graph-configurations.json +59 -0
  48. package/fixtures/guides/confirm-cancel-dialog/confirm-cancel-dialog-guide.json +15 -0
  49. package/fixtures/guides/execute-sparql-query/execute-sparql-query-guide.json +54 -0
  50. package/fixtures/guides/import-rdf-file/confirm-duplicate-rdf-file-guide.json +30 -0
  51. package/fixtures/guides/import-rdf-file/import-rdf-file-guide.json +21 -0
  52. package/fixtures/guides/navigation/navigation-guide.json +60 -0
  53. package/fixtures/guides/rdf-rank/rdf-rank-guide.json +18 -0
  54. package/fixtures/guides/table-graph-explore/table-graph-explore-guide.json +51 -0
  55. package/fixtures/guides/table-graph-explore/table-graph-explore-without-substeps-guide.json +25 -0
  56. package/fixtures/guides/ttyg/configure-agent/configure-ttyg-agent-guide.json +6 -1
  57. package/fixtures/guides/visual-graph/visual-graph-config-guide.json +39 -0
  58. package/fixtures/guides/visual-graph/visual-graph-guide.json +85 -0
  59. package/fixtures/guides/welcome/welcome-guide.json +18 -0
  60. package/npm-shrinkwrap.json +335 -282
  61. package/package.json +1 -1
  62. package/steps/graphql/create-graphql-endpoint-steps.js +8 -0
  63. package/steps/graphql/graphql-endpoint-management-steps.js +8 -0
  64. package/steps/graphql/graphql-playground-steps.js +8 -0
  65. package/steps/guides/guide-dialog-steps.js +60 -2
  66. package/steps/guides/movies-guide-steps.js +2 -1
  67. package/steps/main-menu-steps.js +1 -0
  68. package/steps/repositories/attach-repository-steps.js +16 -0
  69. package/steps/repository-steps.js +24 -0
  70. package/steps/resource/resource-steps.js +0 -8
  71. package/steps/setup/acl-management-steps.js +16 -0
  72. package/steps/sparql-editor-steps.js +18 -4
  73. package/steps/sparql-steps.js +13 -1
  74. package/steps/ttyg/ttyg-agent-settings-modal.steps.js +1 -1
  75. package/steps/visual-graph-split-button-steps.js +45 -0
  76. package/steps/visual-graph-steps.js +84 -2
  77. package/steps/yasgui/yasqe-steps.js +29 -4
  78. package/steps/yasgui/yasr-steps.js +34 -6
  79. package/stubs/cluster/remote-location-stubs.js +4 -0
  80. package/stubs/graph-config-stubs.js +17 -0
  81. package/stubs/guides/guides-stubs.js +41 -1
  82. package/support/commands.js +1 -0
  83. package/support/repository-commands.js +22 -3
  84. package/support/url-commands.js +13 -0
@@ -7,6 +7,10 @@ export class RemoteLocationStubs extends Stubs {
7
7
  }).as('add-remote-location');
8
8
  }
9
9
 
10
+ static spyRemoteLocationCreate() {
11
+ cy.intercept('POST', '/rest/locations').as('add-remote-location');
12
+ }
13
+
10
14
  static stubGetRemoteLocations(count = 'no') {
11
15
  cy.intercept('GET', '/rest/locations', {
12
16
  fixture: `/remote-location/get-${count}-remote-locations.json`,
@@ -0,0 +1,17 @@
1
+ import {Stubs} from './stubs.js';
2
+
3
+ export class GraphConfigStubs extends Stubs {
4
+ static stubGetEmptyGraphConfigs() {
5
+ cy.intercept('GET', '/rest/explore-graph/config', {
6
+ statusCode: 200,
7
+ body: [],
8
+ }).as('getEmptyGraphConfigs');
9
+ }
10
+
11
+ static stubGetGraphConfigs(fixture = '/graph/graph-configurations.json') {
12
+ GraphConfigStubs.stubQueryResponse(
13
+ '/rest/explore-graph/config',
14
+ fixture,
15
+ 'getGraphConfigs');
16
+ }
17
+ }
@@ -47,10 +47,50 @@ export class GuidesStubs {
47
47
  GuidesStubs.stubWithFixture('../fixtures/guides/main-menu/main-menu-guide.json');
48
48
  }
49
49
 
50
+ static stubExecuteSparqlQueryGuide() {
51
+ GuidesStubs.stubWithFixture('../fixtures/guides/execute-sparql-query/execute-sparql-query-guide.json');
52
+ }
53
+
50
54
  static stubDownloadResource(resourcePath, resourceFile) {
51
55
  cy.intercept('GET', `/rest/guides/download/${resourcePath}/${resourceFile}`, {
52
56
  fixture: `guides/download-resource.ttl`,
53
- }).as('resource-download');;
57
+ }).as('resource-download');
58
+ }
59
+
60
+ static stubImportRDFFileGuide() {
61
+ GuidesStubs.stubWithFixture('../fixtures/guides/import-rdf-file/import-rdf-file-guide.json');
62
+ }
63
+
64
+ static stubConfirmDuplicatedRDFFileGuide() {
65
+ GuidesStubs.stubWithFixture('../fixtures/guides/import-rdf-file/confirm-duplicate-rdf-file-guide.json');
66
+ }
67
+
68
+ static stubRDFRankGuide() {
69
+ GuidesStubs.stubWithFixture('../fixtures/guides/rdf-rank/rdf-rank-guide.json');
70
+ }
71
+
72
+ static stubTableGraphExploreWithoutSubstepsGuide() {
73
+ GuidesStubs.stubWithFixture('../fixtures/guides/table-graph-explore/table-graph-explore-without-substeps-guide.json');
74
+ }
75
+
76
+ static stubTableGraphExploreGuide() {
77
+ GuidesStubs.stubWithFixture('../fixtures/guides/table-graph-explore/table-graph-explore-guide.json');
78
+ }
79
+ static stubWelcomGuide() {
80
+ GuidesStubs.stubWithFixture('../fixtures/guides/welcome/welcome-guide.json');
81
+ }
82
+
83
+
84
+ static stubVisualGraphGuide() {
85
+ GuidesStubs.stubWithFixture('../fixtures/guides/visual-graph/visual-graph-guide.json');
86
+ }
87
+
88
+ static stubVisualGraphConfigGuide() {
89
+ GuidesStubs.stubWithFixture('../fixtures/guides/visual-graph/visual-graph-config-guide.json');
90
+ }
91
+
92
+ static stubNavigationGuide() {
93
+ GuidesStubs.stubWithFixture('../fixtures/guides/navigation/navigation-guide.json');
54
94
  }
55
95
 
56
96
  static stubWithFixture(fixturePath) {
@@ -8,6 +8,7 @@ import './user-commands';
8
8
  import './security-command';
9
9
  import './connector-commands';
10
10
  import 'cypress-wait-until';
11
+ import './url-commands.js';
11
12
 
12
13
  /**
13
14
  * Loads fixtures from the given paths recursively and returns them as an array.
@@ -47,13 +47,13 @@ Cypress.Commands.add('deleteRepository', (id, secured = false) => {
47
47
  });
48
48
  });
49
49
 
50
- Cypress.Commands.add('presetRepository', (id) => {
51
- cy.setLocalStorage(PRESET_REPO, JSON.stringify({id: id, location: ''}));
50
+ Cypress.Commands.add('presetRepository', (id, location = '') => {
51
+ cy.setLocalStorage(PRESET_REPO, JSON.stringify({id: id, location}));
52
52
  cy.waitUntil(() =>
53
53
  cy.getLocalStorage(PRESET_REPO)
54
54
  .then((preset) => {
55
55
  const presetRepo = JSON.parse(preset);
56
- return presetRepo && presetRepo.id === id
56
+ return presetRepo && presetRepo.id === id && presetRepo.location === location;
57
57
  }));
58
58
  cy.log('Pre-set repository:', id);
59
59
  });
@@ -78,6 +78,25 @@ Cypress.Commands.add('initializeRepository', (id) => {
78
78
  });
79
79
  });
80
80
 
81
+ /**
82
+ * A command for deleting remote locations by URI. It sends a DELETE request to the appropriate endpoint and waits until
83
+ * the response is received.
84
+ *
85
+ * @param {string} uri - The URI of the remote location to be deleted.
86
+ */
87
+ Cypress.Commands.add('deleteRemoteLocation', (uri) => {
88
+ cy.request({
89
+ method: 'DELETE',
90
+ url: '/rest/locations?uri=' + encodeURIComponent(uri),
91
+ headers: {
92
+ 'Content-Type': 'application/json'
93
+ },
94
+ failOnStatusCode: false
95
+ }).then((response) => {
96
+ cy.waitUntil(() => response);
97
+ });
98
+ });
99
+
81
100
  Cypress.Commands.add('enableAutocomplete', (repositoryId) => {
82
101
  toggleAutocomplete(repositoryId, true);
83
102
  });
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Custom Cypress command to retrieve the value of a query parameter from the current page URL.
3
+ *
4
+ * @param {string} key - The name of the query parameter to retrieve.
5
+ * @returns {Cypress.Chainable<string | null>} A chainable that resolves to the value of the query parameter,
6
+ * or null if the parameter is not present.
7
+ */
8
+ Cypress.Commands.add('getQueryParam', (key) => {
9
+ return cy.location('search').then((search) => {
10
+ const params = new URLSearchParams(search);
11
+ return params.get(key);
12
+ });
13
+ });