graphdb-workbench-tests 3.3.3 → 3.4.0-RC1

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 (84) 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 +167 -0
  13. package/e2e-legacy/explore/visual-graph/visual.graph.spec.js +57 -85
  14. package/e2e-legacy/graphql/graphql-in-remote-location.spec.js +49 -0
  15. package/e2e-legacy/guides/execute-sparql-query/execute-sparql-query-guide.spec.js +92 -0
  16. package/e2e-legacy/guides/import-rdf-file/confirm-duplicate-rdf-file.spec.js +63 -0
  17. package/e2e-legacy/guides/import-rdf-file/import-rdf-file.spec.js +105 -0
  18. package/e2e-legacy/guides/navigation/navigation-guide.spec.js +64 -0
  19. package/e2e-legacy/guides/rdf-rank/rdf-rank-guide.spec.js +42 -0
  20. package/e2e-legacy/guides/table-graph-explore/table-graph-explore-guide.spec.js +168 -0
  21. package/e2e-legacy/guides/ttyg/configure-agent/configure-agent-guide.spec.js +34 -26
  22. package/e2e-legacy/guides/ttyg/edit-agent/edit-ttyg-agent-guide.spec.js +2 -2
  23. package/e2e-legacy/guides/visual-graph/visual-graph-guide.spec.js +372 -0
  24. package/e2e-legacy/guides/welcome/welcome-guide.spec.js +36 -0
  25. package/e2e-legacy/help/guides/guides-autostart.spec.js +36 -3
  26. package/e2e-legacy/help/guides/guides-confirm-cancel-dialog.js +83 -0
  27. package/e2e-legacy/help/guides/movies-interactive-guide.spec.js +47 -49
  28. package/e2e-legacy/repository/attach-remote-location.spec.js +47 -12
  29. package/e2e-legacy/repository/url-with-repository-id-parameter.spec.js +1 -0
  30. package/e2e-legacy/resource/resource.spec.js +34 -19
  31. package/e2e-legacy/setup/aclmanagement/acl-management-with-selected repository.spec.js +44 -0
  32. package/e2e-legacy/setup/aclmanagement/create-rule.spec.js +3 -0
  33. package/e2e-legacy/setup/connectors-lucene.spec.js +24 -8
  34. package/e2e-legacy/sparql-editor/actions/expand-results-over-sameas.spec.js +9 -9
  35. package/e2e-legacy/sparql-editor/actions/include-inferred-statements.spec.js +4 -4
  36. package/e2e-legacy/sparql-editor/actions/inferred-sameas.spec.js +3 -3
  37. package/e2e-legacy/sparql-editor/actions/show-saved-queries.spec.js +1 -6
  38. package/e2e-legacy/sparql-editor/yasgui-tabs.spec.js +2 -12
  39. package/e2e-legacy/sparql-editor/yasr/pagination.spec.js +5 -18
  40. package/e2e-legacy/sparql-editor/yasr/table-plugin.spec.js +1 -6
  41. package/e2e-legacy/sparql-editor/yasr/toolbar/visual-graph-button.spec.js +90 -41
  42. package/e2e-legacy/sparql-editor/yasr/yasr.spec.js +80 -0
  43. package/e2e-legacy/ttyg/chat-list.spec.js +2 -12
  44. package/e2e-legacy/ttyg/create-agent.spec.js +8 -48
  45. package/e2e-legacy/ttyg/edit-agent.spec.js +2 -12
  46. package/e2e-security/setup/users-and-access/turn-on-security-and-password-change.spec.js +73 -61
  47. package/fixtures/graph/graph-configurations.json +59 -0
  48. package/fixtures/guides/confirm-cancel-dialog/confirm-cancel-dialog-guide.json +15 -0
  49. package/fixtures/guides/execute-sparql-query/execute-sparql-query-guide.json +54 -0
  50. package/fixtures/guides/import-rdf-file/confirm-duplicate-rdf-file-guide.json +30 -0
  51. package/fixtures/guides/import-rdf-file/import-rdf-file-guide.json +21 -0
  52. package/fixtures/guides/navigation/navigation-guide.json +60 -0
  53. package/fixtures/guides/rdf-rank/rdf-rank-guide.json +18 -0
  54. package/fixtures/guides/table-graph-explore/table-graph-explore-guide.json +51 -0
  55. package/fixtures/guides/table-graph-explore/table-graph-explore-without-substeps-guide.json +25 -0
  56. package/fixtures/guides/ttyg/configure-agent/configure-ttyg-agent-guide.json +6 -1
  57. package/fixtures/guides/visual-graph/visual-graph-config-guide.json +39 -0
  58. package/fixtures/guides/visual-graph/visual-graph-guide.json +85 -0
  59. package/fixtures/guides/welcome/welcome-guide.json +18 -0
  60. package/npm-shrinkwrap.json +335 -282
  61. package/package.json +1 -1
  62. package/steps/graphql/create-graphql-endpoint-steps.js +8 -0
  63. package/steps/graphql/graphql-endpoint-management-steps.js +8 -0
  64. package/steps/graphql/graphql-playground-steps.js +8 -0
  65. package/steps/guides/guide-dialog-steps.js +60 -2
  66. package/steps/guides/movies-guide-steps.js +2 -1
  67. package/steps/main-menu-steps.js +1 -0
  68. package/steps/repositories/attach-repository-steps.js +16 -0
  69. package/steps/repository-steps.js +24 -0
  70. package/steps/resource/resource-steps.js +0 -8
  71. package/steps/setup/acl-management-steps.js +16 -0
  72. package/steps/sparql-editor-steps.js +18 -4
  73. package/steps/sparql-steps.js +13 -1
  74. package/steps/ttyg/ttyg-agent-settings-modal.steps.js +1 -1
  75. package/steps/visual-graph-split-button-steps.js +45 -0
  76. package/steps/visual-graph-steps.js +84 -2
  77. package/steps/yasgui/yasqe-steps.js +29 -4
  78. package/steps/yasgui/yasr-steps.js +34 -6
  79. package/stubs/cluster/remote-location-stubs.js +4 -0
  80. package/stubs/graph-config-stubs.js +17 -0
  81. package/stubs/guides/guides-stubs.js +41 -1
  82. package/support/commands.js +1 -0
  83. package/support/repository-commands.js +22 -3
  84. package/support/url-commands.js +13 -0
@@ -3,7 +3,7 @@ import {MoviesGuideSteps} from "../../../steps/guides/movies-guide-steps";
3
3
 
4
4
  const MOVIES_FILE_FOR_IMPORT = 'movies.ttl';
5
5
 
6
- describe('Interactive guides', () => {
6
+ describe('Describes "Movies" interactive guide', () => {
7
7
 
8
8
  let repositoryId;
9
9
 
@@ -20,54 +20,52 @@ describe('Interactive guides', () => {
20
20
  cy.deleteRepository(repositoryId);
21
21
  });
22
22
 
23
- context('Describes "Movies" interactive guide', () => {
24
- it('Tests movies interactive guide using "Next" button to the end', () => {
25
- const stepAssertions = [
26
- {assert: MoviesGuideSteps.assertExploreClassHierarchyStep1},
27
- {assert: MoviesGuideSteps.assertExploreClassHierarchyStep2},
28
- {assert: MoviesGuideSteps.assertExploreClassHierarchyStep3},
29
- {assert: MoviesGuideSteps.assertExploreClassHierarchyStep4},
30
- {assert: MoviesGuideSteps.assertExploreClassHierarchyStep5},
31
- {assert: MoviesGuideSteps.assertExploreClassHierarchyStep6},
32
- {assert: MoviesGuideSteps.assertExploreClassHierarchyStep7},
33
- {assert: MoviesGuideSteps.assertClassHierarchyInstancesStep1},
34
- {assert: MoviesGuideSteps.assertClassHierarchyInstancesStep2},
35
- {assert: MoviesGuideSteps.assertClassHierarchyInstancesStep3},
36
- {assert: MoviesGuideSteps.assertClassHierarchyInstancesStep4},
37
- {assert: MoviesGuideSteps.assertClassHierarchyInstancesStep5},
38
- // Forces the click because results are to many and dialog is not visible into the test.
39
- {assert: MoviesGuideSteps.assertClassHierarchyInstancesStep6, forceButtonClick: true},
40
- {assert: MoviesGuideSteps.assertClassHierarchyInstancesStep7, forceButtonClick: true},
41
- {assert: MoviesGuideSteps.assertClassHierarchyInstancesStep8},
42
- {assert: MoviesGuideSteps.assertExecuteSparqlQueryStep1},
43
- {assert: MoviesGuideSteps.assertExecuteSparqlQueryStep2},
44
- {assert: MoviesGuideSteps.assertExecuteSparqlQueryStep3},
45
- {assert: MoviesGuideSteps.assertExecuteSparqlQueryStep4},
46
- {assert: MoviesGuideSteps.assertExecuteSparqlQueryStep5},
47
- {assert: MoviesGuideSteps.assertExecuteSparqlQueryStep6},
48
- {assert: MoviesGuideSteps.assertExecuteSparqlQueryStep7},
49
- {assert: MoviesGuideSteps.assertExecuteSparqlQueryStep8, forceButtonClick: true},
50
- {assert: MoviesGuideSteps.assertExploreRDFStep1, forceButtonClick: true},
51
- {assert: MoviesGuideSteps.assertExploreRDFStep2},
52
- {assert: MoviesGuideSteps.assertExploreRDFStep3},
53
- {assert: MoviesGuideSteps.assertExploreRDFStep4},
54
- {assert: MoviesGuideSteps.assertExploreRDFStep5},
55
- {assert: MoviesGuideSteps.assertExploreRDFStep6},
56
- {assert: MoviesGuideSteps.assertExploreRDFStep7},
57
- {assert: MoviesGuideSteps.assertExploreRDFStep8},
58
- {assert: MoviesGuideSteps.assertExploreRDFStep9},
59
- {assert: MoviesGuideSteps.assertExploreRDFStep10},
60
- {assert: MoviesGuideSteps.assertSparqlQueryStep1},
61
- {assert: MoviesGuideSteps.assertSparqlQueryStep2},
62
- {assert: MoviesGuideSteps.assertSparqlQueryStep3},
63
- {assert: MoviesGuideSteps.assertSparqlQueryStep4},
64
- {assert: MoviesGuideSteps.assertSparqlQueryStep5},
65
- {assert: MoviesGuideSteps.assertSparqlQueryStep6},
66
- {assert: MoviesGuideSteps.assertSparqlQueryStep7}
67
- ];
23
+ it('Tests movies interactive guide using "Next" button to the end', () => {
24
+ const stepAssertions = [
25
+ {assert: MoviesGuideSteps.assertExploreClassHierarchyStep1},
26
+ {assert: MoviesGuideSteps.assertExploreClassHierarchyStep2},
27
+ {assert: MoviesGuideSteps.assertExploreClassHierarchyStep3},
28
+ {assert: MoviesGuideSteps.assertExploreClassHierarchyStep4},
29
+ {assert: MoviesGuideSteps.assertExploreClassHierarchyStep5},
30
+ {assert: MoviesGuideSteps.assertExploreClassHierarchyStep6},
31
+ {assert: MoviesGuideSteps.assertExploreClassHierarchyStep7},
32
+ {assert: MoviesGuideSteps.assertClassHierarchyInstancesStep1},
33
+ {assert: MoviesGuideSteps.assertClassHierarchyInstancesStep2},
34
+ {assert: MoviesGuideSteps.assertClassHierarchyInstancesStep3},
35
+ {assert: MoviesGuideSteps.assertClassHierarchyInstancesStep4},
36
+ {assert: MoviesGuideSteps.assertClassHierarchyInstancesStep5},
37
+ // Forces the click because results are to many and dialog is not visible into the test.
38
+ {assert: MoviesGuideSteps.assertClassHierarchyInstancesStep6, forceButtonClick: true},
39
+ {assert: MoviesGuideSteps.assertClassHierarchyInstancesStep7, forceButtonClick: true},
40
+ {assert: MoviesGuideSteps.assertClassHierarchyInstancesStep8},
41
+ {assert: MoviesGuideSteps.assertExecuteSparqlQueryStep1},
42
+ {assert: MoviesGuideSteps.assertExecuteSparqlQueryStep2},
43
+ {assert: MoviesGuideSteps.assertExecuteSparqlQueryStep3},
44
+ {assert: MoviesGuideSteps.assertExecuteSparqlQueryStep4},
45
+ {assert: MoviesGuideSteps.assertExecuteSparqlQueryStep5},
46
+ {assert: MoviesGuideSteps.assertExecuteSparqlQueryStep6},
47
+ {assert: MoviesGuideSteps.assertExecuteSparqlQueryStep7},
48
+ {assert: MoviesGuideSteps.assertExecuteSparqlQueryStep8, forceButtonClick: true},
49
+ {assert: MoviesGuideSteps.assertExploreRDFStep1, forceButtonClick: true},
50
+ {assert: MoviesGuideSteps.assertExploreRDFStep2},
51
+ {assert: MoviesGuideSteps.assertExploreRDFStep3},
52
+ {assert: MoviesGuideSteps.assertExploreRDFStep4},
53
+ {assert: MoviesGuideSteps.assertExploreRDFStep5},
54
+ {assert: MoviesGuideSteps.assertExploreRDFStep6},
55
+ {assert: MoviesGuideSteps.assertExploreRDFStep7},
56
+ {assert: MoviesGuideSteps.assertExploreRDFStep8},
57
+ {assert: MoviesGuideSteps.assertExploreRDFStep9},
58
+ {assert: MoviesGuideSteps.assertExploreRDFStep10},
59
+ {assert: MoviesGuideSteps.assertSparqlQueryStep1},
60
+ {assert: MoviesGuideSteps.assertSparqlQueryStep2},
61
+ {assert: MoviesGuideSteps.assertSparqlQueryStep3},
62
+ {assert: MoviesGuideSteps.assertSparqlQueryStep4},
63
+ {assert: MoviesGuideSteps.assertSparqlQueryStep5},
64
+ {assert: MoviesGuideSteps.assertSparqlQueryStep6},
65
+ {assert: MoviesGuideSteps.assertSparqlQueryStep7}
66
+ ];
68
67
 
69
- const guideName = '3 The Movies database guide';
70
- GuideSteps.runGuideTest(guideName, repositoryId, MOVIES_FILE_FOR_IMPORT, stepAssertions);
71
- });
68
+ const guideName = '3 The Movies database guide';
69
+ GuideSteps.runGuideTest(guideName, repositoryId, MOVIES_FILE_FOR_IMPORT, stepAssertions);
72
70
  });
73
71
  });
@@ -2,13 +2,21 @@ import {RepositorySteps} from "../../steps/repository-steps";
2
2
  import {AttachRepositorySteps} from "../../steps/repositories/attach-repository-steps";
3
3
  import {ModalDialogSteps} from "../../steps/modal-dialog-steps";
4
4
  import {RepositoriesStubs} from "../../stubs/repositories/repositories-stubs";
5
+ import {RemoteLocationStubs} from '../../stubs/cluster/remote-location-stubs.js';
5
6
 
6
7
  describe('Attach remote location', () => {
8
+ let remoteLocationName;
9
+
10
+ beforeEach(() => {
11
+ remoteLocationName = 'http://location-' + Date.now();
12
+ });
13
+
14
+ afterEach(() => {
15
+ cy.deleteRemoteLocation(remoteLocationName);
16
+ })
7
17
 
8
18
  it('Should create and delete remote instance', () => {
9
- cy.visit('/repository');
10
- RepositorySteps.waitLoader();
11
- RepositorySteps.waitUntilRepositoriesPageIsLoaded();
19
+ RepositorySteps.visit();
12
20
 
13
21
  // When I open the "Attach a remote instance" dialog.
14
22
  AttachRepositorySteps.openAttachRemoteLocationDialog();
@@ -114,12 +122,43 @@ describe('Attach remote location', () => {
114
122
  RepositorySteps.getSparqlOntopicTable().should('not.exist');
115
123
  });
116
124
 
125
+ it('should be able to create a remote location with encrypted password', () => {
126
+ // Given I have a running GDB instance and I am on the Repositories view
127
+ RepositorySteps.visit();
128
+ // When I start the location creation
129
+ AttachRepositorySteps.openAttachRemoteLocationDialog();
130
+ AttachRepositorySteps.enterURL(remoteLocationName);
131
+ // And I select basic auth type
132
+ AttachRepositorySteps.selectBasicRadioBtn();
133
+ // Then I expect to see a security warning
134
+ AttachRepositorySteps.getUnencryptedPasswordWarning().should('be.visible');
135
+ // And I should not see the warning for the backward compatibility issues when encrypting the password
136
+ AttachRepositorySteps.getBackwardCompatibilityWarning().should('not.exist');
137
+ // When I select to encrypt the password
138
+ AttachRepositorySteps.encryptPassword();
139
+ // Then I should see the backward compatibility warning
140
+ AttachRepositorySteps.getBackwardCompatibilityWarning().should('be.visible');
141
+ // And the unencrypted password warning should not be visible
142
+ AttachRepositorySteps.getUnencryptedPasswordWarning().should('not.exist');
143
+ // When I fill in username and password
144
+ AttachRepositorySteps.enterUsername('locationadmin');
145
+ AttachRepositorySteps.enterPassword('admin123');
146
+ // And I save the location
147
+ RemoteLocationStubs.spyRemoteLocationCreate();
148
+ AttachRepositorySteps.attachRemoteLocation();
149
+ // Then encrypt password flag should be sent
150
+ cy.wait('@add-remote-location')
151
+ .its('request.body')
152
+ .should('include', {
153
+ encryptPassword: true,
154
+ username: 'locationadmin'
155
+ });
156
+ });
157
+
117
158
  it('Should render different location types in separate tables: error, location with and without repositories', () => {
118
159
  RepositoriesStubs.stubRepositories();
119
160
  RepositoriesStubs.stubLocations();
120
- cy.visit('/repository');
121
- RepositorySteps.waitLoader();
122
- RepositorySteps.waitUntilRepositoriesPageIsLoaded();
161
+ RepositorySteps.visit();
123
162
  cy.wait('@get-all-repositories');
124
163
 
125
164
  // When I open the Repositories view that contains all possible kind of locations.
@@ -137,9 +176,7 @@ describe('Attach remote location', () => {
137
176
  });
138
177
 
139
178
  it('Should be able to open edit remote location dialog', () => {
140
- cy.visit('/repository');
141
- RepositorySteps.waitLoader();
142
- RepositorySteps.waitUntilRepositoriesPageIsLoaded();
179
+ RepositorySteps.visit();
143
180
 
144
181
  const locationId = 'http://local';
145
182
  addRemoteSPARQLLocation(locationId, 'username', 'password');
@@ -161,9 +198,7 @@ describe('Attach remote location', () => {
161
198
  });
162
199
 
163
200
  it('Should create and delete SPARQL endpoint instance', () => {
164
- cy.visit('/repository');
165
- RepositorySteps.waitLoader();
166
- RepositorySteps.waitUntilRepositoriesPageIsLoaded();
201
+ RepositorySteps.visit();
167
202
 
168
203
  const locationId = 'http://endpoint/repo/ex';
169
204
  addRemoteSPARQLLocation(locationId, 'username', 'password');
@@ -159,6 +159,7 @@ describe('URL with Repository ID parameter', () => {
159
159
  beforeEach(() => {
160
160
  repositoryId = 'repository-in-url-' + Date.now();
161
161
  cy.createRepository({id: repositoryId});
162
+ cy.initializeRepository(repositoryId);
162
163
  cy.presetRepository(repositoryId);
163
164
  })
164
165
 
@@ -7,10 +7,12 @@ import {YasqeSteps} from "../../steps/yasgui/yasqe-steps";
7
7
  import {YasrSteps} from "../../steps/yasgui/yasr-steps";
8
8
  import {YasguiSteps} from "../../steps/yasgui/yasgui-steps";
9
9
  import {JsonLdModalSteps} from "../../steps/json-ld-modal-steps";
10
+ import {GraphConfigStubs} from '../../stubs/graph-config-stubs.js';
11
+ import {VisualGraphSplitButtonSteps} from '../../steps/visual-graph-split-button-steps.js';
10
12
 
11
13
  const FILE_TO_IMPORT = 'resource-test-data.ttl';
12
- const SUBJECT_RESOURCE = 'http:%2F%2Fexample.com%2Fontology%23CustomerLoyalty';
13
- const SUBJECT_RESOURCE_SHORT_URI = 'http://example.com/ontology#CustomerLoyalty';
14
+ const SUBJECT_RESOURCE_ENCODED = 'http:%2F%2Fexample.com%2Fontology%23CustomerLoyalty';
15
+ const SUBJECT_RESOURCE = 'http://example.com/ontology#CustomerLoyalty';
14
16
  const PREDICATE_SOURCE = 'http:%2F%2Fwww.w3.org%2F2000%2F01%2Frdf-schema%23subClassOf';
15
17
  const CONTEXT_EXPLICIT = 'http://www.ontotext.com/explicit';
16
18
  const OBJECT_RESOURCE = 'http:%2F%2Fexample.com%2Fontology%23Metric';
@@ -33,13 +35,13 @@ describe('Resource view', () => {
33
35
 
34
36
  it('should open resource view with active role tab depend on url role parameter', () => {
35
37
  ResourceSteps.getAllRoles().forEach((role) => {
36
- ResourceSteps.visit(`uri=${SUBJECT_RESOURCE}&role=${role}`);
38
+ ResourceSteps.visit(`uri=${SUBJECT_RESOURCE_ENCODED}&role=${role}`);
37
39
  ResourceSteps.verifyActiveRoleTab(role);
38
40
  });
39
41
  });
40
42
 
41
43
  it('should open subject tab if role parameter is miss', () => {
42
- ResourceSteps.visit(`uri=${SUBJECT_RESOURCE}&role=subject`);
44
+ ResourceSteps.visit(`uri=${SUBJECT_RESOURCE_ENCODED}&role=subject`);
43
45
  ResourceSteps.verifyActiveRoleTab('subject');
44
46
  });
45
47
 
@@ -62,17 +64,35 @@ describe('Resource view', () => {
62
64
  YasrSteps.getResults().should('have.length', 5);
63
65
  });
64
66
 
65
- it('should navigate to visual graph view', () => {
67
+ it('should open graphs-visualizations view when click on main button', () => {
66
68
  // When I am on resource view and page loaded a resource.
67
- ResourceSteps.visit(`uri=${SUBJECT_RESOURCE}&role=subject`);
69
+ ResourceSteps.visit(`uri=${SUBJECT_RESOURCE_ENCODED}&role=subject`);
68
70
 
69
71
  // When I click on "Visual graph" button.
70
- ResourceSteps.clickOnVisualGraphButton();
72
+ VisualGraphSplitButtonSteps.clickOnVisualizeMainButton();
71
73
 
72
74
  // Then I expect to be redirected to explore graph view.
73
75
  VisualGraphSteps.verifyUrl();
74
76
  });
75
77
 
78
+ it('should open graphs-visualizations view when select a graph configuration', () => {
79
+ // When I am on resource view and page loaded a resource.
80
+ ResourceSteps.visit(`uri=${SUBJECT_RESOURCE_ENCODED}&role=subject`);
81
+ GraphConfigStubs.stubGetGraphConfigs();
82
+
83
+ // WHEN: I open the dropdown.
84
+ VisualGraphSplitButtonSteps.toggleGraphConfigDropdown();
85
+ // THEN: I expect to see all graph configurations.
86
+ VisualGraphSplitButtonSteps.getGraphConfigs().should('have.length', 3);
87
+
88
+ // WHEN: I select a graph configuration
89
+ VisualGraphSplitButtonSteps.selectGraphConfig();
90
+ // THEN: I expect to be navigated to graphs-visualizations view.
91
+ cy.url().should('include', 'graphs-visualizations');
92
+ cy.getQueryParam('uri').should('include', SUBJECT_RESOURCE);
93
+ cy.getQueryParam('config').should('eq', 'de99fd5de7f94ef98f1875dff55fc1c9');
94
+ });
95
+
76
96
  it('should displays results depends on explicit/implicit dropdown', () => {
77
97
  // When I am on resource view and page loaded a resource that has triplets in explicit and implicit context,
78
98
  ResourceSteps.visit(`uri=${IMPLICIT_EXPLICIT_RESOURCE}&role=all`);
@@ -175,11 +195,11 @@ describe('Resource view', () => {
175
195
  it('should list the triples of a resource used as subject', () => {
176
196
  // When I am on resource view,
177
197
  // and page loaded a resource that is used as subject,
178
- ResourceSteps.visit(`uri=${SUBJECT_RESOURCE}&role=subject`);
198
+ ResourceSteps.visit(`uri=${SUBJECT_RESOURCE_ENCODED}&role=subject`);
179
199
 
180
200
  // Then I expect to see only one result because the resource has only one triplet as subject.
181
201
  YasrSteps.getResults().should('have.length', 1);
182
- YasrSteps.getResultLink(0, 1).should('contain', SUBJECT_RESOURCE_SHORT_URI);
202
+ YasrSteps.getResultLink(0, 1).should('contain', SUBJECT_RESOURCE);
183
203
  YasrSteps.getResultLink(0, 2).should('contain', 'rdfs:subClassOf');
184
204
  YasrSteps.getResultLink(0, 3).should('contain', 'http://example.com/ontology#Metric');
185
205
  YasrSteps.getResultLink(0, 4).should('contain', CONTEXT_EXPLICIT);
@@ -196,7 +216,7 @@ describe('Resource view', () => {
196
216
  YasrSteps.getResults().should('have.length', 1);
197
217
  YasrSteps.getResultLink(0, 1).should('contain', 'http://example.com/resource/person/W6J1827/customerLoyalty');
198
218
  YasrSteps.getResultLink(0, 2).should('contain', 'rdf:type');
199
- YasrSteps.getResultLink(0, 3).should('contain', SUBJECT_RESOURCE_SHORT_URI);
219
+ YasrSteps.getResultLink(0, 3).should('contain', SUBJECT_RESOURCE);
200
220
  YasrSteps.getResultLink(0, 4).should('contain', CONTEXT_EXPLICIT);
201
221
 
202
222
  // When I click on "context" tab.
@@ -211,14 +231,14 @@ describe('Resource view', () => {
211
231
  // Then I expect to see all triples of subject without mater of its role.
212
232
  YasrSteps.getResults().should('have.length', 2);
213
233
 
214
- YasrSteps.getResultLink(0, 1).should('contain', SUBJECT_RESOURCE_SHORT_URI);
234
+ YasrSteps.getResultLink(0, 1).should('contain', SUBJECT_RESOURCE);
215
235
  YasrSteps.getResultLink(0, 2).should('contain', 'rdfs:subClassOf');
216
236
  YasrSteps.getResultLink(0, 3).should('contain', 'http://example.com/ontology#Metric');
217
237
  YasrSteps.getResultLink(0, 4).should('contain', CONTEXT_EXPLICIT);
218
238
 
219
239
  YasrSteps.getResultLink(1, 1).should('contain', 'http://example.com/resource/person/W6J1827/customerLoyalty');
220
240
  YasrSteps.getResultLink(1, 2).should('contain', 'rdf:type');
221
- YasrSteps.getResultLink(1, 3).should('contain', SUBJECT_RESOURCE_SHORT_URI);
241
+ YasrSteps.getResultLink(1, 3).should('contain', SUBJECT_RESOURCE);
222
242
  YasrSteps.getResultLink(1, 4).should('contain', CONTEXT_EXPLICIT);
223
243
  });
224
244
 
@@ -323,12 +343,7 @@ describe('Resource view', () => {
323
343
  });
324
344
 
325
345
  context('Triple resource', () => {
326
- it('should show triple resource', {
327
- retries: {
328
- runMode: 1,
329
- openMode: 0
330
- }
331
- }, () => {
346
+ it('should show triple resource', () => {
332
347
  // When I visit resource view with triple resource.
333
348
  ResourceSteps.visit(`triple=${TRIPLE_RESOURCE}&role=subject`);
334
349
 
@@ -369,7 +384,7 @@ describe('Resource view', () => {
369
384
  context('Download as', () => {
370
385
  it('should download as JSON-LD and then restore defaults', () => {
371
386
  // Given I am in the Resource view
372
- ResourceSteps.visit(`uri=${SUBJECT_RESOURCE}&role=subject`);
387
+ ResourceSteps.visit(`uri=${SUBJECT_RESOURCE_ENCODED}&role=subject`);
373
388
  cy.window().then((win) => {
374
389
  expect(win.jsonld).to.exist;
375
390
  cy.stub(win.jsonld, 'compact').resolves({
@@ -1,6 +1,8 @@
1
1
  import HomeSteps from "../../../steps/home-steps";
2
2
  import {MainMenuSteps} from "../../../steps/main-menu-steps";
3
3
  import {AclManagementSteps} from "../../../steps/setup/acl-management-steps";
4
+ import {RepositorySteps} from '../../../steps/repository-steps.js';
5
+ import {RepositorySelectorSteps} from '../../../steps/repository-selector-steps.js';
4
6
 
5
7
  function verifyStateWithSelectedRepository() {
6
8
  AclManagementSteps.getPageHeading().should('be.visible');
@@ -12,15 +14,18 @@ function verifyStateWithSelectedRepository() {
12
14
 
13
15
  describe('ACL Management initial state with repositories', () => {
14
16
  let repositoryId;
17
+ let fedexRepositoryId;
15
18
 
16
19
  beforeEach(() => {
17
20
  repositoryId = 'acl-management-' + Date.now();
21
+ fedexRepositoryId = 'fedex-repo-' + Date.now();
18
22
  cy.createRepository({id: repositoryId});
19
23
  cy.presetRepository(repositoryId);
20
24
  });
21
25
 
22
26
  afterEach(() => {
23
27
  cy.deleteRepository(repositoryId);
28
+ cy.deleteRepository(fedexRepositoryId);
24
29
  });
25
30
 
26
31
  it('Should display the correct initial state when navigating via URL', () => {
@@ -37,4 +42,43 @@ describe('ACL Management initial state with repositories', () => {
37
42
  // Then,
38
43
  verifyStateWithSelectedRepository();
39
44
  });
45
+
46
+ it('should prevent ACL management with FedEx repository', () => {
47
+ // Given I have created a Fedex repository
48
+ createFedexRepository(repositoryId, fedexRepositoryId);
49
+ // When I select the fedex repository
50
+ RepositorySelectorSteps.selectRepository(fedexRepositoryId);
51
+ RepositorySelectorSteps.getSelectedRepository().should('contain', fedexRepositoryId);
52
+ RepositorySteps.getActiveRepositoryRow().should('contain', fedexRepositoryId);
53
+ // And I navigate to ACL management page
54
+ MainMenuSteps.clickOnACLManagement();
55
+ // Then I should see the warning message about Fedex repository
56
+ AclManagementSteps.getFedexWarningMessage().should('be.visible');
57
+ AclManagementSteps.getAclManagementContent().should('not.exist');
58
+ // When I switch to graphdb repository
59
+ RepositorySelectorSteps.selectRepository(repositoryId);
60
+ // Then the warning message should be hidden
61
+ AclManagementSteps.getFedexWarningMessage().should('not.exist');
62
+ AclManagementSteps.getAclManagementContent().should('be.visible');
63
+ // When I select a fedex repository
64
+ RepositorySelectorSteps.selectRepository(fedexRepositoryId);
65
+ // Then the fedex warning should become visible
66
+ AclManagementSteps.getFedexWarningMessage().should('be.visible');
67
+ AclManagementSteps.getAclManagementContent().should('not.exist');
68
+ // Go to home page before end to prevent error when delete the repository happens
69
+ HomeSteps.visit();
70
+ });
40
71
  })
72
+
73
+ function createFedexRepository(repositoryId, fedexRepositoryId) {
74
+ RepositorySteps.visit();
75
+ RepositorySteps.getCreateRepositoryButton().click();
76
+ RepositorySteps.createFedexRepositoryType();
77
+ cy.url().should('include', '/repository/create/fedx');
78
+ RepositorySteps.typeRepositoryId(fedexRepositoryId);
79
+ RepositorySteps.selectFedexMember(repositoryId);
80
+ RepositorySteps.saveRepository();
81
+ RepositorySteps.getRepositoriesPage().should('be.visible');
82
+ RepositorySteps.getRepositoryFromList(fedexRepositoryId)
83
+ .should('be.visible');
84
+ }
@@ -260,6 +260,9 @@ describe('ACL Management: create rule', () => {
260
260
  // Then I expect the prefix warning to appear
261
261
  AclManagementSteps.getPrefixWarning(0).should('be.visible');
262
262
  AclManagementSteps.getPrefixWarning(0).should('contain.text', 'Custom roles should be entered without the "CUSTOM_" prefix in Workbench');
263
+ // When I blur the field, the warning should not be visible
264
+ AclManagementSteps.blurRole(0);
265
+ AclManagementSteps.getPrefixWarning(0).should('not.exist');
263
266
  // When I save the rule
264
267
  AclManagementSteps.saveRule(0);
265
268
  // Then the text should be how the user typed it
@@ -33,14 +33,10 @@ describe('Setup / Connectors - Lucene', () => {
33
33
  getCreateLuceneConnectorPage()
34
34
  .should('contain', 'Create new Lucene Connector')
35
35
  .within(() => {
36
- getConnectorNameField()
37
- .type(luceneConnectorName);
38
- getFieldNameField()
39
- .type(fieldName, {force: true});
40
- getPropertyChainField()
41
- .type(connectorPropertyChain, {force: true});
42
- getUriTypes()
43
- .type(uriType);
36
+ typeConnectorName(luceneConnectorName);
37
+ typeFieldName(fieldName);
38
+ typePropertyChain(connectorPropertyChain);
39
+ typeUriTypes(uriType);
44
40
  confirmCreateConnector();
45
41
  });
46
42
 
@@ -88,18 +84,38 @@ describe('Setup / Connectors - Lucene', () => {
88
84
  return cy.get('.connector-name-field input');
89
85
  }
90
86
 
87
+ function typeConnectorName(name) {
88
+ getConnectorNameField().type(name);
89
+ getConnectorNameField().blur();
90
+ }
91
+
91
92
  function getFieldNameField() {
92
93
  return cy.get('.child-property-fieldName input');
93
94
  }
94
95
 
96
+ function typeFieldName(name) {
97
+ getFieldNameField().type(name);
98
+ getFieldNameField().blur();
99
+ }
100
+
95
101
  function getPropertyChainField() {
96
102
  return cy.get('.child-property-propertyChain input');
97
103
  }
98
104
 
105
+ function typePropertyChain(chain) {
106
+ getPropertyChainField().type(chain);
107
+ getPropertyChainField().blur();
108
+ }
109
+
99
110
  function getUriTypes() {
100
111
  return cy.get('.property-types input');
101
112
  }
102
113
 
114
+ function typeUriTypes(types) {
115
+ getUriTypes().type(types);
116
+ getUriTypes().blur();
117
+ }
118
+
103
119
  function confirmCreateConnector() {
104
120
  cy.get('.create-connector-btn')
105
121
  .scrollIntoView()
@@ -58,7 +58,7 @@ describe('Expand results over owl:sameAs', () => {
58
58
  YasguiSteps.getYasgui().should('be.visible');
59
59
 
60
60
  // Then I expect that "sameAs" element to be enabled by default
61
- YasqeSteps.getActionButton(4).should('have.class', 'icon-same-as-on');
61
+ YasqeSteps.getActionButton(5).should('have.class', 'icon-same-as-on');
62
62
  // and the tooltip of element describes that "sameAs" element is enabled.
63
63
  YasqeSteps.getActionButtonTooltip(4).should('have.attr', 'yasgui-data-tooltip', 'Expand results over owl:sameAs: ON');
64
64
 
@@ -66,12 +66,12 @@ describe('Expand results over owl:sameAs', () => {
66
66
  YasguiSteps.openANewTab();
67
67
 
68
68
  // Then I expect that "sameAs" element to be enabled in the new tab.
69
- YasqeSteps.getActionButton(4).should('have.class', 'icon-same-as-on');
69
+ YasqeSteps.getActionButton(5).should('have.class', 'icon-same-as-on');
70
70
  // and the tooltip of element describes that "sameAs" element is enabled.
71
71
  YasqeSteps.getActionButtonTooltip(4).should('have.attr', 'yasgui-data-tooltip', 'Expand results over owl:sameAs: ON');
72
72
  });
73
73
 
74
- it('should not be enabled when infer is true and sameAs is false in user settings', {retries: {runMode: 2}},() => {
74
+ it('should not be enabled when infer is true and sameAs is false in user settings',() => {
75
75
  QueryStubs.stubInferAndSameAsDefaults(true, false);
76
76
 
77
77
  // When I visit a page with "ontotext-yasgui-web-component" in it.
@@ -79,7 +79,7 @@ describe('Expand results over owl:sameAs', () => {
79
79
  YasguiSteps.getYasgui().should('be.visible');
80
80
 
81
81
  // Then I expect that "sameAs" element to be disabled by default
82
- YasqeSteps.getActionButton(4).should('have.class', 'icon-same-as-off');
82
+ YasqeSteps.getActionButton(5).should('have.class', 'icon-same-as-off');
83
83
  // and the tooltip of element describes that "sameAs" element is disabled.
84
84
  YasqeSteps.getActionButtonTooltip(4).should('have.attr', 'yasgui-data-tooltip', 'Expand results over owl:sameAs: OFF');
85
85
 
@@ -87,7 +87,7 @@ describe('Expand results over owl:sameAs', () => {
87
87
  YasguiSteps.openANewTab();
88
88
 
89
89
  // Then I expect that "sameAs" element to be disabled in the new tab.
90
- YasqeSteps.getActionButton(4).should('have.class', 'icon-same-as-off');
90
+ YasqeSteps.getActionButton(5).should('have.class', 'icon-same-as-off');
91
91
  // and the tooltip of element describes that "sameAs" element is disabled.
92
92
  YasqeSteps.getActionButtonTooltip(4).should('have.attr', 'yasgui-data-tooltip', 'Expand results over owl:sameAs: OFF');
93
93
  });
@@ -102,13 +102,13 @@ describe('Expand results over owl:sameAs', () => {
102
102
  // Then I expect that "sameAs" element to be disabled by default
103
103
  YasqeSteps.getActionButtonTooltip(4).should('have.attr', 'yasgui-data-tooltip', 'Requires \'Include Inferred\'!');
104
104
  // and the tooltip of element describes that "infer" is required.
105
- YasqeSteps.getActionButton(4).should('have.class', 'icon-same-as-off');
105
+ YasqeSteps.getActionButton(5).should('have.class', 'icon-same-as-off');
106
106
 
107
107
  // When I open a new Tab.
108
108
  YasguiSteps.openANewTab();
109
109
 
110
110
  // Then I expect that "sameAs" element to be disabled in the new tab,
111
- YasqeSteps.getActionButton(4).should('have.class', 'icon-same-as-off');
111
+ YasqeSteps.getActionButton(5).should('have.class', 'icon-same-as-off');
112
112
  // and the tooltip of element describes that "infer" is required.
113
113
  YasqeSteps.getActionButtonTooltip(4).should('have.attr', 'yasgui-data-tooltip', 'Requires \'Include Inferred\'!');
114
114
  });
@@ -121,7 +121,7 @@ describe('Expand results over owl:sameAs', () => {
121
121
  YasguiSteps.getYasgui().should('be.visible');
122
122
 
123
123
  // Then I expect that "sameAs" element to be disabled by default,
124
- YasqeSteps.getActionButton(4).should('have.class', 'icon-same-as-off');
124
+ YasqeSteps.getActionButton(5).should('have.class', 'icon-same-as-off');
125
125
  // and the tooltip of element describes that "infer" is required.
126
126
  YasqeSteps.getActionButtonTooltip(4).should('have.attr', 'yasgui-data-tooltip', 'Requires \'Include Inferred\'!');
127
127
 
@@ -129,7 +129,7 @@ describe('Expand results over owl:sameAs', () => {
129
129
  YasguiSteps.openANewTab();
130
130
 
131
131
  // Then I expect that "sameAs" element to be disabled in the new tab,
132
- YasqeSteps.getActionButton(4).should('have.class', 'icon-same-as-off');
132
+ YasqeSteps.getActionButton(5).should('have.class', 'icon-same-as-off');
133
133
  // and the tooltip of element describes that "infer" is required.
134
134
  YasqeSteps.getActionButtonTooltip(4).should('have.attr', 'yasgui-data-tooltip', 'Requires \'Include Inferred\'!');
135
135
  });
@@ -64,7 +64,7 @@ describe('Include inferred statements', () => {
64
64
  YasguiSteps.getYasgui().should('be.visible');
65
65
 
66
66
  // Then I expect that "infer" element to be enabled by default,
67
- YasqeSteps.getActionButton(3).should('have.class', 'icon-inferred-on');
67
+ YasqeSteps.getActionButton(4).should('have.class', 'icon-inferred-on');
68
68
  // and the tooltip of element describes that "infer" functionality is enabled.
69
69
  YasqeSteps.getActionButtonTooltip(3).should('have.attr', 'yasgui-data-tooltip', 'Include inferred data in results: ON');
70
70
 
@@ -72,7 +72,7 @@ describe('Include inferred statements', () => {
72
72
  YasguiSteps.openANewTab();
73
73
 
74
74
  // Then I expect that inferred element to be enabled in the new tab,
75
- YasqeSteps.getActionButton(3).should('have.class', 'icon-inferred-on');
75
+ YasqeSteps.getActionButton(4).should('have.class', 'icon-inferred-on');
76
76
  // and the tooltip of element describes that "infer" element is enabled.
77
77
  YasqeSteps.getActionButtonTooltip(3).should('have.attr', 'yasgui-data-tooltip', 'Include inferred data in results: ON');
78
78
  });
@@ -85,7 +85,7 @@ describe('Include inferred statements', () => {
85
85
  YasguiSteps.getYasgui().should('be.visible');
86
86
 
87
87
  // Then I expect that "infer" element to be disabled by default,
88
- YasqeSteps.getActionButton(3).should('have.class', 'icon-inferred-off');
88
+ YasqeSteps.getActionButton(4).should('have.class', 'icon-inferred-off');
89
89
  // and the tooltip of element describes that "infer" element is disabled.
90
90
  YasqeSteps.getActionButtonTooltip(3).should('have.attr', 'yasgui-data-tooltip', 'Include inferred data in results: OFF');
91
91
 
@@ -93,7 +93,7 @@ describe('Include inferred statements', () => {
93
93
  YasguiSteps.openANewTab();
94
94
 
95
95
  // Then I expect that inferred element to be disabled in the new tab,
96
- YasqeSteps.getActionButton(3).should('have.class', 'icon-inferred-off');
96
+ YasqeSteps.getActionButton(4).should('have.class', 'icon-inferred-off');
97
97
  // and the tooltip of element describes that "infer" element is disabled.
98
98
  YasqeSteps.getActionButtonTooltip(3).should('have.attr', 'yasgui-data-tooltip', 'Include inferred data in results: OFF');
99
99
  });
@@ -37,13 +37,13 @@ describe('Expand results over owl:sameAs', () => {
37
37
 
38
38
  // Then I expect inferred button to be on.
39
39
  YasqeSteps.getActionButtonTooltip(3).should('have.attr', 'yasgui-data-tooltip', 'Include inferred data in results: ON');
40
- YasqeSteps.getActionButton(3).should('have.class', 'icon-inferred-on');
40
+ YasqeSteps.getActionButton(4).should('have.class', 'icon-inferred-on');
41
41
 
42
42
  // When I click on inferred button
43
- YasqeSteps.getActionButton(3).click({force: true});
43
+ YasqeSteps.getActionButton(4).click({force: true});
44
44
 
45
45
  // Then I expect inferred button to not be toggled.
46
46
  YasqeSteps.getActionButtonTooltip(3).should('have.attr', 'yasgui-data-tooltip', 'Include inferred data in results: ON');
47
- YasqeSteps.getActionButton(3).should('have.class', 'icon-inferred-on');
47
+ YasqeSteps.getActionButton(4).should('have.class', 'icon-inferred-on');
48
48
  });
49
49
  });
@@ -30,12 +30,7 @@ describe('Show saved queries', () => {
30
30
  SavedQueriesDialog.getSavedQueries().should('have.length.gt', 0);
31
31
  });
32
32
 
33
- it('Should be able to select a query from the list', {
34
- retries: {
35
- runMode: 1,
36
- openMode: 0
37
- }
38
- }, () => {
33
+ it('Should be able to select a query from the list',() => {
39
34
  // Given I have opened the saved queries popup
40
35
  YasguiSteps.showSavedQueries();
41
36
  SavedQueriesDialog.getSavedQueriesPopup().should('be.visible');