graphdb-workbench-tests 3.4.0-dynamic-guides-test → 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 (69) 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/navigation/navigation-guide.spec.js +64 -0
  7. package/e2e-legacy/guides/table-graph-explore/table-graph-explore-guide.spec.js +2 -1
  8. package/e2e-legacy/guides/ttyg/configure-agent/configure-agent-guide.spec.js +34 -26
  9. package/e2e-legacy/guides/ttyg/edit-agent/edit-ttyg-agent-guide.spec.js +1 -0
  10. package/e2e-legacy/guides/visual-graph/visual-graph-guide.spec.js +330 -124
  11. package/e2e-legacy/help/guides/guides-autostart.spec.js +36 -3
  12. package/e2e-legacy/help/guides/guides-confirm-cancel-dialog.js +83 -0
  13. package/e2e-legacy/home/cookie-policy/cookie-policy.spec.js +182 -0
  14. package/e2e-legacy/home/create-repository.spec.js +6 -0
  15. package/e2e-legacy/repository/attach-remote-location.spec.js +47 -12
  16. package/e2e-legacy/resource/resource.spec.js +33 -13
  17. package/e2e-legacy/setup/aclmanagement/acl-management-with-selected repository.spec.js +44 -0
  18. package/e2e-legacy/sparql-editor/actions/expand-results-over-sameas.spec.js +8 -8
  19. package/e2e-legacy/sparql-editor/actions/include-inferred-statements.spec.js +4 -4
  20. package/e2e-legacy/sparql-editor/actions/inferred-sameas.spec.js +3 -3
  21. package/e2e-legacy/sparql-editor/yasr/toolbar/visual-graph-button.spec.js +90 -36
  22. package/e2e-legacy/sparql-editor/yasr/yasr.spec.js +80 -0
  23. package/e2e-legacy/ttyg/chat-panel.spec.js +9 -0
  24. package/e2e-legacy/ttyg/clone-agent.spec.js +22 -0
  25. package/e2e-legacy/ttyg/edit-agent.spec.js +17 -0
  26. package/e2e-security/setup/home/cookie-policy.spec.js +232 -6
  27. package/e2e-security/setup/users-and-access/turn-on-security-and-password-change.spec.js +72 -59
  28. package/fixtures/graph/graph-configurations.json +59 -0
  29. package/fixtures/guides/confirm-cancel-dialog/confirm-cancel-dialog-guide.json +15 -0
  30. package/fixtures/guides/navigation/navigation-guide.json +60 -0
  31. package/fixtures/guides/ttyg/configure-agent/configure-ttyg-agent-guide.json +6 -1
  32. package/fixtures/guides/visual-graph/visual-graph-config-guide.json +39 -0
  33. package/fixtures/ttyg/chats/explain-response-1.json +2 -48
  34. package/npm-shrinkwrap.json +32 -33
  35. package/package.json +1 -1
  36. package/steps/cookie-policy/cookie-consent-banner-steps.js +21 -0
  37. package/steps/cookie-policy/cookie-policy-modal.steps.js +56 -0
  38. package/steps/graphql/create-graphql-endpoint-steps.js +8 -0
  39. package/steps/graphql/graphql-endpoint-management-steps.js +8 -0
  40. package/steps/graphql/graphql-playground-steps.js +8 -0
  41. package/steps/guides/guide-dialog-steps.js +56 -2
  42. package/steps/guides/movies-guide-steps.js +2 -1
  43. package/steps/header-steps.js +13 -0
  44. package/steps/home-steps.js +4 -27
  45. package/steps/login-steps.js +1 -0
  46. package/steps/main-menu-steps.js +1 -0
  47. package/steps/repositories/attach-repository-steps.js +16 -0
  48. package/steps/repository-steps.js +24 -0
  49. package/steps/resource/resource-steps.js +0 -8
  50. package/steps/setup/acl-management-steps.js +12 -0
  51. package/steps/setup/settings-steps.js +1 -1
  52. package/steps/shared-modal-dialog-steps.js +45 -0
  53. package/steps/sparql-editor-steps.js +18 -4
  54. package/steps/ttyg/ttyg-agent-settings-modal.steps.js +1 -1
  55. package/steps/visual-graph-split-button-steps.js +45 -0
  56. package/steps/visual-graph-steps.js +69 -3
  57. package/steps/yasgui/yasr-steps.js +30 -6
  58. package/stubs/cluster/remote-location-stubs.js +4 -0
  59. package/stubs/graph-config-stubs.js +17 -0
  60. package/stubs/guides/guides-stubs.js +8 -0
  61. package/stubs/repositories/repositories-stubs.js +22 -0
  62. package/stubs/security-stubs.js +4 -0
  63. package/stubs/sparql-stubs.js +10 -0
  64. package/support/commands.js +1 -0
  65. package/support/e2e-security.js +1 -1
  66. package/support/repository-commands.js +22 -3
  67. package/support/settings-commands.js +18 -2
  68. package/support/url-commands.js +13 -0
  69. package/e2e-legacy/home/cookie-policy.spec.js +0 -108
@@ -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
  }
@@ -1,4 +1,6 @@
1
- export class GuideDialogSteps {
1
+ import {BaseSteps} from "../base-steps.js";
2
+
3
+ export class GuideDialogSteps extends BaseSteps {
2
4
 
3
5
  static getModalDialog() {
4
6
  return cy.get('.shepherd-content:visible');
@@ -8,6 +10,50 @@ export class GuideDialogSteps {
8
10
  return GuideDialogSteps.getModalDialog().find('.shepherd-header');
9
11
  }
10
12
 
13
+ static getCancelButton() {
14
+ return this.getHeader().find('.shepherd-cancel-icon');
15
+ }
16
+
17
+ static clickOnCancelButton() {
18
+ return this.getCancelButton().click();
19
+ }
20
+
21
+ static getConfirmCancelDialog() {
22
+ return this.getByTestId('confirm-cancel-dialog');
23
+ }
24
+
25
+ static getConfirmCancelDialogCloseButton() {
26
+ return this.getByTestId('close-dialog-btn');
27
+ }
28
+
29
+ static clickOnConfirmCancelDialogCloseButton() {
30
+ return this.getConfirmCancelDialogCloseButton().click();
31
+ }
32
+
33
+ static getConfirmCancelDialogCancelButton() {
34
+ return this.getByTestId('cancel-btn');
35
+ }
36
+
37
+ static clickConfirmCancelDialogCancelButton() {
38
+ return this.getConfirmCancelDialogCancelButton().click();
39
+ }
40
+
41
+ static getConfirmCancelDialogDontShowAgainButton() {
42
+ return this.getByTestId('dont-show-again-btn');
43
+ }
44
+
45
+ static clickConfirmCancelDialogDontShowAgainButton() {
46
+ return this.getConfirmCancelDialogDontShowAgainButton().click();
47
+ }
48
+
49
+ static getConfirmCancelDialogExitButton() {
50
+ return this.getByTestId('exit-btn');
51
+ }
52
+
53
+ static clickConfirmCancelDialogExitButton() {
54
+ return this.getConfirmCancelDialogExitButton().click();
55
+ }
56
+
11
57
  static getContent() {
12
58
  return GuideDialogSteps.getModalDialog().find('.shepherd-text');
13
59
  }
@@ -28,8 +74,12 @@ export class GuideDialogSteps {
28
74
  return GuideDialogSteps.getFooter().find('.shepherd-button').contains('Close');
29
75
  }
30
76
 
77
+ static getSkipButton() {
78
+ return GuideDialogSteps.getFooter().find('.shepherd-button').contains('Skip');
79
+ }
80
+
31
81
  static clickOnNextButton(forceVisible = false) {
32
- GuideDialogSteps.getNextButton().scrollIntoView().click({force: forceVisible});
82
+ return GuideDialogSteps.getNextButton().scrollIntoView().click({force: forceVisible});
33
83
  }
34
84
 
35
85
  static clickOnPreviousButton(forceVisible = false) {
@@ -40,6 +90,10 @@ export class GuideDialogSteps {
40
90
  GuideDialogSteps.getCloseButton().scrollIntoView().click();
41
91
  }
42
92
 
93
+ static clickOnSkipButton() {
94
+ GuideDialogSteps.getSkipButton().scrollIntoView().click();
95
+ }
96
+
43
97
  static getContentLink() {
44
98
  return GuideDialogSteps.getContent().find('a');
45
99
  }
@@ -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() {
@@ -6,4 +6,17 @@ export class HeaderSteps {
6
6
  static openHomePage() {
7
7
  HeaderSteps.getHeader().find('.home-page').click();
8
8
  }
9
+
10
+ static logout() {
11
+ this.getHeader().find('onto-user-menu').click();
12
+ cy.get('.onto-user-menu-dropdown')
13
+ .contains('Logout')
14
+ .first()
15
+ // Force the click because Cypress sometimes determines that the item has 0x0 dimensions
16
+ .click({force: true});
17
+ }
18
+
19
+ static login() {
20
+ this.getHeader().find('.onto-user-login').click();
21
+ }
9
22
  }
@@ -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
 
@@ -313,26 +310,6 @@ class HomeSteps extends BaseSteps {
313
310
  return cy.get('#license-label-home');
314
311
  }
315
312
 
316
- static getCookieConsentPopup() {
317
- return cy.get('.cookie-consent-modal');
318
- }
319
-
320
- static getAgreeButton() {
321
- return HomeSteps.getCookieConsentPopup().find('button');
322
- }
323
-
324
- static clickAgreeButton() {
325
- return HomeSteps.getAgreeButton().click();
326
- }
327
-
328
- static getCookiePolicyLink() {
329
- return cy.get('.cookie-consent-content a');
330
- }
331
-
332
- static clickCookiePolicyLink() {
333
- return HomeSteps.getCookiePolicyLink().click();
334
- }
335
-
336
313
  static getCookiePolicyModal() {
337
314
  return cy.get('.cookie-policy-modal');
338
315
  }
@@ -33,6 +33,7 @@ export class LoginSteps {
33
33
  cy.getByTestId('submit-btn').click();
34
34
  }
35
35
 
36
+ // TODO: Use the HeaderSteps.logout()
36
37
  static logout() {
37
38
  cy.get('onto-user-menu').click();
38
39
  cy.get('.onto-user-menu-dropdown')
@@ -16,6 +16,7 @@ export class MainMenuSteps {
16
16
  return MainMenuSteps.getMenuButton('Import');
17
17
  }
18
18
 
19
+ // TODO: temporary using more complex implementation until we have two SPARQL menu elements in the navbar
19
20
  static getMenuSparql() {
20
21
  return MainMenuSteps.getMenuButton('SPARQL');
21
22
  }
@@ -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
  }
@@ -107,7 +107,7 @@ export class SettingsSteps {
107
107
  }
108
108
 
109
109
  static clickCookiePolicyLink() {
110
- return SettingsSteps.getCookiePolicyButton().click();
110
+ return this.getCookiePolicyButton().click();
111
111
  }
112
112
 
113
113
  static getCookiePolicyModal() {
@@ -0,0 +1,45 @@
1
+ /**
2
+ * Basic steps for interacting with the onto-dialog component. This class is designed to be extended by more specific
3
+ * dialog steps classes.
4
+ */
5
+ export class SharedModalDialogSteps {
6
+ /**
7
+ * Returns the onto-dialog element.
8
+ * This is the generic method to get the dialog element.
9
+ */
10
+ static getDialog() {
11
+ return cy.get('onto-dialog');
12
+ }
13
+
14
+ /**
15
+ * Returns a child component of the dialog based on the provided CSS class. The onto-dialog component is designed to
16
+ * be flexible and can contain be composed of various child components included in different slots: header, body,
17
+ * and footer.
18
+ * The purpose of this method is to allow selection of specific dialog in case there are multiple dialogs in the page.
19
+ * @param cssClass - The CSS class of the child component to retrieve. Defaults to '.dialog', which will return the
20
+ * dialog itself.
21
+ */
22
+ static getDialogComponent(cssClass = '.dialog') {
23
+ return cy.get(cssClass);
24
+ }
25
+
26
+ static getHeader() {
27
+ return this.getDialog().find('.dialog-header');
28
+ }
29
+
30
+ static getBody() {
31
+ return this.getDialog().find('.dialog-body');
32
+ }
33
+
34
+ static getFooter() {
35
+ return this.getDialog().find('.dialog-footer');
36
+ }
37
+
38
+ static getCloseButton() {
39
+ return this.getHeader().find('.close');
40
+ }
41
+
42
+ static close() {
43
+ this.getCloseButton().click();
44
+ }
45
+ }
@@ -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
+ }
@@ -87,6 +87,30 @@ export class VisualGraphSteps extends BaseSteps {
87
87
  return cy.get('.autocomplete-toast a');
88
88
  }
89
89
 
90
+ static getRdfResourceSearchInput() {
91
+ return cy.getByTestId('rdf-resource-input');
92
+ }
93
+
94
+ static searchForRdfResource(resource) {
95
+ this.getRdfResourceSearchInput().type(resource, {force: true});
96
+ }
97
+
98
+ static shareVisualGraphWithOtherUsers() {
99
+ this.getShareGraphButton().click();
100
+ }
101
+
102
+ static getShareGraphButton() {
103
+ return cy.getByTestId('share-graph-config');
104
+ }
105
+
106
+ static selectConfig(configName) {
107
+ this.getConfigByName(configName).click();
108
+ }
109
+
110
+ static getConfigByName(name) {
111
+ return cy.getByTestId(`graph-config-${name}`);
112
+ }
113
+
90
114
  static getGraphVisualizationNodes() {
91
115
  return this.getGraphVisualizationPane().find('.node-wrapper');
92
116
  }
@@ -133,7 +157,7 @@ export class VisualGraphSteps extends BaseSteps {
133
157
  }
134
158
 
135
159
  static getNodeLabel(nodeId) {
136
- return this.getNode(nodeId).find('.node-label-body');
160
+ return this.getNode(nodeId).find('.node-label-body div');
137
161
  }
138
162
 
139
163
  static getPredicates() {
@@ -153,7 +177,7 @@ export class VisualGraphSteps extends BaseSteps {
153
177
  }
154
178
 
155
179
  static dblclickOnNode(nodeId) {
156
- this.getCircleOfNodeByNodeId(nodeId).dblclick();
180
+ this.getCircleOfNodeByNodeId(nodeId).trigger('dblclick');
157
181
  }
158
182
 
159
183
  static getLineBetweenNodesById(narrowId) {
@@ -172,10 +196,24 @@ export class VisualGraphSteps extends BaseSteps {
172
196
  return cy.get('.rdf-side-panel-content');
173
197
  }
174
198
 
199
+ static getPropertyByIndex(index) {
200
+ return this.getSidePanelContent().find('.rdf-list .datasource').eq(index);
201
+ }
202
+
175
203
  static closeSidePanel() {
176
204
  this.getSidePanelCloseButton().click();
177
205
  }
178
206
 
207
+ // Note the index is 1-based
208
+ static openConfigTab(tabIndex) {
209
+ return this.getConfigTab(tabIndex).click();
210
+ }
211
+
212
+ // Note the index is 1-based
213
+ static getConfigTab(tabIndex) {
214
+ return cy.getByTestId(`graph-config-tab-${tabIndex}`);
215
+ }
216
+
179
217
  // Visual graph settings form field access
180
218
 
181
219
  static openPredicatesTab() {
@@ -263,12 +301,32 @@ export class VisualGraphSteps extends BaseSteps {
263
301
  return cy.get('.create-graph-config').should('be.visible');
264
302
  }
265
303
 
304
+ static createCustomGraph() {
305
+ this.getCreateCustomGraphLink().click();
306
+ }
307
+
266
308
  static getGraphConfigName() {
267
309
  return cy.get('.graph-config-name').should('be.visible');
268
310
  }
269
311
 
270
312
  static typeGraphConfigName(name) {
271
- this.getGraphConfigName().type(name);
313
+ this.getGraphConfigName().type(name, {force: true});
314
+ }
315
+
316
+ static typeGraphConfigDescription(description) {
317
+ return this.getGraphConfigDescription().type(description, {force: true});
318
+ }
319
+
320
+ static getGraphConfigDescription() {
321
+ return cy.get('.graph-config-description').should('be.visible');
322
+ }
323
+
324
+ static typeGraphConfigHint(hint) {
325
+ return this.getGraphConfigHint().type(hint, {force: true});
326
+ }
327
+
328
+ static getGraphConfigHint() {
329
+ return cy.get('.graph-config-example').should('be.visible');
272
330
  }
273
331
 
274
332
  static getSaveConfigButton() {
@@ -349,6 +407,14 @@ export class VisualGraphSteps extends BaseSteps {
349
407
  return this.getTruncateLabelsCheckbox().click();
350
408
  }
351
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
+
352
418
  static openVisualGraphHome() {
353
419
  cy.get('.toolbar-holder').should('be.visible')
354
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
  }