graphdb-workbench-tests 3.4.0-migrated-guide-services → 3.5.0-reactodia-poc

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 (42) hide show
  1. package/e2e-legacy/cluster/cluster-states.spec.js +3 -3
  2. package/e2e-legacy/explore/visual-graph/node-info-panel.spec.js +58 -0
  3. package/e2e-legacy/explore/visual-graph/visual-graph-links-limit.spec.js +167 -0
  4. package/e2e-legacy/explore/visual-graph/visual.graph.spec.js +55 -78
  5. package/e2e-legacy/graphql/graphql-in-remote-location.spec.js +49 -0
  6. package/e2e-legacy/guides/table-graph-explore/table-graph-explore-guide.spec.js +2 -1
  7. package/e2e-legacy/guides/ttyg/configure-agent/configure-agent-guide.spec.js +34 -26
  8. package/e2e-legacy/guides/visual-graph/visual-graph-guide.spec.js +42 -58
  9. package/e2e-legacy/home/create-repository.spec.js +6 -0
  10. package/e2e-legacy/repository/attach-remote-location.spec.js +47 -12
  11. package/e2e-legacy/repository/url-with-repository-id-parameter.spec.js +1 -1
  12. package/e2e-legacy/resource/resource.spec.js +33 -13
  13. package/e2e-legacy/setup/aclmanagement/acl-management-with-selected repository.spec.js +44 -0
  14. package/e2e-legacy/sparql-editor/actions/execute-query.spec.js +2 -0
  15. package/e2e-legacy/sparql-editor/actions/expand-results-over-sameas.spec.js +8 -8
  16. package/e2e-legacy/sparql-editor/actions/include-inferred-statements.spec.js +4 -4
  17. package/e2e-legacy/sparql-editor/actions/inferred-sameas.spec.js +3 -3
  18. package/e2e-legacy/sparql-editor/yasr/toolbar/visual-graph-button.spec.js +90 -36
  19. package/e2e-legacy/sparql-editor/yasr/yasr.spec.js +80 -0
  20. package/fixtures/graph/graph-configurations.json +59 -0
  21. package/fixtures/guides/ttyg/configure-agent/configure-ttyg-agent-guide.json +6 -1
  22. package/npm-shrinkwrap.json +32 -33
  23. package/package.json +1 -1
  24. package/steps/graphql/create-graphql-endpoint-steps.js +8 -0
  25. package/steps/graphql/graphql-endpoint-management-steps.js +8 -0
  26. package/steps/graphql/graphql-playground-steps.js +8 -0
  27. package/steps/guides/movies-guide-steps.js +2 -1
  28. package/steps/home-steps.js +4 -7
  29. package/steps/repositories/attach-repository-steps.js +16 -0
  30. package/steps/repository-steps.js +24 -0
  31. package/steps/resource/resource-steps.js +0 -8
  32. package/steps/setup/acl-management-steps.js +12 -0
  33. package/steps/sparql-editor-steps.js +18 -4
  34. package/steps/ttyg/ttyg-agent-settings-modal.steps.js +1 -1
  35. package/steps/visual-graph-split-button-steps.js +45 -0
  36. package/steps/visual-graph-steps.js +12 -0
  37. package/steps/yasgui/yasr-steps.js +30 -6
  38. package/stubs/cluster/remote-location-stubs.js +4 -0
  39. package/stubs/graph-config-stubs.js +17 -0
  40. package/support/commands.js +1 -0
  41. package/support/repository-commands.js +22 -3
  42. package/support/url-commands.js +13 -0
@@ -104,14 +104,14 @@ describe('Cluster states', () => {
104
104
  ClusterViewSteps.getLink('pc-desktop-7300-pc-desktop-7302').should('have.css', 'stroke-dasharray', '10px, 10px')
105
105
  .and('have.css', 'marker-mid', 'url("#arrowhead_big")')
106
106
  .invoke('attr', 'stroke')
107
- .should('eq', 'var(--gw-secondary-base)');
107
+ .should('eq', 'var(--gw-foreground-on-surface-primary)');
108
108
  // And I expect an out of sync link between the leader and the out of sync node (the one receiving the snapshot)
109
109
  ClusterViewSteps.getLink('pc-desktop-7301-pc-desktop-7300').should('have.css', 'stroke-dasharray', '10px, 10px')
110
110
  .invoke('attr', 'stroke')
111
- .should('eq', 'var(--gw-neutral-base)');
111
+ .should('eq', 'var(--gw-neutral-light)');
112
112
  // And I expect to have an in sync link between the leader and the node sending the snapshot
113
113
  ClusterViewSteps.getLink('pc-desktop-7301-pc-desktop-7302').should('have.css', 'stroke-dasharray', 'none')
114
114
  .invoke('attr', 'stroke')
115
- .should('eq', 'var(--gw-secondary-base)');
115
+ .should('eq', 'var(--gw-foreground-on-surface-primary)');
116
116
  });
117
117
  });
@@ -0,0 +1,58 @@
1
+ import {VisualGraphSteps} from '../../../steps/visual-graph-steps.js';
2
+ import {ApplicationSteps} from '../../../steps/application-steps.js';
3
+
4
+ const DATA_SNIPPET =
5
+ 'PREFIX ex: <http://example.org/>\n' +
6
+ 'PREFIX sysont: <http://www.ontotext.com/proton/protonsys#>\n' +
7
+ 'PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>\n' +
8
+ 'ex:MyNode a ex:Thing ;\n' +
9
+ 'rdfs:label "My Node" ;\n' +
10
+ 'ex:description """# My Node\n\nThis is a **Markdown** literal.\n\n- item 1\n- item 2"""^^sysont:Markdown .';
11
+
12
+ describe('Node info panel', () => {
13
+ let repositoryId;
14
+ let graphConfigName;
15
+
16
+ beforeEach(() => {
17
+ cy.clearLocalStorage('ls.graphs-viz');
18
+ repositoryId = 'node-info-panel-' + Date.now();
19
+ graphConfigName = 'graph-config-' + Date.now();
20
+ cy.createRepository({id: repositoryId});
21
+ cy.presetRepository(repositoryId);
22
+ cy.importRDFTextSnippet(repositoryId, DATA_SNIPPET);
23
+ })
24
+
25
+ afterEach(() => {
26
+ cy.clearLocalStorage('ls.graphs-viz');
27
+ cy.deleteGraphConfig(graphConfigName);
28
+ cy.deleteRepository(repositoryId);
29
+ });
30
+
31
+ it('should render markdown content for literals with markdown datatype', () => {
32
+ cy.enableAutocomplete(repositoryId);
33
+ // Given I have opened the graphs visualizations page
34
+ VisualGraphSteps.visit();
35
+ // And I have created a graph config with query results
36
+ VisualGraphSteps.getCreateCustomGraphLink().click();
37
+ cy.url().should('include', '/config/save');
38
+ VisualGraphSteps.typeGraphConfigName(graphConfigName);
39
+ VisualGraphSteps.selectStartMode('node');
40
+ VisualGraphSteps.selectStartNode('MyNode', 0);
41
+ VisualGraphSteps.saveConfig();
42
+ ApplicationSteps.getSuccessNotifications().should('be.visible');
43
+ VisualGraphSteps.getGraphConfig(graphConfigName).should('be.visible');
44
+ // When I open the graph config
45
+ VisualGraphSteps.openGraphConfig(graphConfigName);
46
+ // Then I expect the graph visualization of the saved config to be opened
47
+ cy.url().should('contain', Cypress.config('baseUrl') + '/graphs-visualizations?config=');
48
+ VisualGraphSteps.getGraphVisualizationPane().should('be.visible');
49
+ // When I click on the node with markdown content
50
+ VisualGraphSteps.getCircleOfNodeByNodeId('http://example.org/MyNode').click();
51
+ // Then node info panel should be opened
52
+ VisualGraphSteps.getSidePanelContent().should('be.visible');
53
+ // And the markdown typed literal should be rendered
54
+ VisualGraphSteps.getPropertyByIndex(1).should('contain', 'This is a Markdown literal')
55
+ .and('contain', 'item 1')
56
+ .and('contain', 'item 2');
57
+ });
58
+ });
@@ -0,0 +1,167 @@
1
+ import {VisualGraphSteps} from '../../../steps/visual-graph-steps';
2
+ import {MainMenuSteps} from '../../../steps/main-menu-steps.js';
3
+ import {LicenseStubs} from '../../../stubs/license-stubs';
4
+ import {ApplicationSteps} from '../../../steps/application-steps';
5
+ import HomeSteps from '../../../steps/home-steps.js';
6
+ import {BaseSteps} from "../../../steps/base-steps.js";
7
+ import SparqlSteps from "../../../steps/sparql-steps.js";
8
+ import {VisualGraphSplitButtonSteps} from '../../../steps/visual-graph-split-button-steps.js';
9
+
10
+ const FILE_TO_IMPORT = 'wine.rdf';
11
+ const VALID_RESOURCE = 'USRegion';
12
+ const DEFAULT_LINKS_LIMIT = 100;
13
+
14
+ describe('Visual graph linksLimit URL parameter', () => {
15
+
16
+ let repositoryId;
17
+
18
+ beforeEach(() => {
19
+ cy.clearLocalStorage('ls.graphs-viz');
20
+ repositoryId = 'graphRepo-' + Date.now();
21
+ cy.createRepository({id: repositoryId});
22
+ cy.presetRepository(repositoryId);
23
+ cy.importServerFile(repositoryId, FILE_TO_IMPORT);
24
+ cy.enableAutocomplete(repositoryId);
25
+
26
+ LicenseStubs.spyGetLicense();
27
+ });
28
+
29
+ afterEach(() => {
30
+ cy.clearLocalStorage('ls.graphs-viz');
31
+ cy.deleteRepository(repositoryId);
32
+ });
33
+
34
+ it('Should include linksLimit as a URL parameter and respect its value', () => {
35
+ // Given I am on the home page, and I don't have a linkLimit in the URL
36
+ HomeSteps.visit();
37
+ BaseSteps.getUrl().should('not.include', 'linksLimit');
38
+
39
+ // When, I visit the visual graph via the main menu and open a resource
40
+ MainMenuSteps.clickOnVisualGraph();
41
+ VisualGraphSteps.verifyPageLoaded();
42
+ VisualGraphSteps.searchForResourceAndOpen(VALID_RESOURCE, VALID_RESOURCE);
43
+
44
+ // Then, I expect to see the visual graph with the default linksLimit
45
+ BaseSteps.getUrl().should('include', `linksLimit=${DEFAULT_LINKS_LIMIT}`);
46
+ // And the limit shown warning should not exist, since it is currently 100 (default) and we have less than that
47
+ VisualGraphSteps.getShownLimitMessage().should('not.exist');
48
+
49
+ // When, I update the link limit from the input field
50
+ VisualGraphSteps.updateLinksLimitField(5);
51
+ // Then I limit shown warning to exist,since we have more than 5 links
52
+ VisualGraphSteps.getShownLimitMessage().should('exist');
53
+ // And I expect the URL to include the updated linksLimit in the URL
54
+ BaseSteps.getUrl().should('include', 'linksLimit=5');
55
+ // And, I expect to see the visual graph with the updated linksLimit
56
+ VisualGraphSteps.getNodes().should('have.length', 6); // 5 links plus the main node
57
+
58
+ // When, I change the linksLimit URL param directly to 10 and navigate to the updated URL
59
+ BaseSteps.getUrl().then((url) => {
60
+ const newUrl = new URL(url);
61
+ newUrl.searchParams.set('linksLimit', '10');
62
+ BaseSteps.visit(newUrl.toString().replace(Cypress.config('baseUrl'), ''));
63
+ });
64
+ // Then, I expect to see the visual graph with the updated linksLimit
65
+ VisualGraphSteps.getNodes().should('have.length', 11) // 10 links plus the main node;
66
+ // And, I expect the menu to be updated with the new linksLimit
67
+ VisualGraphSteps.getLinksNumberField().should('have.value', '10');
68
+ });
69
+
70
+ it('Should show an error toast and ignore linksLimit when the URL param value is invalid', () => {
71
+ // Given, I visit the visual graph with an invalid linksLimit URL param (outside the 1-1000 range)
72
+ BaseSteps.visit(`/graphs-visualizations?uri=http:%2F%2Fwww.w3.org%2FTR%2F2003%2FPR-owl-guide-20031209%2Fwine%23${VALID_RESOURCE}&linksLimit=9999`);
73
+
74
+ // Then, I expect to see an error notification about the invalid links limit
75
+ ApplicationSteps.getErrorNotifications()
76
+ .should('be.visible')
77
+ .and('contain', 'Invalid links limit');
78
+ // And I expect to see the visual graph with the default linksLimit
79
+ BaseSteps.getUrl().should('include', 'linksLimit=100');
80
+ VisualGraphSteps.getLinksNumberField().should('have.value', String(DEFAULT_LINKS_LIMIT));
81
+
82
+ // When, I try to set the limit to an invalid value via the form
83
+ VisualGraphSteps.updateLinksLimitField(1001);
84
+
85
+ // Then, I should see a warning message that the link limit is invalid
86
+ VisualGraphSteps.getInvalidLinksMessage().should('be.visible').and('contain', 'Enter a number up to 1000');
87
+ });
88
+
89
+ describe('When the user has a custom graph config', () => {
90
+ const configName = 'linkLimitConfig';
91
+
92
+ it('should change link limit, when starting point is query', () => {
93
+ // Given, I visit the visual graph and create a config with query starting point
94
+ VisualGraphSteps.visit();
95
+ VisualGraphSteps.createCustomGraph();
96
+ VisualGraphSteps.typeGraphConfigName(configName);
97
+ VisualGraphSteps.selectStartMode('query');
98
+ VisualGraphSteps.selectPredefinedQuerySample(0);
99
+ VisualGraphSteps.saveConfig();
100
+ VisualGraphSteps.openGraphConfig(configName);
101
+
102
+ // Then, I expect to see 10 nodes before changing the limit
103
+ BaseSteps.getUrl().should('include', 'linksLimit=100');
104
+ VisualGraphSteps.getNodes().should('have.length', 10); // 10 nodes total, since we don't have a root node
105
+
106
+ // And the limit shown warning should not exist, since it is currently 100 (default) and we have a set ot 10 nodes
107
+ VisualGraphSteps.getShownLimitMessage().should('not.exist');
108
+
109
+ // When, I update the link limit from the input field
110
+ VisualGraphSteps.updateLinksLimitField(5);
111
+
112
+ // Then I limit shown warning to exist, since we have more than 5 links available
113
+ VisualGraphSteps.getShownLimitMessage().should('exist');
114
+
115
+ // Then I expect the URL to include the updated linksLimit in the URL
116
+ BaseSteps.getUrl().should('include', 'linksLimit=5');
117
+ // And, I expect to see the visual graph with the updated linksLimit
118
+ VisualGraphSteps.getNodes().should('have.length', 5); // 5 nodes total, since we don't have a root node
119
+ });
120
+
121
+ afterEach(() => {
122
+ cy.deleteGraphConfig(configName)
123
+ });
124
+ });
125
+
126
+ describe('When the user has opened a graph with construct query', () => {
127
+ it('should change link limit, when is graph is opened in queryResultsMode', () => {
128
+ // Given, I open a graph in queryResultsMode (after construct query in the SPARQL editor)
129
+ // And enter a construct query, so I can visualize the results in a graph
130
+ SparqlSteps.visit();
131
+ SparqlSteps.typeQuery(`CONSTRUCT WHERE {?s ?p ?o} LIMIT 10`);
132
+ SparqlSteps.executeQuery();
133
+ VisualGraphSplitButtonSteps.clickOnVisualizeMainButton();
134
+
135
+ // Then, I expect to see 10 nodes before changing the limit
136
+ BaseSteps.getUrl().should('include', 'linksLimit=100');
137
+ VisualGraphSteps.getNodes().should('have.length', 10); // 10 nodes total, since we don't have a root node
138
+
139
+ // And the limit shown warning should not exist, since it is currently 100 (default) and we have a set ot 10 nodes
140
+ VisualGraphSteps.getShownLimitMessage().should('not.exist');
141
+
142
+ // When, I update the link limit from the input field
143
+ VisualGraphSteps.updateLinksLimitField(5);
144
+
145
+ // Then I expect the URL to include the updated linksLimit in the URL
146
+ BaseSteps.getUrl().should('include', 'linksLimit=5');
147
+ // And, I expect to see the visual graph with the updated linksLimit
148
+ VisualGraphSteps.getNodes().should('have.length', 5); // 5 nodes total, since we don't have a root node
149
+
150
+ // And, the limit shown warning should appear as we are showing the limit
151
+ VisualGraphSteps.getShownLimitMessage().should('exist');
152
+
153
+ // When, I set the limit to the number of nodes from the query
154
+ VisualGraphSteps.updateLinksLimitField(10);
155
+
156
+ // Then I expect limit shown warning to exist
157
+ VisualGraphSteps.getShownLimitMessage().should('exist');
158
+
159
+ // When I set it to 1 more than the number of nodes from the query
160
+ VisualGraphSteps.updateLinksLimitField(11);
161
+ // Then I expect the limit shown warning to not exist
162
+ VisualGraphSteps.getShownLimitMessage().should('not.exist');
163
+ });
164
+ });
165
+ });
166
+
167
+
@@ -26,7 +26,7 @@ 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
31
  cy.visit('/graphs-visualizations?uri=http:%2F%2Fwww.w3.org%2FTR%2F2003%2FPR-owl-guide-20031209%2Fwine%23Chardonnay&embedded');
32
32
  VisualGraphSteps.verifyPageLoaded();
@@ -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
@@ -84,12 +84,12 @@ describe('Visual graph screen validation', () => {
84
84
 
85
85
  it('Test default graph state', () => {
86
86
  VisualGraphSteps.openUSRegionUri();
87
- VisualGraphSteps.openVisualGraphSettings();
87
+ // Verify that the default settings are as follows:
88
+ // Maximum links to show: 100
89
+ VisualGraphSteps.getLinksNumberField().and('have.value', '100');
88
90
 
91
+ VisualGraphSteps.openVisualGraphSettings();
89
92
  cy.get('.filter-sidepanel').as('sidepanel').should('be.visible').within(() => {
90
- // Verify that the default settings are as follows:
91
- // Maximum links to show: 20
92
- VisualGraphSteps.getLinksNumberField().and('have.value', '20');
93
93
  // Preferred lang: en
94
94
  cy.get('.preferred-languages .tag-item').should('have.length', 1)
95
95
  .and('contain', 'en');
@@ -126,32 +126,17 @@ describe('Visual graph screen validation', () => {
126
126
 
127
127
  it('Test invalid links limit should show error to user ', () => {
128
128
  VisualGraphSteps.openUSRegionUri();
129
- VisualGraphSteps.openVisualGraphSettings();
130
-
131
- cy.get('.filter-sidepanel').as('sidepanel').should('be.visible').within(() => {
132
- // Verify that the default settings are as follows:
133
- // Maximum links to show: 20
134
- VisualGraphSteps.getLinksNumberField().and('have.value', '20');
135
- // Update default 20
136
- VisualGraphSteps.updateLinksLimitField('1001')
137
- .then(() => {
138
- // Try to put invalid value such as 1001
139
- cy.get('.idError')
140
- .should('be.visible')
141
- .and('contain.text', 'Invalid links limit');
142
- });
143
- // Try to save the invalid value
144
- VisualGraphSteps.getSaveSettingsButton().and('not.be.disabled')
145
- .click();
146
- // Then reset to default settings
147
- VisualGraphSteps.getResetSettingsButton().and('not.be.disabled')
148
- .click()
149
- .then(() => {
150
- VisualGraphSteps.getLinksNumberField().and('have.value', '20');
151
- cy.get('.idError')
152
- .should('not.exist');
153
- });
154
- });
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
+ });
155
140
  });
156
141
 
157
142
  it('Test search for a valid resource with links', () => {
@@ -162,10 +147,10 @@ describe('Visual graph screen validation', () => {
162
147
  VisualGraphSteps.openVisualGraphHome();
163
148
  // Search for "USRegion" again
164
149
  VisualGraphSteps.searchForResourceAndOpen(VALID_RESOURCE, VALID_RESOURCE);
165
- // Verify that 20 links (nodes) are displayed
166
- VisualGraphSteps.getPredicates().should('have.length', 20);
150
+ // Verify that 36 links (nodes) are displayed
151
+ VisualGraphSteps.getPredicates().should('have.length', 36);
167
152
  // Verify that links are counted by nodes and not by triples (predicates)
168
- VisualGraphSteps.getNodes().and('have.length', 21);
153
+ VisualGraphSteps.getNodes().and('have.length', 37);
169
154
  });
170
155
 
171
156
  it('Test collapse and expand a node', () => {
@@ -213,6 +198,7 @@ describe('Visual graph screen validation', () => {
213
198
  // Verify that before given node is removed there are 4 of them
214
199
  VisualGraphSteps.getNodes().and('have.length', 4);
215
200
  // Click once on node different than parent one with the mouse
201
+ // eslint-disable-next-line cypress/no-unnecessary-waiting
216
202
  cy.get('.node-wrapper circle').eq(1)
217
203
  // The wait is needed because mouseover event will result in
218
204
  // pop-up of menu icons only if nodes are not moving
@@ -264,34 +250,34 @@ describe('Visual graph screen validation', () => {
264
250
  });
265
251
 
266
252
  it('Test verify mouse/keyboard actions', () => {
267
- const mouseActions = 'Mouse actions\n ' +
268
- '\n \n \n \n ' +
269
- 'Single click\n \n ' +
270
- 'View node details and properties\n \n \n \n ' +
271
- 'Double click\n \n ' +
272
- 'Load node connections\n \n \n \n ' +
273
- 'Ctrl/Cmd-click\n \n ' +
274
- 'Removes a node and its links\n \n \n \n ' +
275
- 'Ctrl/Cmd-Shift-click\n \n ' +
276
- 'Restart the view with that node as a central one\n \n \n \n ' +
277
- 'Click and drag a node\n \n ' +
278
- 'Move a node by dragging it (will also pin down the node)\n \n \n \n ' +
279
- 'Right click a node\n \n ' +
280
- 'Pin down or unpin the node\n \n \n \n ' +
281
- 'Click and drag outside a node\n \n ' +
282
- 'Move the whole graph\n';
283
- const touchActions = 'Touch actions\n \n \n \n \n ' +
284
- 'Tap\n \n ' +
285
- 'View node details and properties\n \n \n \n ' +
286
- 'Tap and hold\n \n ' +
287
- 'Removes a node and its links\n \n \n \n ' +
288
- 'Tap twice\n \n ' +
289
- 'Load node connections\n';
290
- const keyboardActions = 'Keyboard actions\n \n \n \n ' +
291
- 'Left arrow\n \n ' +
292
- 'Rotate the graph to the left\n \n \n \n ' +
293
- 'Right arrow\n \n ' +
294
- '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';
295
281
 
296
282
  VisualGraphSteps.openUSRegionUri();
297
283
  // Click on "mouse and keyboard actions" in the lower right corner of the screen
@@ -311,20 +297,16 @@ describe('Visual graph screen validation', () => {
311
297
  it('Test maximum links to show', () => {
312
298
  VisualGraphSteps.openUSRegionUri();
313
299
 
314
- // Verify that 20 links (nodes) are displayed
315
- VisualGraphSteps.getPredicates().should('have.length', 20);
300
+ // Verify that 36 links (nodes) are displayed
301
+ VisualGraphSteps.getPredicates().should('have.length', 36);
316
302
 
317
- VisualGraphSteps.openVisualGraphSettings();
318
303
  // Set maximum links to 2
319
304
  VisualGraphSteps.updateLinksLimitField('2');
320
- VisualGraphSteps.saveSettings();
321
305
  // Verify that the diagram is updated
322
306
  VisualGraphSteps.getPredicates().should('have.length', 2);
323
307
 
324
- VisualGraphSteps.openVisualGraphSettings();
325
308
  // Set maximum links to 100
326
309
  VisualGraphSteps.updateLinksLimitField('100');
327
- VisualGraphSteps.saveSettings();
328
310
  // Verify that the diagram is updated
329
311
  VisualGraphSteps.getPredicates().should('have.length', 36);
330
312
  });
@@ -335,10 +317,10 @@ describe('Visual graph screen validation', () => {
335
317
  VisualGraphSteps.toggleInferredStatements(true);
336
318
 
337
319
  // Verify that many results are displayed
338
- // Verify that 20 links (nodes) are displayed
339
- VisualGraphSteps.getPredicates().should('have.length', 20);
320
+ // Verify that 36 links (nodes) are displayed
321
+ VisualGraphSteps.getPredicates().should('have.length', 36);
340
322
  // Verify that more than three nodes are displayed
341
- VisualGraphSteps.getNodes().and('have.length', 21);
323
+ VisualGraphSteps.getNodes().and('have.length', 37);
342
324
 
343
325
  // Switch Include Inferred Statements off
344
326
  VisualGraphSteps.toggleInferredStatements(false);
@@ -434,9 +416,6 @@ describe('Visual graph screen validation', () => {
434
416
  // Modify the settings first
435
417
  VisualGraphSteps.openVisualGraphSettings();
436
418
  // Verify that the default settings are as follows:
437
- // Maximum links to show: 20
438
- VisualGraphSteps.updateLinksLimitField('10')
439
- .should('have.value', '10');
440
419
  // Preferred lang: en
441
420
  cy.get('.preferred-languages .tag-item').should('have.length', 1)
442
421
  .eq(0).should('contain', 'en');
@@ -477,8 +456,6 @@ describe('Visual graph screen validation', () => {
477
456
 
478
457
  VisualGraphSteps.openVisualGraphSettings();
479
458
  // Verify that the default settings are as follows:
480
- // Maximum links to show: 20
481
- VisualGraphSteps.getLinksNumberField().and('have.value', '20');
482
459
  // Preferred lang: en
483
460
  cy.get('.preferred-languages .tag-item').should('have.length', 1);
484
461
  // Include inferred: false
@@ -0,0 +1,49 @@
1
+ import {RepositoriesStubs} from '../../stubs/repositories/repositories-stubs.js';
2
+ import {GraphqlEndpointManagementSteps} from '../../steps/graphql/graphql-endpoint-management-steps.js';
3
+ import {NamespaceStubs} from '../../stubs/namespace-stubs.js';
4
+ import {CreateGraphqlEndpointSteps} from '../../steps/graphql/create-graphql-endpoint-steps.js';
5
+ import {GraphqlPlaygroundSteps} from '../../steps/graphql/graphql-playground-steps.js';
6
+
7
+ describe('Graphql: Remote Location', () => {
8
+ const REMOTE_REPOSITORY_ID = 'configurations';
9
+ const REMOTE_REPOSITORY_LOCATION = 'http://localhost:7202';
10
+
11
+ beforeEach(() => {
12
+ RepositoriesStubs.stubRepositories();
13
+ NamespaceStubs.stubGeneratedOntotextNamespacesResponse(REMOTE_REPOSITORY_ID);
14
+ cy.presetRepository(REMOTE_REPOSITORY_ID, REMOTE_REPOSITORY_LOCATION);
15
+ });
16
+
17
+ it('should inform users that GraphQL endpoints are not accessible when the selected repository is in a remote location', () => {
18
+ // GIVEN: The workbench is set up with a repository located in a remote location.
19
+
20
+ // WHEN: I visit the GraphQL endpoint management page.
21
+ GraphqlEndpointManagementSteps.visit();
22
+ // THEN: I expect the page content not to be visible.
23
+ GraphqlEndpointManagementSteps.getPageContainer().should('not.exist');
24
+ // AND: An info message is displayed to inform users to switch to a repository from the current location.
25
+ GraphqlEndpointManagementSteps.getRepositoryInRemoteLocation().should('contain.text', 'The selected repository is in a remote location, and its endpoints aren’t accessible here. Select a repository from the current location.');
26
+ });
27
+
28
+ it('should inform users that they cannot create a GraphQL endpoint when the selected repository is in a remote location', () => {
29
+ // GIVEN: The workbench is set up with a repository located in a remote location.
30
+
31
+ // WHEN: I visit the create GraphQL endpoint page.
32
+ CreateGraphqlEndpointSteps.visit();
33
+ // THEN: I expect the page content not to be visible.
34
+ CreateGraphqlEndpointSteps.getPageContainer().should('not.exist');
35
+ // AND: An info message is displayed to inform users to switch to a local repository.
36
+ CreateGraphqlEndpointSteps.getRepositoryInRemoteLocation().should('contain.text', 'Endpoints can only be created for repositories in the current location. Select a local repository to continue.');
37
+ });
38
+
39
+ it('should inform users that the GraphQL Playground is available only for local repositories', () => {
40
+ // GIVEN: The workbench is set up with a repository located in a remote location.
41
+
42
+ // WHEN: I visit the GraphQL Playground page.
43
+ GraphqlPlaygroundSteps.visit();
44
+ // THEN: I expect the page content not to be visible.
45
+ GraphqlPlaygroundSteps.getPageContainer().should('not.exist');
46
+ // AND: An info message is displayed to inform users to switch to a local repository.
47
+ GraphqlPlaygroundSteps.getRepositoryInRemoteLocation().should('contain.text', 'The active repository is in a remote location. Playground is only available for repositories in the current location.');
48
+ });
49
+ });
@@ -3,6 +3,7 @@ import {GuideSteps} from "../../../steps/guides/guide-steps.js";
3
3
  import {GuideDialogSteps} from "../../../steps/guides/guide-dialog-steps.js";
4
4
  import {YasrSteps} from "../../../steps/yasgui/yasr-steps.js";
5
5
  import {ResourceSteps} from "../../../steps/resource/resource-steps.js";
6
+ import {VisualGraphSplitButtonSteps} from '../../../steps/visual-graph-split-button-steps.js';
6
7
 
7
8
  describe('Table Graph explore', () => {
8
9
  const FILE_TO_IMPORT = 'wine.rdf';
@@ -107,7 +108,7 @@ describe('Table Graph explore', () => {
107
108
 
108
109
  GuideDialogSteps.assertDialogWithTitleIsVisible('Explore RDF as a table — 6/8');
109
110
  GuideDialogSteps.assertDialogWithContentIsVisible('You can always explore the same data using the Visual graph view. Click on the Visual graph button to try it now.');
110
- ResourceSteps.clickOnVisualGraphButton();
111
+ VisualGraphSplitButtonSteps.clickOnVisualizeMainButton();
111
112
 
112
113
  GuideDialogSteps.assertDialogWithTitleIsVisible('Explore RDF as a table — 7/8');
113
114
  GuideDialogSteps.assertDialogWithContentIsVisible('The graph shows connections between the start node, vin:WineGrape, and other nodes. Each arrow represents one or more connections (RDF statements).');