graphdb-workbench-tests 3.2.1 → 3.3.0-RC2

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 (112) hide show
  1. package/cypress-security.config.js +12 -5
  2. package/e2e-flaky/import/import-user-data-batch-operations.spec.js +2 -2
  3. package/e2e-legacy/explore/class-relationships/class-relationships.spec.js +2 -0
  4. package/e2e-legacy/explore/visual-graph/graphs-config.spec.js +4 -4
  5. package/e2e-legacy/explore/visual-graph/visual-graph-node-labels.spec.js +14 -2
  6. package/e2e-legacy/explore/visual-graph/visual.graph.spec.js +23 -11
  7. package/e2e-legacy/guides/autocomplete/enable-autocomplete-guide.spec.js +49 -0
  8. package/e2e-legacy/guides/class-hierarcy/class-hierarchy-guide.spec.js +89 -0
  9. package/e2e-legacy/guides/class-relations/class-relations-guide.spec.js +76 -0
  10. package/e2e-legacy/guides/connectors/connectors-guide.spec.js +152 -0
  11. package/e2e-legacy/guides/create-similarity-index/create-similarity-index-guide.spec.js +74 -0
  12. package/e2e-legacy/guides/download-guide-resource/download-guide-resource-guide.js +55 -0
  13. package/e2e-legacy/guides/repositories/create-repository-guide.spec.js +69 -0
  14. package/e2e-legacy/guides/ttyg/configure-agent/configure-agent-guide.spec.js +150 -0
  15. package/e2e-legacy/guides/ttyg/conversation/ttyg-conversation-guide.spec.js +88 -0
  16. package/e2e-legacy/home/cookie-policy.spec.js +8 -8
  17. package/e2e-legacy/home/rdf-resource-search.spec.js +12 -0
  18. package/e2e-legacy/import/import-server-files.spec.js +2 -2
  19. package/e2e-legacy/import/import-user-data-file-upload.spec.js +3 -3
  20. package/e2e-legacy/import/import-user-data.spec.js +2 -2
  21. package/e2e-legacy/repository/ontop-repository.spec.js +1 -1
  22. package/e2e-legacy/repository/repositories.spec.js +1 -1
  23. package/e2e-legacy/repository/url-with-repository-id-parameter.spec.js +155 -0
  24. package/e2e-legacy/setup/autocomplete/autocomplete.spec.js +1 -1
  25. package/e2e-legacy/setup/connectors-lucene.spec.js +2 -2
  26. package/e2e-legacy/setup/jdbc/jdbc-create.spec.js +4 -4
  27. package/e2e-legacy/setup/rdf-rank/rdf-rank.spec.js +2 -4
  28. package/e2e-legacy/setup/settings/my-settings.spec.js +48 -60
  29. package/e2e-legacy/setup/users-and-access/user-and-access.spec.js +105 -78
  30. package/e2e-legacy/sparql-editor/actions/expand-results-over-sameas.spec.js +11 -11
  31. package/e2e-legacy/sparql-editor/actions/include-inferred-statements.spec.js +6 -6
  32. package/e2e-legacy/sparql-editor/actions/inferred-sameas.spec.js +7 -7
  33. package/e2e-legacy/sparql-editor/saved-query/abort-query.spec.js +1 -1
  34. package/e2e-legacy/sparql-editor/saved-query/readonly-query.spec.js +13 -16
  35. package/e2e-legacy/sparql-editor/saved-query/share-query.spec.js +30 -1
  36. package/e2e-legacy/ttyg/agent-list.spec.js +1 -2
  37. package/e2e-legacy/ttyg/agent-select-menu.spec.js +1 -2
  38. package/e2e-legacy/ttyg/chat-list.spec.js +1 -2
  39. package/e2e-legacy/ttyg/chat-panel.spec.js +6 -3
  40. package/e2e-legacy/ttyg/clone-agent.spec.js +1 -2
  41. package/e2e-legacy/ttyg/create-agent.spec.js +2 -3
  42. package/e2e-legacy/ttyg/create-chat.spec.js +1 -2
  43. package/e2e-legacy/ttyg/delete-agent.spec.js +1 -2
  44. package/e2e-legacy/ttyg/edit-agent.spec.js +1 -2
  45. package/e2e-legacy/ttyg/ttyg-permission.spec.js +2 -6
  46. package/e2e-legacy/ttyg/ttyg-view.spec.js +1 -2
  47. package/e2e-security/setup/users-and-access/create-user-permissions.spec.js +16 -7
  48. package/e2e-security/setup/users-and-access/graphql-user.spec.js +6 -3
  49. package/e2e-security/setup/users-and-access/repo-admin-role.spec.js +1 -0
  50. package/e2e-security/setup/users-and-access/turn-on-security-and-password-change.spec.js +3 -3
  51. package/e2e-security/setup/users-and-access/user-and-access.spec.js +8 -8
  52. package/fixtures/guides/autocomplete/enable-autocomplete-guide.json +12 -0
  53. package/fixtures/guides/class-hierarchy/class-hierarchy-guide.json +35 -0
  54. package/fixtures/guides/class-relations/class-relations-guide.json +33 -0
  55. package/fixtures/guides/connectors/connectors-guide.json +66 -0
  56. package/fixtures/guides/connectors/lucene-connector-guide.json +106 -0
  57. package/fixtures/guides/create-repository/create-repository-guide.json +25 -0
  58. package/fixtures/guides/create-similarity-index/create-similarity-index-guide.json +36 -0
  59. package/fixtures/guides/download-guide-resource/download-guide-resource-guide.json +25 -0
  60. package/fixtures/guides/download-resource.ttl +629 -0
  61. package/fixtures/guides/ttyg/configure-agent/configure-ttyg-agent-guide.json +69 -0
  62. package/fixtures/guides/ttyg/conversation/ttyg-conversation-guide.json +26 -0
  63. package/fixtures/similarity/get-ttyg-similarity-instances.json +10 -0
  64. package/fixtures/ttyg/agent/get-similarity-indexes-for-another-repo.json +5 -3
  65. package/fixtures/ttyg/agent/get-similarity-indexes.json +17 -8
  66. package/fixtures/ttyg/chats/explain-response-3.json +12 -0
  67. package/npm-shrinkwrap.json +439 -444
  68. package/package.json +4 -3
  69. package/steps/application-steps.js +7 -5
  70. package/steps/class-views-steps.js +19 -7
  71. package/steps/explore/similarity-index-create-steps.js +5 -3
  72. package/steps/explore/similarity-indexes-steps.js +4 -0
  73. package/steps/guides/guide-dialog-steps.js +16 -0
  74. package/steps/guides/guide-steps.js +26 -1
  75. package/steps/header-steps.js +9 -0
  76. package/steps/home-steps.js +42 -30
  77. package/steps/import/import-steps.js +1 -1
  78. package/steps/import/import-user-data-steps.js +1 -1
  79. package/steps/login-steps.js +13 -4
  80. package/steps/main-menu-steps.js +24 -4
  81. package/steps/modal-dialog-steps.js +12 -1
  82. package/steps/repository-steps.js +54 -14
  83. package/steps/resource/resource-steps.js +2 -2
  84. package/steps/setup/acl-management-steps.js +2 -2
  85. package/steps/setup/autocomplete-steps.js +6 -2
  86. package/steps/setup/connectors-steps.js +13 -0
  87. package/steps/setup/namespace-steps.js +1 -1
  88. package/steps/setup/plugins-steps.js +1 -1
  89. package/steps/setup/rdf-rank-steps.js +1 -5
  90. package/steps/setup/user-and-access-steps.js +9 -13
  91. package/steps/sparql-editor-steps.js +5 -0
  92. package/steps/toaster-steps.js +18 -6
  93. package/steps/ttyg/chat-panel-steps.js +19 -1
  94. package/steps/ttyg/ttyg-agent-settings-modal.steps.js +42 -8
  95. package/steps/ttyg/ttyg-view-steps.js +6 -2
  96. package/steps/visual-graph-steps.js +23 -9
  97. package/steps/yasgui/yasgui-loader.js +3 -3
  98. package/steps/yasgui/yasgui-steps.js +1 -1
  99. package/stubs/guides/guides-stubs.js +55 -0
  100. package/stubs/repositories/repositories-stubs.js +151 -76
  101. package/stubs/similarity-index-stubs.js +4 -0
  102. package/stubs/yasgui/query-stubs.js +5 -1
  103. package/support/commands.js +2 -1
  104. package/support/connector-commands.js +13 -0
  105. package/support/e2e.js +3 -0
  106. package/support/repository-commands.js +9 -0
  107. package/support/settings-commands.js +16 -0
  108. package/utils/html-util.js +24 -4
  109. package/stubs/repositories-stub.js +0 -73
  110. /package/e2e-legacy/graphql/{graphql-endpoint-management-with-selected-repository.spec.jsx → graphql-endpoint-management-with-selected-repository.spec.js} +0 -0
  111. /package/e2e-legacy/help/guides/{star-wars-interactive-guide.js → star-wars-interactive-guide.spec.js} +0 -0
  112. /package/e2e-legacy/setup/sparql-template/{sparql-template-create.js → sparql-template-create.spec.js} +0 -0
@@ -1,8 +1,15 @@
1
- const {defineConfig} = require('cypress');
1
+ import { defineConfig } from 'cypress';
2
+ import setupPlugins from './plugins/index.js';
2
3
 
3
4
  const isCoverage = process.env.COVERAGE === 'true';
4
5
 
5
- module.exports = defineConfig({
6
+ const loadCodeCoverage = async (on, config) => {
7
+ const mod = await import('@bahmutov/cypress-code-coverage/plugin');
8
+ const plugin = ('default' in mod) ? mod.default : mod;
9
+ plugin(on, config);
10
+ };
11
+
12
+ export default defineConfig({
6
13
  projectId: 'v35btb',
7
14
  fixturesFolder: 'fixtures',
8
15
  screenshotsFolder: 'report/screenshots',
@@ -19,10 +26,10 @@ module.exports = defineConfig({
19
26
  },
20
27
  // We've imported your old cypress plugins here.
21
28
  // You may want to clean this up later by importing these.
22
- setupNodeEvents(on, config) {
23
- require('./plugins')(on, config);
29
+ async setupNodeEvents(on, config) {
30
+ setupPlugins(on, config);
24
31
  if (isCoverage) {
25
- require('@bahmutov/cypress-code-coverage/plugin')(on, config)
32
+ await loadCodeCoverage(on, config);
26
33
  }
27
34
  return config;
28
35
  },
@@ -1,7 +1,7 @@
1
1
  import {ModalDialogSteps} from "../../steps/modal-dialog-steps";
2
2
  import {ImportSettingsDialogSteps} from "../../steps/import/import-settings-dialog-steps";
3
- import {MainMenuSteps} from "../../steps/main-menu-steps";
4
3
  import {ImportUserDataSteps} from "../../steps/import/import-user-data-steps";
4
+ import {HeaderSteps} from '../../steps/header-steps.js';
5
5
 
6
6
  const bnodes = `_:node0 <http://purl.org/dc/elements/1.1/title> "A new book" ;
7
7
  \t<http://purl.org/dc/elements/1.1/creator> "A.N.Other" .`;
@@ -146,7 +146,7 @@ describe('Import user data: Batch operations', {retries: {runMode: 2}}, () => {
146
146
  ModalDialogSteps.clickOnConfirmButton();
147
147
  // Then the files should be deleted
148
148
  ImportUserDataSteps.getResources().should('have.length', 0);
149
- MainMenuSteps.openHomePage();
149
+ HeaderSteps.openHomePage();
150
150
  ImportUserDataSteps.visit();
151
151
  ImportUserDataSteps.getResources().should('have.length', 0);
152
152
  });
@@ -44,6 +44,8 @@ describe('Class relations screen validation', () => {
44
44
  // Diagram should be visible and showing 10 classes
45
45
  ClassRelationshipsSteps.getDependenciesDiagram().should('be.visible').within(() => {
46
46
  cy.get('.group').should('have.length', 10);
47
+ // Ensure only one SVG/viewBox is rendered
48
+ cy.get('svg').should('have.length', 1);
47
49
  });
48
50
  });
49
51
 
@@ -189,7 +189,7 @@ describe('Graphs config', () => {
189
189
  // When I click on cancel
190
190
  VisualGraphSteps.cancelSaveConfig();
191
191
  // Then I expect to be redirected to configs list view
192
- cy.url().should('eq', Cypress.config('baseUrl') + '/graphs-visualizations');
192
+ cy.url().should('include', Cypress.config('baseUrl') + '/graphs-visualizations');
193
193
  });
194
194
 
195
195
  it('Should not allow config creation without a name', () => {
@@ -349,7 +349,7 @@ describe('Graphs config', () => {
349
349
  // When I click cancel without changing the query
350
350
  VisualGraphSteps.cancelSaveConfig();
351
351
  // Then I expect to be redirected to configs list without confirmation
352
- cy.url().should('eq', Cypress.config('baseUrl') + '/graphs-visualizations');
352
+ cy.url().should('include', Cypress.config('baseUrl') + '/graphs-visualizations');
353
353
  // And I open it for edit
354
354
  VisualGraphSteps.editConfig(graphConfigName);
355
355
  checkEditorWithQuery(QUERY_START);
@@ -372,7 +372,7 @@ describe('Graphs config', () => {
372
372
  ModalDialogSteps.clickOnConfirmButton();
373
373
  // Then I expect to be redirected to configs list page
374
374
  ModalDialogSteps.getDialog().should('not.exist');
375
- cy.url().should('eq', Cypress.config('baseUrl') + '/graphs-visualizations');
375
+ cy.url().should('include', Cypress.config('baseUrl') + '/graphs-visualizations');
376
376
  });
377
377
 
378
378
  it('Should prevent leaving with confirmation when expand query is changed', () => {
@@ -454,7 +454,7 @@ function saveGraphConfig(graphConfigName) {
454
454
  // Then I expect a success notification
455
455
  ApplicationSteps.getSuccessNotifications().should('be.visible');
456
456
  // And I should be redirected to configs list view
457
- cy.url().should('eq', Cypress.config('baseUrl') + '/graphs-visualizations');
457
+ cy.url().should('include', Cypress.config('baseUrl') + '/graphs-visualizations');
458
458
  // And the new config should be present in the list
459
459
  VisualGraphSteps.getGraphConfig(graphConfigName).should('be.visible');
460
460
  }
@@ -2,6 +2,8 @@ import { LicenseStubs } from "../../../stubs/license-stubs";
2
2
  import { VisualGraphSteps } from "../../../steps/visual-graph-steps";
3
3
  import { HtmlUtil } from "../../../utils/html-util";
4
4
 
5
+ const LONG_LABEL = 'A looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong label for Node Four'
6
+
5
7
  /**
6
8
  * RDF snippet with the necessary data to test all possible label scenarios:
7
9
  * 1. (ex:node1) Node with a plain text label;
@@ -19,7 +21,7 @@ const RDF_SNIPPETS_WITH_NODE_LABELS_DATA =
19
21
  'ex:node1 rdfs:label "Node One" .\n' +
20
22
  'ex:node2 rdfs:label "Node<br>Two" .\n' +
21
23
  'ex:node3 rdfs:label "Node\\nThree" .\n' +
22
- 'ex:node4 rdfs:label "A longer label for Node Four" .\n' +
24
+ `ex:node4 rdfs:label "${LONG_LABEL}" .\n` +
23
25
  '\n' +
24
26
  '# Relationships Between Nodes\n' +
25
27
  'ex:node1 ex:connectedTo ex:node2 .\n' +
@@ -60,9 +62,19 @@ describe("Node Basics", () => {
60
62
  VisualGraphSteps.getNodeLabel('http://example.com/node3').should('have.html', 'Node<br>Three');
61
63
 
62
64
  // The label of ex:node4 to be displayed with a long label (no truncation).
63
- VisualGraphSteps.getNodeLabel('http://example.com/node4').should('have.html', 'A longer label for Node Four');
65
+ VisualGraphSteps.getNodeLabel('http://example.com/node4').should('have.html', LONG_LABEL);
64
66
 
65
67
  // The label of ex:node4 should be truncated with ellipsis because it has a long label.
66
68
  HtmlUtil.verifyEllipsis(VisualGraphSteps.getNodeLabel('http://example.com/node4'));
69
+
70
+ // When: I disable the "Truncate long labels" setting.
71
+ VisualGraphSteps.openVisualGraphSettings();
72
+ VisualGraphSteps.getTruncateLabelsCheckbox().should('be.checked');
73
+ VisualGraphSteps.toggleTruncateLabelsCheckbox();
74
+ VisualGraphSteps.getTruncateLabelsCheckbox().should('not.be.checked');
75
+ VisualGraphSteps.saveSettings();
76
+
77
+ // Then, I expect to see a full non-truncated label for ex:node4.
78
+ HtmlUtil.verifyNoEllipsis(VisualGraphSteps.getNodeLabel('http://example.com/node4'));
67
79
  });
68
80
  });
@@ -1,7 +1,9 @@
1
- import {VisualGraphSteps} from "../../../steps/visual-graph-steps";
2
- import {ApplicationSteps} from "../../../steps/application-steps";
3
- import {LicenseStubs} from "../../../stubs/license-stubs";
4
- import {AutocompleteStubs} from "../../../stubs/autocomplete/autocomplete-stubs";
1
+ import {VisualGraphSteps} from '../../../steps/visual-graph-steps';
2
+ import {ApplicationSteps} from '../../../steps/application-steps';
3
+ import {LicenseStubs} from '../../../stubs/license-stubs';
4
+ import {AutocompleteStubs} from '../../../stubs/autocomplete/autocomplete-stubs';
5
+ import {MainMenuSteps} from '../../../steps/main-menu-steps.js';
6
+ import HomeSteps from '../../../steps/home-steps.js';
5
7
 
6
8
  const FILE_TO_IMPORT = 'wine.rdf';
7
9
  const VALID_RESOURCE = 'USRegion';
@@ -24,6 +26,16 @@ describe('Visual graph screen validation', () => {
24
26
  cy.deleteRepository(repositoryId);
25
27
  });
26
28
 
29
+ context('Embedded', () => {
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')
32
+ VisualGraphSteps.verifyPageLoaded();
33
+ MainMenuSteps.getMainMenu().should('not.exist');
34
+ HomeSteps.getPageFooter().should('not.exist');
35
+ HomeSteps.getPageHeader().should('not.exist');
36
+ });
37
+ });
38
+
27
39
  context('When autocomplete is disabled', () => {
28
40
  it('Test notification when autocomplete is disabled', () => {
29
41
  cy.visit('graphs-visualizations');
@@ -57,8 +69,8 @@ describe('Visual graph screen validation', () => {
57
69
  it('Test search for a valid resource', {
58
70
  retries: {
59
71
  openMode: 0,
60
- runMode: 1
61
- }
72
+ runMode: 1,
73
+ },
62
74
  }, () => {
63
75
  AutocompleteStubs.spyAutocompleteStatus();
64
76
  VisualGraphSteps.visit();
@@ -72,7 +84,7 @@ describe('Visual graph screen validation', () => {
72
84
  VisualGraphSteps.verifyPageLoaded();
73
85
  VisualGraphSteps.searchForResourceAndOpen(VALID_RESOURCE, VALID_RESOURCE);
74
86
  // Verify redirection to existing visual graph
75
- cy.url().should('match', /USRegion$/);
87
+ cy.url().should('include', 'USRegion');
76
88
  });
77
89
 
78
90
  it('Test default graph state', () => {
@@ -125,7 +137,7 @@ describe('Visual graph screen validation', () => {
125
137
  // Verify that the default settings are as follows:
126
138
  // Maximum links to show: 20
127
139
  VisualGraphSteps.getLinksNumberField().and('have.value', '20');
128
- // Update default 20
140
+ // Update default 20
129
141
  VisualGraphSteps.updateLinksLimitField('1001')
130
142
  .then(() => {
131
143
  // Try to put invalid value such as 1001
@@ -207,8 +219,8 @@ describe('Visual graph screen validation', () => {
207
219
  VisualGraphSteps.getNodes().and('have.length', 4);
208
220
  // Click once on node different than parent one with the mouse
209
221
  cy.get('.node-wrapper circle').eq(1)
210
- // The wait is needed because mouseover event will result in
211
- // pop-up of menu icons only if nodes are not moving
222
+ // The wait is needed because mouseover event will result in
223
+ // pop-up of menu icons only if nodes are not moving
212
224
  .should('be.visible').wait(5000)
213
225
  .trigger('mouseover', {force: true});
214
226
  // Select remove function
@@ -233,7 +245,7 @@ describe('Visual graph screen validation', () => {
233
245
  cy.get('.incontext-search-rdf-resource input').should('be.visible');
234
246
  });
235
247
 
236
- it('Test expand collapsed node which has connections with double click', () => {
248
+ it('Test expand collapsed node which has connections with double click', () => {
237
249
  VisualGraphSteps.openUSRegionUri();
238
250
  VisualGraphSteps.toggleInferredStatements(false);
239
251
 
@@ -0,0 +1,49 @@
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 {AutocompleteSteps} from '../../../steps/setup/autocomplete-steps.js';
5
+ import {GuidesStubs} from '../../../stubs/guides/guides-stubs.js';
6
+
7
+ describe('Enable autocomplete guide steps', () => {
8
+ let repositoryId;
9
+
10
+ beforeEach(() => {
11
+ repositoryId = 'enable-autocomplete-guide-' + Date.now();
12
+ GuidesStubs.stubEnableAutocompleteGuide();
13
+ cy.createRepository({id: repositoryId});
14
+ cy.presetRepository(repositoryId);
15
+
16
+ GuideSteps.visit();
17
+ GuideSteps.verifyGuidesListExists();
18
+ cy.wait('@getGuides');
19
+ GuideSteps.runFirstGuide()
20
+ });
21
+
22
+ afterEach(() => {
23
+ cy.deleteRepository(repositoryId);
24
+ });
25
+
26
+ it('Should enable autocomplete', () => {
27
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Enable autocomplete — 1/5');
28
+ GuideDialogSteps.assertDialogWithContentIsVisible('The following steps show how to use the Autocomplete index view to enable the autocomplete index.');
29
+ GuideDialogSteps.clickOnNextButton();
30
+
31
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Enable autocomplete — 2/5');
32
+ GuideDialogSteps.assertDialogWithContentIsVisible('Click on the Setup menu.');
33
+ MainMenuSteps.clickOnMenuSetup();
34
+
35
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Enable autocomplete — 3/5');
36
+ GuideDialogSteps.assertDialogWithContentIsVisible('Click on the Autocomplete menu.');
37
+ MainMenuSteps.clickOnSubmenuAutocomplete();
38
+
39
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Enable autocomplete — 4/5');
40
+ GuideDialogSteps.assertDialogWithContentIsVisible('Click on the checkbox to enable the index.');
41
+ AutocompleteSteps.enableToggleAutocomplete();
42
+
43
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Enable autocomplete — 5/5');
44
+ GuideDialogSteps.assertDialogWithContentIsVisible('Wait until indexing finished.');
45
+
46
+ GuideDialogSteps.clickOnCloseButton();
47
+ GuideDialogSteps.assertDialogIsClosed();
48
+ });
49
+ });
@@ -0,0 +1,89 @@
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 ClassViewsSteps from '../../../steps/class-views-steps.js';
6
+
7
+ describe('Class hierarchy guide steps', () => {
8
+ let repositoryId;
9
+ const FILE_TO_IMPORT = 'swapi-dataset.ttl';
10
+
11
+ beforeEach(() => {
12
+ repositoryId = 'class-hierarchy-guide-' + Date.now();
13
+ GuidesStubs.stubClassHierarchyGuide();
14
+ cy.createRepository({id: repositoryId});
15
+ cy.presetRepository(repositoryId);
16
+ cy.importServerFile(repositoryId, FILE_TO_IMPORT);
17
+
18
+ GuideSteps.visit();
19
+ GuideSteps.verifyGuidesListExists();
20
+ cy.wait('@getGuides');
21
+ GuideSteps.runFirstGuide();
22
+ });
23
+
24
+ afterEach(() => {
25
+ cy.deleteRepository(repositoryId);
26
+ });
27
+
28
+ it('Should test class hierarchy', () => {
29
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Class hierarchy instances — 1/7');
30
+ GuideDialogSteps.assertDialogWithContentIsVisible('Click on voc:Sentient to show its instances.');
31
+ ClassViewsSteps.selectClassElement('voc:Sentient');
32
+
33
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Class hierarchy instances — 2/7');
34
+ GuideDialogSteps.assertDialogWithContentIsVisible('The side panel shows the first 1,000 instances of the clicked class, voc:Sentient.');
35
+ GuideDialogSteps.clickOnNextButton();
36
+
37
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Class hierarchy instances — 3/7');
38
+ GuideDialogSteps.assertDialogWithContentIsVisible('https://swapi.co/resource/aleena/47 is an instance of the class voc:Sentient.');
39
+ GuideDialogSteps.assertDialogWithContentIsVisible('This is planet');
40
+ GuideDialogSteps.clickOnNextButton();
41
+
42
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Class hierarchy instances — 4/7');
43
+ GuideDialogSteps.assertDialogWithContentIsVisible('This link shows the number of instances for the selected class, voc:Sentient. Click on the link to open the SPARQL editor with a preloaded query that selects all instances.');
44
+ ClassViewsSteps.clickInstanceCountLink();
45
+
46
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Class hierarchy instances — 5/7');
47
+ GuideDialogSteps.assertDialogWithContentIsVisible('This SPARQL query selects all instances of the class voc:Sentient. The query was entered automatically when you clicked on the view instances link.');
48
+ GuideDialogSteps.clickOnNextButton();
49
+
50
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Class hierarchy instances — 6/7');
51
+ GuideDialogSteps.assertDialogWithContentIsVisible('The table shows the results. Note that in this particular case, the query was executed automatically.');
52
+ GuideDialogSteps.assertDialogWithContentIsVisible('Do not worry — there will be a dedicated section on the SPARQL editor later in the guide.');
53
+ GuideDialogSteps.clickOnNextButton();
54
+
55
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Class hierarchy instances — 7/7');
56
+ GuideDialogSteps.assertDialogWithContentIsVisible('You can close the panel by clicking on the X icon.');
57
+ ClassViewsSteps.closeInfoSidePanel();
58
+
59
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Explore the class hierarchy — 1/7');
60
+ GuideDialogSteps.assertDialogWithContentIsVisible('The following steps show how to use the Class hierarchy view to inspect the class hierarchy and gain an insight on what the dataset contains.');
61
+ GuideDialogSteps.clickOnNextButton();
62
+
63
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Explore the class hierarchy — 2/7');
64
+ GuideDialogSteps.assertDialogWithContentIsVisible('Click on the Explore menu.');
65
+ MainMenuSteps.clickOnExplore();
66
+
67
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Explore the class hierarchy — 3/7');
68
+ GuideDialogSteps.assertDialogWithContentIsVisible('Click on the Class hierarchy menu.');
69
+ MainMenuSteps.clickOnSubmenuClassHierarchy();
70
+
71
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Explore the class hierarchy — 4/7');
72
+ GuideDialogSteps.assertDialogWithContentIsVisible('The biggest circle shows all top-level classes. Every class may have subclasses shown as smaller circles within their parent class. The size of each circle indicates the proportion of RDF resources that belong to that class. Thus, bigger circles are classes that have more instances.');
73
+ GuideDialogSteps.clickOnNextButton();
74
+
75
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Explore the class hierarchy — 5/7');
76
+ GuideDialogSteps.assertDialogWithContentIsVisible('This is some extra content here');
77
+ GuideDialogSteps.clickOnNextButton();
78
+
79
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Explore the class hierarchy — 6/7');
80
+ GuideDialogSteps.assertDialogWithContentIsVisible('The class voc:Sentient is a parent class that has subclasses. Zoom inside to have a better view by scrolling up with the mouse inside the circle.');
81
+ GuideDialogSteps.clickOnNextButton();
82
+
83
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Explore the class hierarchy — 7/7');
84
+ GuideDialogSteps.assertDialogWithContentIsVisible('Within voc:Sentient are subclasses like voc:Human (humanoids), voc:Droid (mechanical intelligences), voc:Gungan (the Gungan species), and voc:Yodasspecies (Yoda’s lineage), highlighting the diverse forms of sentient life.');
85
+
86
+ GuideDialogSteps.clickOnCloseButton();
87
+ GuideDialogSteps.assertDialogIsClosed();
88
+ });
89
+ });
@@ -0,0 +1,76 @@
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
+
6
+ describe('Class relations guide steps', () => {
7
+ let repositoryId;
8
+ const FILE_TO_IMPORT = 'swapi-dataset.ttl';
9
+ const SECOND_FILE_TO_IMPORT = 'wine.rdf';
10
+
11
+ beforeEach(() => {
12
+ repositoryId = 'class-relations-guide-' + Date.now();
13
+ GuidesStubs.stubClassRelationsGuide();
14
+ cy.createRepository({id: repositoryId});
15
+ cy.presetRepository(repositoryId);
16
+ cy.importServerFile(repositoryId, FILE_TO_IMPORT);
17
+ cy.importServerFile(repositoryId, SECOND_FILE_TO_IMPORT, {context: 'http://wine.org/'});
18
+
19
+ GuideSteps.visit();
20
+ GuideSteps.verifyGuidesListExists();
21
+ cy.wait('@getGuides');
22
+ GuideSteps.runFirstGuide();
23
+ });
24
+
25
+ afterEach(() => {
26
+ cy.deleteRepository(repositoryId);
27
+ });
28
+
29
+ it('Should test class relations guide steps', () => {
30
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Explore the class relationships — 1/5');
31
+ GuideDialogSteps.assertDialogWithContentIsVisible('The following steps show how to use the Class relationships view to explore how classes are connected and understand the relationships between different types of data in your dataset.');
32
+ GuideDialogSteps.clickOnNextButton();
33
+
34
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Explore the class relationships — 2/5');
35
+ GuideDialogSteps.assertDialogWithContentIsVisible('Click on the Explore menu.');
36
+ MainMenuSteps.clickOnExplore();
37
+
38
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Explore the class relationships — 3/5');
39
+ GuideDialogSteps.assertDialogWithContentIsVisible('Click on the Class relationships menu.');
40
+ MainMenuSteps.clickOnSubmenuClassRelationships();
41
+
42
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Explore the class relationships — 4/5');
43
+ GuideDialogSteps.assertDialogWithContentIsVisible('This view shows how data instances from different classes are connected based on real RDF statements.');
44
+ GuideDialogSteps.clickOnNextButton();
45
+
46
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Explore the class relationships — 5/5');
47
+ GuideDialogSteps.assertDialogWithContentIsVisible('Some extra info');
48
+ GuideDialogSteps.clickOnNextButton();
49
+
50
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Class relationships');
51
+ GuideDialogSteps.assertDialogWithContentIsVisible('Each connection line varies in thickness based on the number of links, color based on the class with more incoming links, and direction as links may go both ways (from class A to class B and vice versa).');
52
+ GuideDialogSteps.clickOnNextButton();
53
+
54
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Class relationships');
55
+ GuideDialogSteps.assertDialogWithContentIsVisible('Click on any connection line in the diagram to see the top predicates used between those two classes. This helps to understand what kind of relationships link them.');
56
+ GuideDialogSteps.clickOnNextButton();
57
+
58
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Class relationships');
59
+ GuideDialogSteps.assertDialogWithContentIsVisible('If the repository contains more than one named graph, you can filter the view by opening the All graphs dropdown (next to the toolbar) and selecting the graph to explore.');
60
+ GuideDialogSteps.clickOnNextButton();
61
+
62
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Class relationships');
63
+ GuideDialogSteps.assertDialogWithContentIsVisible('The left panel shows all classes, sorted by number of links, displaying both incoming and outgoing connections.');
64
+ GuideDialogSteps.clickOnNextButton();
65
+
66
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Class relationships');
67
+ GuideDialogSteps.assertDialogWithContentIsVisible('A green background behind a class name in the list indicates that it is currently shown in the diagram.');
68
+ GuideDialogSteps.clickOnNextButton();
69
+
70
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Class relationships');
71
+ GuideDialogSteps.assertDialogWithContentIsVisible('Use the + / – icons next to each class name to add or remove it from the diagram display.');
72
+
73
+ GuideDialogSteps.clickOnCloseButton();
74
+ GuideDialogSteps.assertDialogIsClosed();
75
+ });
76
+ });
@@ -0,0 +1,152 @@
1
+ import {GuideSteps} from '../../../steps/guides/guide-steps.js';
2
+ import {GuideDialogSteps} from '../../../steps/guides/guide-dialog-steps.js';
3
+ import {GuidesStubs} from '../../../stubs/guides/guides-stubs.js';
4
+ import {ConnectorsSteps} from '../../../steps/setup/connectors-steps.js';
5
+
6
+ describe('Connectors guide', () => {
7
+ let repositoryId;
8
+
9
+ beforeEach(() => {
10
+ repositoryId = 'connectors-guide-' + Date.now();
11
+ cy.createRepository({id: repositoryId});
12
+ cy.presetRepository(repositoryId);
13
+ });
14
+
15
+ afterEach(() => {
16
+ cy.deleteRepository(repositoryId);
17
+ });
18
+
19
+ describe('General connectors guide steps', () => {
20
+ const instanceName = 'LuceneConnector';
21
+ beforeEach(() => {
22
+ GuidesStubs.stubConnectorsGuide();
23
+ cy.createConnector(repositoryId, 'lucene', instanceName);
24
+
25
+ GuideSteps.visit();
26
+ GuideSteps.verifyGuidesListExists();
27
+ cy.wait('@getGuides');
28
+ GuideSteps.runFirstGuide();
29
+ });
30
+ it('Should test connectors steps', () => {
31
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Connectors');
32
+ GuideDialogSteps.assertDialogWithContentIsVisible('GraphDB Connectors let you integrate external components and services with your repository data. They extend what your applications can do and stay automatically in sync with repository updates.');
33
+ GuideDialogSteps.clickOnNextButton();
34
+
35
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Connectors');
36
+ GuideDialogSteps.assertDialogWithContentIsVisible('Specific GraphDB Connectors provide different connection possibilities.');
37
+ GuideDialogSteps.clickOnNextButton();
38
+
39
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Connectors');
40
+ GuideDialogSteps.assertDialogWithContentIsVisible('Each section represents a single connector instance. For every instance, you can use the buttons on the right to copy, repair, or delete it.');
41
+ GuideDialogSteps.clickOnNextButton();
42
+
43
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Connectors');
44
+ GuideDialogSteps.assertDialogWithContentIsVisible('To view the configuration of a connector, click on its name. This will expand the connector details.');
45
+ ConnectorsSteps.expandConnector('Lucene', instanceName);
46
+
47
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Connectors');
48
+ GuideDialogSteps.assertDialogWithContentIsVisible('The creation parameters for luc:createConnector define how a connector instance is created. They are provided in a JSON object with parameter names as keys. Some parameters are required, others optional, and values can be simple types, lists, or objects');
49
+ GuideDialogSteps.clickOnNextButton();
50
+
51
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Connectors');
52
+ GuideDialogSteps.assertDialogWithContentIsVisible('A parameter can define how an instance is created. Its value may be a simple type, a list, or an object, and it can be required or optional.');
53
+ GuideDialogSteps.clickOnNextButton();
54
+
55
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Connectors');
56
+ GuideDialogSteps.assertDialogWithContentIsVisible('Click on View SPARQL Query to view the connector creation query.');
57
+ ConnectorsSteps.viewSPARQLQuery('Lucene', instanceName);
58
+
59
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Connectors');
60
+ GuideDialogSteps.assertDialogWithContentIsVisible('The dialog displays the SPARQL query used to create the connector. You can copy it to execute manually or integrate it into automation scripts.');
61
+ GuideDialogSteps.clickOnNextButton();
62
+
63
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Connectors');
64
+ GuideDialogSteps.assertDialogWithContentIsVisible('Click on close button to close the dialog');
65
+ ConnectorsSteps.closeSPARQLQueryDialog();
66
+
67
+ GuideDialogSteps.assertDialogWithTitleIsVisible('End of guide');
68
+ GuideDialogSteps.assertDialogWithContentIsVisible('This guide has ended.');
69
+ });
70
+ });
71
+
72
+ describe('Lucene connector guide steps', () => {
73
+ const instanceName = 'NamedIndividuals';
74
+ beforeEach(() => {
75
+ GuidesStubs.stubLuceneConnectorsGuide();
76
+ cy.createConnector(repositoryId, 'lucene', instanceName);
77
+
78
+ GuideSteps.visit();
79
+ GuideSteps.verifyGuidesListExists();
80
+ cy.wait('@getGuides');
81
+ GuideSteps.runFirstGuide();
82
+ });
83
+ it.only('Should test Lucene connector steps', () => {
84
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Lucene connector');
85
+ GuideDialogSteps.assertDialogWithContentIsVisible('The Lucene Connector in GraphDB enables extremely fast keyword and faceted (aggregation) searches. Unlike traditional setups where indexing is handled externally, this connector stays automatically synchronized with your repository data, ensuring accurate and up-to-date search results at all times.');
86
+ GuideDialogSteps.clickOnNextButton();
87
+
88
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Lucene connector');
89
+ GuideDialogSteps.assertDialogWithContentIsVisible('This is the Lucene connector named NamedIndividuals. You can copy, restart, or delete it using the icons on the right.');
90
+ GuideDialogSteps.clickOnNextButton();
91
+
92
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Lucene connector');
93
+ GuideDialogSteps.assertDialogWithContentIsVisible('Click on NamedIndividuals to view its configuration.');
94
+ ConnectorsSteps.expandConnector('Lucene', instanceName);
95
+
96
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Lucene connector');
97
+ GuideDialogSteps.assertDialogWithContentIsVisible('The fields define exactly what parts of each entity will be synchronized as well as the specific details on the connector side. The field is the smallest synchronization unit, and it maps a property chain from GraphDB to a field in Lucene. The fields are specified as a list of field objects. At least one field object is required.');
98
+ GuideDialogSteps.clickOnNextButton();
99
+
100
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Lucene connector');
101
+ GuideDialogSteps.assertDialogWithContentIsVisible('The Field name defines the mapping on the connector side and is specified as a string. It is also used at query time to reference the field.');
102
+ GuideDialogSteps.clickOnNextButton();
103
+
104
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Lucene connector');
105
+ GuideDialogSteps.assertDialogWithContentIsVisible('The Property chain defines the mapping on the GraphDB side. A property chain is a sequence of triples where the entity IRI is the subject of the first triple, its object is the subject of the next triple, and so on. A single-element property chain corresponds to a direct property. Property chains are specified as a list of IRIs, with at least one required.');
106
+ GuideDialogSteps.clickOnNextButton();
107
+
108
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Lucene connector');
109
+ GuideDialogSteps.assertDialogWithContentIsVisible('The Indexed option determines whether the field is searchable with Lucene queries. By default, indexing is enabled.');
110
+ GuideDialogSteps.clickOnNextButton();
111
+
112
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Lucene connector');
113
+ GuideDialogSteps.assertDialogWithContentIsVisible('The Stored option determines whether the field’s values are stored in Lucene. By default, fields are stored (true).');
114
+ GuideDialogSteps.clickOnNextButton();
115
+
116
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Lucene connector');
117
+ GuideDialogSteps.assertDialogWithContentIsVisible('The Analyzed option determines whether literal fields are processed by the analyzer when indexed. IRIs are never analyzed. By default, fields are analyzed (true).');
118
+ GuideDialogSteps.clickOnNextButton();
119
+
120
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Lucene connector');
121
+ GuideDialogSteps.assertDialogWithContentIsVisible('The Multivalued option specifies whether multiple values for RDF properties are synchronized to Lucene. True by default; if false, only a single value is synchronized.');
122
+ GuideDialogSteps.clickOnNextButton();
123
+
124
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Lucene connector');
125
+ GuideDialogSteps.assertDialogWithContentIsVisible('The Facet option specifies whether the field is available for faceted searches in Lucene. Managed by the facet option (boolean, true by default).');
126
+ GuideDialogSteps.clickOnNextButton();
127
+
128
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Lucene connector');
129
+ GuideDialogSteps.assertDialogWithContentIsVisible('The Languages option defines which RDF literal languages are mapped to the connector. You can provide a list of language ranges to include specific languages, or an empty range to include literals without a language tag.');
130
+ GuideDialogSteps.clickOnNextButton();
131
+
132
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Lucene connector');
133
+ GuideDialogSteps.assertDialogWithContentIsVisible('The Types option specifies RDF types of entities to synchronize, given as a list of IRIs (at least one required).Special values: $any: sync entities with at least one RDF type.$untyped: sync entities even if they have no RDF type.');
134
+ GuideDialogSteps.clickOnNextButton();
135
+
136
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Lucene connector');
137
+ GuideDialogSteps.assertDialogWithContentIsVisible('Click on View SPARQL Query to view the Lucene connector creation query.');
138
+ ConnectorsSteps.viewSPARQLQuery('Lucene', instanceName);
139
+
140
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Lucene connector');
141
+ GuideDialogSteps.assertDialogWithContentIsVisible('The dialog displays the SPARQL query used to create the Lucene connector. You can copy it to execute manually or integrate it into automation scripts.');
142
+ GuideDialogSteps.clickOnNextButton();
143
+
144
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Connectors');
145
+ GuideDialogSteps.assertDialogWithContentIsVisible('Click on close button to close the dialog');
146
+ ConnectorsSteps.closeSPARQLQueryDialog();
147
+
148
+ GuideDialogSteps.assertDialogWithTitleIsVisible('End of guide');
149
+ GuideDialogSteps.assertDialogWithContentIsVisible('This guide has ended.');
150
+ });
151
+ });
152
+ });