graphdb-workbench-tests 3.3.3-TR1 → 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
@@ -9,6 +9,8 @@ export default defineConfig({
9
9
  video: true,
10
10
  defaultCommandTimeout: 25000,
11
11
  numTestsKeptInMemory: 10,
12
+ viewportWidth: 1600,
13
+ viewportHeight: 1200,
12
14
  e2e: {
13
15
  retries: {
14
16
  runMode: 2,
@@ -17,8 +17,8 @@ export default defineConfig({
17
17
  video: true,
18
18
  defaultCommandTimeout: 25000,
19
19
  numTestsKeptInMemory: 10,
20
- viewportWidth: 1280,
21
- viewportHeight: 720,
20
+ viewportWidth: 1600,
21
+ viewportHeight: 1200,
22
22
  e2e: {
23
23
  retries: {
24
24
  runMode: 2,
@@ -1,14 +1,6 @@
1
1
  import { defineConfig } from 'cypress';
2
2
  import setupPlugins from './plugins/index.js';
3
3
 
4
- const isCoverage = process.env.COVERAGE === 'true';
5
-
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
4
  export default defineConfig({
13
5
  projectId: 'v35btb',
14
6
  fixturesFolder: 'fixtures',
@@ -17,8 +9,8 @@ export default defineConfig({
17
9
  video: true,
18
10
  defaultCommandTimeout: 25000,
19
11
  numTestsKeptInMemory: 10,
20
- viewportWidth: 1280,
21
- viewportHeight: 720,
12
+ viewportWidth: 1600,
13
+ viewportHeight: 1200,
22
14
  e2e: {
23
15
  retries: {
24
16
  runMode: 2,
@@ -28,14 +20,11 @@ export default defineConfig({
28
20
  // You may want to clean this up later by importing these.
29
21
  async setupNodeEvents(on, config) {
30
22
  setupPlugins(on, config);
31
- if (isCoverage) {
32
- await loadCodeCoverage(on, config);
33
- }
34
23
  return config;
35
24
  },
36
25
  baseUrl: 'http://localhost:9000',
37
26
  specPattern: 'e2e-security/**/*.{js,jsx,ts,tsx}',
38
- supportFile: 'support/e2e.js',
27
+ supportFile: 'support/e2e-security.js',
39
28
  reporter: "cypress-multi-reporters",
40
29
  reporterOptions: {
41
30
  configFile: 'cypress-reporter-config.json'
@@ -1,7 +1,7 @@
1
1
  import {ImportServerFilesSteps} from "../../steps/import/import-server-files-steps";
2
2
  import {ImportSettingsDialogSteps} from "../../steps/import/import-settings-dialog-steps";
3
3
 
4
- describe('Import server files - Operations', {retries: {runMode: 2}}, () => {
4
+ describe('Import server files - Operations', () => {
5
5
 
6
6
  let repositoryId;
7
7
 
@@ -14,7 +14,7 @@ const jsonld = JSON.stringify({
14
14
  "ab:email": "richard491@hotmail.com"
15
15
  });
16
16
 
17
- describe('Import user data: Batch operations', {retries: {runMode: 2}}, () => {
17
+ describe('Import user data: Batch operations', () => {
18
18
 
19
19
  let repositoryId;
20
20
  const testFiles = [
@@ -26,12 +26,7 @@ describe('SPARQL create template', () => {
26
26
  cy.deleteRepository(secondRepositoryId);
27
27
  });
28
28
 
29
- it('should has error message described that query is invalid', {
30
- retries: {
31
- runMode: 1,
32
- openMode: 0
33
- }
34
- }, () => {
29
+ it('should has error message described that query is invalid', () => {
35
30
  // When I visit 'Sparql create template' view,
36
31
  // and fill valid template id.
37
32
  SparqlCreateUpdateSteps.typeTemplateId('http://test');
@@ -48,12 +43,7 @@ describe('SPARQL create template', () => {
48
43
  /**
49
44
  * TODO: Fix me. Broken due to migration (Repository selector changed)
50
45
  */
51
- it.skip('should display confirm dialog I am updating a sparql template and change the repository', {
52
- retries: {
53
- runMode: 1,
54
- openMode: 0
55
- }
56
- }, () => {
46
+ it.skip('should display confirm dialog I am updating a sparql template and change the repository', () => {
57
47
  // When I visit 'Sparql create template' view,
58
48
  // create a SPARQL template
59
49
  const templateId = 'http://' + Date.now();
@@ -119,12 +109,7 @@ describe('SPARQL create template', () => {
119
109
  /**
120
110
  * TODO: Fix me. Broken due to migration (Changes in main menu)
121
111
  */
122
- it.skip('should confirm me before navigate when query is changed', {
123
- retries: {
124
- runMode: 1,
125
- openMode: 0
126
- }
127
- }, () => {
112
+ it.skip('should confirm me before navigate when query is changed', () => {
128
113
  // When I visit 'Sparql create template' view,
129
114
  // and change the query in ontotext-yasgui editor.
130
115
  // When I fill non update query (select for example).
@@ -22,12 +22,7 @@ describe('Execute of update query', () => {
22
22
  cy.deleteRepository(repositoryId);
23
23
  });
24
24
 
25
- it('should display properly result message info when insert 2 statements', {
26
- retries: {
27
- runMode: 1,
28
- openMode: 0
29
- }
30
- }, () => {
25
+ it('should display properly result message info when insert 2 statements', () => {
31
26
  // When I execute insert query which adds 2 results
32
27
  YasqeSteps.pasteQuery(
33
28
  'PREFIX : <http://bedrock/> ' +
@@ -56,12 +51,7 @@ describe('Execute of update query', () => {
56
51
  TablePluginSteps.getQueryResultInfo().contains('The number of statements did not change.');
57
52
  });
58
53
 
59
- it('should display result message info which describes that two statements are removed', {
60
- retries: {
61
- runMode: 1,
62
- openMode: 0
63
- }
64
- }, () => {
54
+ it('should display result message info which describes that two statements are removed', () => {
65
55
  // When I visit a page with "ontotext-yasgui-web-component" in it,
66
56
  // and selected repository has some inserted statements.
67
57
  YasqeSteps.pasteQuery(
@@ -47,13 +47,7 @@ describe('Share query', () => {
47
47
  ApplicationSteps.getSuccessNotifications().should('be.visible');
48
48
  });
49
49
 
50
- it('Should be able to open a share link in a new editor tab',
51
- {
52
- retries: {
53
- runMode: 1,
54
- openMode: 0
55
- }
56
- }, () => {
50
+ it('Should be able to open a share link in a new editor tab',() => {
57
51
  // Given I have opened the sparql editor
58
52
  YasguiSteps.getTabs().should('have.length', 1);
59
53
  // When I get the shareable link for current query
@@ -35,12 +35,7 @@ describe.skip('Yasr Table plugin', () => {
35
35
  YasrSteps.getCopyResourceLink(28, 2).should('be.visible');
36
36
  });
37
37
 
38
- it('Should be able to copy a link', {
39
- retries: {
40
- runMode: 1,
41
- openMode: 0
42
- }
43
- }, () => {
38
+ it('Should be able to copy a link', () => {
44
39
  // When I execute a query which returns results of type is uri.
45
40
  QueryStubs.stubDefaultQueryResponse();
46
41
  YasqeSteps.executeQuery();
@@ -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,142 @@
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
+
47
+
48
+ // When, I update the link limit from the input field
49
+ VisualGraphSteps.updateLinksLimitField(5);
50
+
51
+ // Then I expect the URL to include the updated linksLimit in the URL
52
+ BaseSteps.getUrl().should('include', 'linksLimit=5');
53
+ // And, I expect to see the visual graph with the updated linksLimit
54
+ VisualGraphSteps.getNodes().should('have.length', 6); // 5 links plus the main node
55
+
56
+ // When, I change the linksLimit URL param directly to 10 and navigate to the updated URL
57
+ BaseSteps.getUrl().then((url) => {
58
+ const newUrl = new URL(url);
59
+ newUrl.searchParams.set('linksLimit', '10');
60
+ BaseSteps.visit(newUrl.toString().replace(Cypress.config('baseUrl'), ''));
61
+ });
62
+ // Then, I expect to see the visual graph with the updated linksLimit
63
+ VisualGraphSteps.getNodes().should('have.length', 11) // 10 links plus the main node;
64
+ // And, I expect the menu to be updated with the new linksLimit
65
+ VisualGraphSteps.getLinksNumberField().should('have.value', '10');
66
+ });
67
+
68
+ it('Should show an error toast and ignore linksLimit when the URL param value is invalid', () => {
69
+ // Given, I visit the visual graph with an invalid linksLimit URL param (outside the 1-1000 range)
70
+ BaseSteps.visit(`/graphs-visualizations?uri=http:%2F%2Fwww.w3.org%2FTR%2F2003%2FPR-owl-guide-20031209%2Fwine%23${VALID_RESOURCE}&linksLimit=9999`);
71
+
72
+ // Then, I expect to see an error notification about the invalid links limit
73
+ ApplicationSteps.getErrorNotifications()
74
+ .should('be.visible')
75
+ .and('contain', 'Invalid links limit');
76
+ // And I expect to see the visual graph with the default linksLimit
77
+ BaseSteps.getUrl().should('include', 'linksLimit=100');
78
+ VisualGraphSteps.getLinksNumberField().should('have.value', String(DEFAULT_LINKS_LIMIT));
79
+
80
+ // When, I try to set the limit to an invalid value via the form
81
+ VisualGraphSteps.updateLinksLimitField(1001);
82
+
83
+ // Then, I should see a warning message that the link limit is invalid
84
+ VisualGraphSteps.getInvalidLinksMessage().should('be.visible').and('contain', 'Enter a number up to 1000');
85
+ });
86
+
87
+ describe('When the user has a custom graph config', () => {
88
+ const configName = 'linkLimitConfig';
89
+
90
+ it('should change link limit, when starting point is query', () => {
91
+ // Given, I visit the visual graph and create a config with query starting point
92
+ VisualGraphSteps.visit();
93
+ VisualGraphSteps.createCustomGraph();
94
+ VisualGraphSteps.typeGraphConfigName(configName);
95
+ VisualGraphSteps.selectStartMode('query');
96
+ VisualGraphSteps.selectPredefinedQuerySample(0);
97
+ VisualGraphSteps.saveConfig();
98
+ VisualGraphSteps.openGraphConfig(configName);
99
+
100
+ // Then, I expect to see 10 nodes before changing the limit
101
+ BaseSteps.getUrl().should('include', 'linksLimit=10');
102
+ VisualGraphSteps.getNodes().should('have.length', 10); // 10 nodes total, since we don't have a root node
103
+
104
+ // When, I update the link limit from the input field
105
+ VisualGraphSteps.updateLinksLimitField(5);
106
+
107
+ // Then I expect the URL to include the updated linksLimit in the URL
108
+ BaseSteps.getUrl().should('include', 'linksLimit=5');
109
+ // And, I expect to see the visual graph with the updated linksLimit
110
+ VisualGraphSteps.getNodes().should('have.length', 5); // 5 nodes total, since we don't have a root node
111
+ });
112
+
113
+ afterEach(() => {
114
+ cy.deleteGraphConfig(configName)
115
+ });
116
+ });
117
+
118
+ describe('When the user has opened a graph with construct query', () => {
119
+ it('should change link limit, when is graph is opened in queryResultsMode', () => {
120
+ // Given, I open a graph in queryResultsMode (after construct query in the SPARQL editor)
121
+ // And enter a construct query, so I can visualize the results in a graph
122
+ SparqlSteps.visit();
123
+ SparqlSteps.typeQuery(`CONSTRUCT WHERE {?s ?p ?o} LIMIT 10`);
124
+ SparqlSteps.executeQuery();
125
+ VisualGraphSplitButtonSteps.clickOnVisualizeMainButton();
126
+
127
+ // Then, I expect to see 10 nodes before changing the limit
128
+ BaseSteps.getUrl().should('include', 'linksLimit=10');
129
+ VisualGraphSteps.getNodes().should('have.length', 10); // 10 nodes total, since we don't have a root node
130
+
131
+ // When, I update the link limit from the input field
132
+ VisualGraphSteps.updateLinksLimitField(5);
133
+
134
+ // Then I expect the URL to include the updated linksLimit in the URL
135
+ BaseSteps.getUrl().should('include', 'linksLimit=5');
136
+ // And, I expect to see the visual graph with the updated linksLimit
137
+ VisualGraphSteps.getNodes().should('have.length', 5); // 5 nodes total, since we don't have a root node
138
+ });
139
+ });
140
+ });
141
+
142
+