graphdb-workbench-tests 3.4.0-migrated-guide-services → 3.4.0

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 (40) 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/resource/resource.spec.js +33 -13
  12. package/e2e-legacy/setup/aclmanagement/acl-management-with-selected repository.spec.js +44 -0
  13. package/e2e-legacy/sparql-editor/actions/expand-results-over-sameas.spec.js +8 -8
  14. package/e2e-legacy/sparql-editor/actions/include-inferred-statements.spec.js +4 -4
  15. package/e2e-legacy/sparql-editor/actions/inferred-sameas.spec.js +3 -3
  16. package/e2e-legacy/sparql-editor/yasr/toolbar/visual-graph-button.spec.js +90 -36
  17. package/e2e-legacy/sparql-editor/yasr/yasr.spec.js +80 -0
  18. package/fixtures/graph/graph-configurations.json +59 -0
  19. package/fixtures/guides/ttyg/configure-agent/configure-ttyg-agent-guide.json +6 -1
  20. package/npm-shrinkwrap.json +32 -33
  21. package/package.json +1 -1
  22. package/steps/graphql/create-graphql-endpoint-steps.js +8 -0
  23. package/steps/graphql/graphql-endpoint-management-steps.js +8 -0
  24. package/steps/graphql/graphql-playground-steps.js +8 -0
  25. package/steps/guides/movies-guide-steps.js +2 -1
  26. package/steps/home-steps.js +4 -7
  27. package/steps/repositories/attach-repository-steps.js +16 -0
  28. package/steps/repository-steps.js +24 -0
  29. package/steps/resource/resource-steps.js +0 -8
  30. package/steps/setup/acl-management-steps.js +12 -0
  31. package/steps/sparql-editor-steps.js +18 -4
  32. package/steps/ttyg/ttyg-agent-settings-modal.steps.js +1 -1
  33. package/steps/visual-graph-split-button-steps.js +45 -0
  34. package/steps/visual-graph-steps.js +12 -0
  35. package/steps/yasgui/yasr-steps.js +30 -6
  36. package/stubs/cluster/remote-location-stubs.js +4 -0
  37. package/stubs/graph-config-stubs.js +17 -0
  38. package/support/commands.js +1 -0
  39. package/support/repository-commands.js +22 -3
  40. package/support/url-commands.js +13 -0
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "graphdb-workbench-tests",
3
- "version": "3.4.0-migrated-guide-services",
3
+ "version": "3.4.0",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "graphdb-workbench-tests",
9
- "version": "3.4.0-migrated-guide-services",
9
+ "version": "3.4.0",
10
10
  "license": "Apache-2.0",
11
11
  "devDependencies": {
12
12
  "@bahmutov/cypress-code-coverage": "^2.7.2",
@@ -1071,9 +1071,9 @@
1071
1071
  }
1072
1072
  },
1073
1073
  "node_modules/@babel/plugin-transform-modules-systemjs": {
1074
- "version": "7.29.0",
1075
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.29.0.tgz",
1076
- "integrity": "sha512-PrujnVFbOdUpw4UHiVwKvKRLMMic8+eC0CuNlxjsyZUiBjhFdPsewdXCkveh2KqBA9/waD0W1b4hXSOBQJezpQ==",
1074
+ "version": "7.29.4",
1075
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.29.4.tgz",
1076
+ "integrity": "sha512-N7QmZ0xRZfjHOfZeQLJjwgX2zS9pdGHSVl/cjSGlo4dXMqvurfxXDMKY4RqEKzPozV78VMcd0lxyG13mlbKc4w==",
1077
1077
  "dev": true,
1078
1078
  "license": "MIT",
1079
1079
  "dependencies": {
@@ -3377,9 +3377,9 @@
3377
3377
  "license": "MIT"
3378
3378
  },
3379
3379
  "node_modules/brace-expansion": {
3380
- "version": "1.1.12",
3381
- "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz",
3382
- "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==",
3380
+ "version": "1.1.13",
3381
+ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.13.tgz",
3382
+ "integrity": "sha512-9ZLprWS6EENmhEOpjCYW2c8VkmOvckIJZfkr7rBW6dObmfgJ/L1GpSYW5Hpo9lDz4D1+n0Ckz8rU7FwHDQiG/w==",
3383
3383
  "dev": true,
3384
3384
  "license": "MIT",
3385
3385
  "dependencies": {
@@ -5420,9 +5420,9 @@
5420
5420
  "license": "MIT"
5421
5421
  },
5422
5422
  "node_modules/fast-uri": {
5423
- "version": "3.1.0",
5424
- "resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-3.1.0.tgz",
5425
- "integrity": "sha512-iPeeDKJSWf4IEOasVVrknXpaBV0IApz/gp7S2bb7Z4Lljbl2MGJRqInZiUrQwV16cpzw/D3S5j5Julj/gT52AA==",
5423
+ "version": "3.1.2",
5424
+ "resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-3.1.2.tgz",
5425
+ "integrity": "sha512-rVjf7ArG3LTk+FS6Yw81V1DLuZl1bRbNrev6Tmd/9RaroeeRRJhAt7jg/6YFxbvAQXUCavSoZhPPj6oOx+5KjQ==",
5426
5426
  "dev": true,
5427
5427
  "funding": [
5428
5428
  {
@@ -5570,9 +5570,9 @@
5570
5570
  }
5571
5571
  },
5572
5572
  "node_modules/flatted": {
5573
- "version": "3.3.3",
5574
- "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.3.3.tgz",
5575
- "integrity": "sha512-GX+ysw4PBCz0PzosHDepZGANEuFCMLrnRTiEy9McGjmkCQYwRq4A/X786G/fjM/+OjsWSU1ZrY5qyARZmO/uwg==",
5573
+ "version": "3.4.2",
5574
+ "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.4.2.tgz",
5575
+ "integrity": "sha512-PjDse7RzhcPkIJwy5t7KPWQSZ9cAbzQXcafsetQoD7sOJRQlGikNbx7yZp2OotDnJyrDcbyRq3Ttb18iYOqkxA==",
5576
5576
  "dev": true,
5577
5577
  "license": "ISC"
5578
5578
  },
@@ -7111,9 +7111,9 @@
7111
7111
  }
7112
7112
  },
7113
7113
  "node_modules/lodash": {
7114
- "version": "4.17.23",
7115
- "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.23.tgz",
7116
- "integrity": "sha512-LgVTMpQtIopCi79SJeDiP0TfWi5CNEc/L/aRdTh3yIvmZXTnheWpKjSZhnvMl8iXbC1tFg9gdHHDMLoV7CnG+w==",
7114
+ "version": "4.18.1",
7115
+ "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.18.1.tgz",
7116
+ "integrity": "sha512-dMInicTPVE8d1e5otfwmmjlxkZoUpiVLwyeTdUsi/Caj/gfzzblBcCE5sRHV/AsjuCmxWrte2TNGSYuCeCq+0Q==",
7117
7117
  "dev": true,
7118
7118
  "license": "MIT"
7119
7119
  },
@@ -7606,9 +7606,9 @@
7606
7606
  }
7607
7607
  },
7608
7608
  "node_modules/mocha/node_modules/brace-expansion": {
7609
- "version": "5.0.3",
7610
- "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.3.tgz",
7611
- "integrity": "sha512-fy6KJm2RawA5RcHkLa1z/ScpBeA762UF9KmZQxwIbDtRJrgLzM10depAiEQ+CXYcoiqW1/m96OAAoke2nE9EeA==",
7609
+ "version": "5.0.6",
7610
+ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.6.tgz",
7611
+ "integrity": "sha512-kLpxurY4Z4r9sgMsyG0Z9uzsBlgiU/EFKhj/h91/8yHu0edo7XuixOIH3VcJ8kkxs6/jPzoI6U9Vj3WqbMQ94g==",
7612
7612
  "dev": true,
7613
7613
  "license": "MIT",
7614
7614
  "peer": true,
@@ -8369,9 +8369,9 @@
8369
8369
  "license": "ISC"
8370
8370
  },
8371
8371
  "node_modules/picomatch": {
8372
- "version": "2.3.1",
8373
- "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz",
8374
- "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==",
8372
+ "version": "2.3.2",
8373
+ "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.2.tgz",
8374
+ "integrity": "sha512-V7+vQEJ06Z+c5tSye8S+nHUfI51xoXIXjHQ99cQtKUkQqqO1kO/KCJUfZXuB47h/YBlDhah2H3hdUGXn8ie0oA==",
8375
8375
  "dev": true,
8376
8376
  "license": "MIT",
8377
8377
  "engines": {
@@ -8921,9 +8921,9 @@
8921
8921
  }
8922
8922
  },
8923
8923
  "node_modules/rimraf/node_modules/brace-expansion": {
8924
- "version": "5.0.3",
8925
- "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.3.tgz",
8926
- "integrity": "sha512-fy6KJm2RawA5RcHkLa1z/ScpBeA762UF9KmZQxwIbDtRJrgLzM10depAiEQ+CXYcoiqW1/m96OAAoke2nE9EeA==",
8924
+ "version": "5.0.6",
8925
+ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.6.tgz",
8926
+ "integrity": "sha512-kLpxurY4Z4r9sgMsyG0Z9uzsBlgiU/EFKhj/h91/8yHu0edo7XuixOIH3VcJ8kkxs6/jPzoI6U9Vj3WqbMQ94g==",
8927
8927
  "dev": true,
8928
8928
  "license": "MIT",
8929
8929
  "dependencies": {
@@ -9794,9 +9794,9 @@
9794
9794
  }
9795
9795
  },
9796
9796
  "node_modules/systeminformation": {
9797
- "version": "5.31.1",
9798
- "resolved": "https://registry.npmjs.org/systeminformation/-/systeminformation-5.31.1.tgz",
9799
- "integrity": "sha512-6pRwxoGeV/roJYpsfcP6tN9mep6pPeCtXbUOCdVa0nme05Brwcwdge/fVNhIZn2wuUitAKZm4IYa7QjnRIa9zA==",
9797
+ "version": "5.31.6",
9798
+ "resolved": "https://registry.npmjs.org/systeminformation/-/systeminformation-5.31.6.tgz",
9799
+ "integrity": "sha512-Uv2b2uGGM6ns+26czgW2cYRabYdnswM0ddSOOlryHOaelzsmDSet1iM/NT7VOYxW8x/BW+HkY+b1Ve2pLTSGSA==",
9800
9800
  "dev": true,
9801
9801
  "license": "MIT",
9802
9802
  "os": [
@@ -9856,9 +9856,9 @@
9856
9856
  }
9857
9857
  },
9858
9858
  "node_modules/terser-webpack-plugin": {
9859
- "version": "5.3.16",
9860
- "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-5.3.16.tgz",
9861
- "integrity": "sha512-h9oBFCWrq78NyWWVcSwZarJkZ01c2AyGrzs1crmHZO3QUg9D61Wu4NPjBy69n7JqylFF5y+CsUZYmYEIZ3mR+Q==",
9859
+ "version": "5.4.0",
9860
+ "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-5.4.0.tgz",
9861
+ "integrity": "sha512-Bn5vxm48flOIfkdl5CaD2+1CiUVbonWQ3KQPyP7/EuIl9Gbzq/gQFOzaMFUEgVjB1396tcK0SG8XcNJ/2kDH8g==",
9862
9862
  "dev": true,
9863
9863
  "license": "MIT",
9864
9864
  "peer": true,
@@ -9866,7 +9866,6 @@
9866
9866
  "@jridgewell/trace-mapping": "^0.3.25",
9867
9867
  "jest-worker": "^27.4.5",
9868
9868
  "schema-utils": "^4.3.0",
9869
- "serialize-javascript": "^6.0.2",
9870
9869
  "terser": "^5.31.1"
9871
9870
  },
9872
9871
  "engines": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "graphdb-workbench-tests",
3
- "version": "3.4.0-migrated-guide-services",
3
+ "version": "3.4.0",
4
4
  "description": "Cypress tests for GraphDB workbench",
5
5
  "type": "module",
6
6
  "scripts": {
@@ -7,6 +7,14 @@ export class CreateGraphqlEndpointSteps {
7
7
  return cy.get('.create-graphql-endpoint-view');
8
8
  }
9
9
 
10
+ static getPageContainer() {
11
+ return CreateGraphqlEndpointSteps.getView().find('.content');
12
+ }
13
+
14
+ static getRepositoryInRemoteLocation() {
15
+ return CreateGraphqlEndpointSteps.getView().find('.unexpected-remote-repository-warning');
16
+ }
17
+
10
18
  static getSourceRepositorySelector() {
11
19
  return this.getView().find('.source-repository-selector');
12
20
  }
@@ -10,6 +10,14 @@ export class GraphqlEndpointManagementSteps {
10
10
  return cy.get('.graphql-endpoint-management-view');
11
11
  }
12
12
 
13
+ static getPageContainer() {
14
+ return GraphqlEndpointManagementSteps.getView().find('.endpoint-management-container');
15
+ }
16
+
17
+ static getRepositoryInRemoteLocation() {
18
+ return GraphqlEndpointManagementSteps.getView().find('.unexpected-remote-repository-warning');
19
+ }
20
+
13
21
  static getEndpointFilterField() {
14
22
  return this.getView().find('.endpoints-filter-field');
15
23
  }
@@ -10,6 +10,14 @@ export class GraphqlPlaygroundSteps {
10
10
  return cy.get('.graphql-playground-view');
11
11
  }
12
12
 
13
+ static getPageContainer() {
14
+ return GraphqlPlaygroundSteps.getView().find('.content');
15
+ }
16
+
17
+ static getRepositoryInRemoteLocation() {
18
+ return GraphqlPlaygroundSteps.getView().find('.unexpected-remote-repository-warning');
19
+ }
20
+
13
21
  static getNoSchemasAlert() {
14
22
  return this.getView().find('.no-endpoints-view');
15
23
  }
@@ -5,6 +5,7 @@ import {VisualGraphSteps} from "../visual-graph-steps";
5
5
  import {YasrSteps} from "../yasgui/yasr-steps";
6
6
  import {YasqeSteps} from "../yasgui/yasqe-steps";
7
7
  import {ResourceSteps} from "../resource/resource-steps";
8
+ import {VisualGraphSplitButtonSteps} from '../visual-graph-split-button-steps.js';
8
9
 
9
10
  export class MoviesGuideSteps {
10
11
 
@@ -181,7 +182,7 @@ export class MoviesGuideSteps {
181
182
  static assertExploreRDFStep7() {
182
183
  GuideSteps.assertPageNotInteractive();
183
184
  GuideDialogSteps.assertDialogWithTitleIsVisible('Explore RDF as a table — 7/10');
184
- ResourceSteps.getVisualGraphButton().should('be.visible');
185
+ VisualGraphSplitButtonSteps.getVisualizeMainButton().should('be.visible');
185
186
  }
186
187
 
187
188
  static assertExploreRDFStep8() {
@@ -200,13 +200,10 @@ class HomeSteps extends BaseSteps {
200
200
  }
201
201
 
202
202
  static verifyCreateRepositoryLink() {
203
- cy.get('.card.repository-errors').should('be.visible')
204
- .within(() => {
205
- HomeSteps.getCreateRepositoryLink()
206
- .click()
207
- .url()
208
- .should('eq', Cypress.config('baseUrl') + '/repository/create?previous=%2F');
209
- });
203
+ HomeSteps.getCreateRepositoryLink()
204
+ .click()
205
+ .url()
206
+ .should('eq', Cypress.config('baseUrl') + '/repository/create?previous=%2F');
210
207
  cy.get('.big-logo').click();
211
208
  }
212
209
 
@@ -1,5 +1,9 @@
1
1
  export class AttachRepositorySteps {
2
2
 
3
+ static getRemoteLocationSettingsForm() {
4
+ return cy.get('#remoteLocationForm');
5
+ }
6
+
3
7
  static getAttachRemoteLocationBtn() {
4
8
  return cy.get('#addAttachRemoteLocation');
5
9
  }
@@ -115,4 +119,16 @@ export class AttachRepositorySteps {
115
119
  static clearPassword() {
116
120
  AttachRepositorySteps.getPasswordInput().clear();
117
121
  }
122
+
123
+ static getUnencryptedPasswordWarning() {
124
+ return this.getRemoteLocationSettingsForm().find('.unencrypted-password-warning');
125
+ }
126
+
127
+ static getBackwardCompatibilityWarning() {
128
+ return this.getRemoteLocationSettingsForm().find('.backward-compatibility-warning');
129
+ }
130
+
131
+ static encryptPassword() {
132
+ this.getRemoteLocationSettingsForm().find('#encryptPassword').check();
133
+ }
118
134
  }
@@ -16,6 +16,14 @@ export class RepositorySteps extends BaseSteps {
16
16
  cy.visit(`repository/edit/${repositoryId}?location=`);
17
17
  }
18
18
 
19
+ static getRepositoryPage() {
20
+ return cy.get('#wb-repository');
21
+ }
22
+
23
+ static getRepositoriesPage() {
24
+ return cy.get('#wb-repositories');
25
+ }
26
+
19
27
  static getCreateRepositoryButton() {
20
28
  return cy.get('#wb-repositories-addRepositoryLink');
21
29
  }
@@ -135,6 +143,10 @@ export class RepositorySteps extends BaseSteps {
135
143
  RepositorySteps.getRepositoryTypeButton(type).click();
136
144
  }
137
145
 
146
+ static createFedexRepositoryType() {
147
+ RepositorySteps.chooseRepositoryType('fedx');
148
+ }
149
+
138
150
  static getGDBRepositoryTypeButton() {
139
151
  return RepositorySteps.getRepositoryTypeButton('gdb');
140
152
  }
@@ -354,4 +366,16 @@ export class RepositorySteps extends BaseSteps {
354
366
  static getEntityIndexSize() {
355
367
  return RepositorySteps.getRepositoryCreateForm().find('#entityIndexSize');
356
368
  }
369
+
370
+ static getFedexMembersPanel() {
371
+ return this.getRepositoryPage().find('#fedx-members');
372
+ }
373
+
374
+ static selectFedexMember(repositoryId) {
375
+ this.getFedexMembersPanel()
376
+ .find('.form-local-repos')
377
+ .find('.location-item')
378
+ .contains(repositoryId)
379
+ .click();
380
+ }
357
381
  }
@@ -61,14 +61,6 @@ export class ResourceSteps {
61
61
  cy.get('.download-options li').eq(option).click();
62
62
  }
63
63
 
64
- static getVisualGraphButton() {
65
- return cy.get('.visual-graph-btn');
66
- }
67
-
68
- static clickOnVisualGraphButton() {
69
- ResourceSteps.getVisualGraphButton().click();
70
- }
71
-
72
64
  static getEditResourceLink() {
73
65
  return cy.get('.edit-resource-link');
74
66
  }
@@ -11,6 +11,18 @@ export class AclManagementSteps {
11
11
  return this.getPage().find('#acl-management-view-title');
12
12
  }
13
13
 
14
+ static getFedexWarningMessage() {
15
+ return this.getPage().find('.unexpected-fedex-repository-warning');
16
+ }
17
+
18
+ static getAclManagementContainer() {
19
+ return this.getPage().find('.acl-management-container');
20
+ }
21
+
22
+ static getAclManagementContent() {
23
+ return this.getPage().find('.acl-management-content');
24
+ }
25
+
14
26
  static getAclTable() {
15
27
  return this.getPage().find('.acl-rules');
16
28
  }
@@ -1,14 +1,16 @@
1
1
  import {YasqeSteps} from "./yasgui/yasqe-steps";
2
+ import {YasrSteps} from './yasgui/yasr-steps.js';
2
3
 
3
4
  const VIEW_URL = '/sparql';
4
5
 
5
6
  export class SparqlEditorSteps {
6
- static visitSparqlEditorPage() {
7
- cy.visit(VIEW_URL);
7
+ static visitSparqlEditorPage(urlParameters) {
8
+ const url = urlParameters ? `${VIEW_URL}?${urlParameters}` : VIEW_URL;
9
+ cy.visit(url);
8
10
  }
9
11
 
10
- static visitSparqlEditorPageAndWaitForEditor() {
11
- SparqlEditorSteps.visitSparqlEditorPage();
12
+ static visitSparqlEditorPageAndWaitForEditor(urlParameters ) {
13
+ SparqlEditorSteps.visitSparqlEditorPage(urlParameters);
12
14
  // Because we use angularjs less than 1.7.3 we use additional library ng-custom-element.umd.js to solve problem with property bindings
13
15
  // This library make additional call to ontotext-yasgui-web-component and the component that's way the component renders twice when page loaded.
14
16
  // This is bad because in tests cypress can find an element when it is rendered from first call and try to click it for example.
@@ -19,6 +21,18 @@ export class SparqlEditorSteps {
19
21
  YasqeSteps.waitUntilQueryIsVisible();
20
22
  }
21
23
 
24
+ static visitSparqlEditorPageAndWaitForResults(urlParameters ) {
25
+ SparqlEditorSteps.visitSparqlEditorPage(urlParameters);
26
+ // Because we use angularjs less than 1.7.3 we use additional library ng-custom-element.umd.js to solve problem with property bindings
27
+ // This library make additional call to ontotext-yasgui-web-component and the component that's way the component renders twice when page loaded.
28
+ // This is bad because in tests cypress can find an element when it is rendered from first call and try to click it for example.
29
+ // If time of clicking such element is when second call to the component is done then exception that element is detached will be thrown.
30
+ // We will wait a little , to give a chance page is loaded correctly before test start.
31
+ // eslint-disable-next-line cypress/no-unnecessary-waiting
32
+ cy.wait(1000);
33
+ YasrSteps.waitUntilResultsIsVisible();
34
+ }
35
+
22
36
  static verifyUrl() {
23
37
  cy.url().should('include', `${Cypress.config('baseUrl')}${VIEW_URL}`);
24
38
  }
@@ -429,7 +429,7 @@ export class TtygAgentSettingsModalSteps extends ModalDialogSteps {
429
429
  }
430
430
 
431
431
  static enterContextSize(input) {
432
- this.getContextSizeField().type(input);
432
+ this.getContextSizeField().type(input, {force: true});
433
433
  }
434
434
 
435
435
  static getContextSizeError() {
@@ -0,0 +1,45 @@
1
+ export class VisualGraphSplitButtonSteps {
2
+ static getGraphExploreSplitButton() {
3
+ return cy.get('onto-graph-explore-split-button');
4
+ }
5
+
6
+ static getVisualizeMainButton() {
7
+ return VisualGraphSplitButtonSteps.getGraphExploreSplitButton().find('.explore-visual-graph-button');
8
+ }
9
+
10
+ static clickOnVisualizeMainButton() {
11
+ VisualGraphSplitButtonSteps.getVisualizeMainButton().click();
12
+ }
13
+
14
+ static getDropdownToggleButton() {
15
+ return VisualGraphSplitButtonSteps.getGraphExploreSplitButton().find('.onto-dropdown-button');
16
+ }
17
+
18
+ static toggleGraphConfigDropdown() {
19
+ VisualGraphSplitButtonSteps.getDropdownToggleButton().click();
20
+ }
21
+
22
+ static getGraphConfigs() {
23
+ return VisualGraphSplitButtonSteps.getGraphExploreSplitButton().find('.onto-dropdown-menu-item');
24
+ }
25
+
26
+ static getGraphConfig(index = 0) {
27
+ return VisualGraphSplitButtonSteps.getGraphConfigs().eq(index);
28
+ }
29
+
30
+ static selectGraphConfig(index = 0) {
31
+ VisualGraphSplitButtonSteps.getGraphConfig(index).click();
32
+ }
33
+
34
+ static getCreateGraphConfigLink() {
35
+ return VisualGraphSplitButtonSteps.getGraphExploreSplitButton().find('.graph-create-link');
36
+ }
37
+
38
+ static clickCreateGraphConfigLink() {
39
+ VisualGraphSplitButtonSteps.getCreateGraphConfigLink().click();
40
+ }
41
+
42
+ static getNoConfigurationsMessage() {
43
+ return VisualGraphSplitButtonSteps.getGraphExploreSplitButton().find('.no-configurations-message');
44
+ }
45
+ }
@@ -196,6 +196,10 @@ export class VisualGraphSteps extends BaseSteps {
196
196
  return cy.get('.rdf-side-panel-content');
197
197
  }
198
198
 
199
+ static getPropertyByIndex(index) {
200
+ return this.getSidePanelContent().find('.rdf-list .datasource').eq(index);
201
+ }
202
+
199
203
  static closeSidePanel() {
200
204
  this.getSidePanelCloseButton().click();
201
205
  }
@@ -403,6 +407,14 @@ export class VisualGraphSteps extends BaseSteps {
403
407
  return this.getTruncateLabelsCheckbox().click();
404
408
  }
405
409
 
410
+ static getInvalidLinksMessage() {
411
+ return this.getByTestId('invalid-links-limit');
412
+ }
413
+
414
+ static getShownLimitMessage() {
415
+ return this.getByTestId('shown-links-limit');
416
+ }
417
+
406
418
  static openVisualGraphHome() {
407
419
  cy.get('.toolbar-holder').should('be.visible')
408
420
  .find('.return-home-btn').should('be.visible').click();
@@ -1,8 +1,14 @@
1
- export class YasrSteps {
1
+ import {BaseSteps} from "../base-steps.js";
2
+
3
+ export class YasrSteps extends BaseSteps {
2
4
  static getYasr() {
3
5
  return cy.get('.tabPanel.active .yasr');
4
6
  }
5
7
 
8
+ static waitUntilResultsIsVisible() {
9
+ return cy.waitUntil(() => this.getYasr().should('be.visible'));
10
+ }
11
+
6
12
  static getResultHeader() {
7
13
  return cy.get('.yasr_header');
8
14
  }
@@ -28,7 +34,8 @@ export class YasrSteps {
28
34
  }
29
35
 
30
36
  static getResults() {
31
- return YasrSteps.getYasr().find('.yasr_results tbody').find('tr');
37
+ this.getYasrResultsContainer().should('not.have.class', 'rendering_result')
38
+ return this.getYasrResultsContainer().find('tbody').find('tr');
32
39
  }
33
40
 
34
41
  static getResultTableHeader() {
@@ -107,15 +114,32 @@ export class YasrSteps {
107
114
  return YasrSteps.getYasr().find('.yasr-toolbar');
108
115
  }
109
116
 
110
- static getVisualButton() {
111
- return YasrSteps.getYasrToolbar().find('.explore-visual-graph-button');
112
- }
113
-
114
117
  static getNoDataElement() {
118
+ this.getYasrResultsContainer().should('not.have.class', 'rendering_result')
115
119
  return cy.get('.dataTables_empty');
116
120
  }
117
121
 
118
122
  static getNoResultsMessage() {
119
123
  return YasrSteps.getYasr().find('.alert-success');
120
124
  }
125
+
126
+ static getPivotTablePlugin() {
127
+ return YasrSteps.getYasr().find('.pivot-table-plugin');
128
+ }
129
+
130
+ static getGoogleChartPlugin() {
131
+ return YasrSteps.getYasr().find('.google-visualization-table');
132
+ }
133
+
134
+ static getExtendedTablePlugin() {
135
+ return YasrSteps.getYasr().find('.dataTables_wrapper');
136
+ }
137
+
138
+ static getFullscreenButton() {
139
+ return cy.get('.yasr-fullscreen-button');
140
+ }
141
+
142
+ static toggleFullscreen() {
143
+ YasrSteps.getFullscreenButton().click();
144
+ }
121
145
  }
@@ -7,6 +7,10 @@ export class RemoteLocationStubs extends Stubs {
7
7
  }).as('add-remote-location');
8
8
  }
9
9
 
10
+ static spyRemoteLocationCreate() {
11
+ cy.intercept('POST', '/rest/locations').as('add-remote-location');
12
+ }
13
+
10
14
  static stubGetRemoteLocations(count = 'no') {
11
15
  cy.intercept('GET', '/rest/locations', {
12
16
  fixture: `/remote-location/get-${count}-remote-locations.json`,
@@ -0,0 +1,17 @@
1
+ import {Stubs} from './stubs.js';
2
+
3
+ export class GraphConfigStubs extends Stubs {
4
+ static stubGetEmptyGraphConfigs() {
5
+ cy.intercept('GET', '/rest/explore-graph/config', {
6
+ statusCode: 200,
7
+ body: [],
8
+ }).as('getEmptyGraphConfigs');
9
+ }
10
+
11
+ static stubGetGraphConfigs(fixture = '/graph/graph-configurations.json') {
12
+ GraphConfigStubs.stubQueryResponse(
13
+ '/rest/explore-graph/config',
14
+ fixture,
15
+ 'getGraphConfigs');
16
+ }
17
+ }
@@ -8,6 +8,7 @@ import './user-commands';
8
8
  import './security-command';
9
9
  import './connector-commands';
10
10
  import 'cypress-wait-until';
11
+ import './url-commands.js';
11
12
 
12
13
  /**
13
14
  * Loads fixtures from the given paths recursively and returns them as an array.
@@ -47,13 +47,13 @@ Cypress.Commands.add('deleteRepository', (id, secured = false) => {
47
47
  });
48
48
  });
49
49
 
50
- Cypress.Commands.add('presetRepository', (id) => {
51
- cy.setLocalStorage(PRESET_REPO, JSON.stringify({id: id, location: ''}));
50
+ Cypress.Commands.add('presetRepository', (id, location = '') => {
51
+ cy.setLocalStorage(PRESET_REPO, JSON.stringify({id: id, location}));
52
52
  cy.waitUntil(() =>
53
53
  cy.getLocalStorage(PRESET_REPO)
54
54
  .then((preset) => {
55
55
  const presetRepo = JSON.parse(preset);
56
- return presetRepo && presetRepo.id === id
56
+ return presetRepo && presetRepo.id === id && presetRepo.location === location;
57
57
  }));
58
58
  cy.log('Pre-set repository:', id);
59
59
  });
@@ -78,6 +78,25 @@ Cypress.Commands.add('initializeRepository', (id) => {
78
78
  });
79
79
  });
80
80
 
81
+ /**
82
+ * A command for deleting remote locations by URI. It sends a DELETE request to the appropriate endpoint and waits until
83
+ * the response is received.
84
+ *
85
+ * @param {string} uri - The URI of the remote location to be deleted.
86
+ */
87
+ Cypress.Commands.add('deleteRemoteLocation', (uri) => {
88
+ cy.request({
89
+ method: 'DELETE',
90
+ url: '/rest/locations?uri=' + encodeURIComponent(uri),
91
+ headers: {
92
+ 'Content-Type': 'application/json'
93
+ },
94
+ failOnStatusCode: false
95
+ }).then((response) => {
96
+ cy.waitUntil(() => response);
97
+ });
98
+ });
99
+
81
100
  Cypress.Commands.add('enableAutocomplete', (repositoryId) => {
82
101
  toggleAutocomplete(repositoryId, true);
83
102
  });
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Custom Cypress command to retrieve the value of a query parameter from the current page URL.
3
+ *
4
+ * @param {string} key - The name of the query parameter to retrieve.
5
+ * @returns {Cypress.Chainable<string | null>} A chainable that resolves to the value of the query parameter,
6
+ * or null if the parameter is not present.
7
+ */
8
+ Cypress.Commands.add('getQueryParam', (key) => {
9
+ return cy.location('search').then((search) => {
10
+ const params = new URLSearchParams(search);
11
+ return params.get(key);
12
+ });
13
+ });