graphdb-workbench-tests 4.0.0-reactodia-blank-nodes-TR2 → 4.0.0-revert-explain-query-tests
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.
- package/e2e-flaky/import/import-server-files-operations.spec.js +9 -9
- package/e2e-flaky/import/import-user-data-batch-operations.spec.js +7 -7
- package/e2e-flaky/import/import-user-data-url.spec.js +1 -1
- package/e2e-legacy/cluster/cluster-configuration/cluster-configuration-multi-region.spec.js +20 -0
- package/e2e-legacy/guides/import-rdf-file/confirm-duplicate-rdf-file.spec.js +1 -1
- package/e2e-legacy/guides/main-menu/main-menu-guide.spec.js +6 -14
- package/e2e-legacy/guides/ttyg/configure-agent/configure-agent-guide.spec.js +26 -30
- package/e2e-legacy/guides/ttyg/edit-agent/edit-ttyg-agent-guide.spec.js +12 -20
- package/e2e-legacy/import/import-server-files-batch-operations.spec.js +5 -5
- package/e2e-legacy/import/import-server-files.spec.js +23 -23
- package/e2e-legacy/import/import-user-data-file-upload.spec.js +21 -21
- package/e2e-legacy/import/import-user-data-text-snippet.spec.js +8 -8
- package/e2e-legacy/import/import-user-data-url.spec.js +3 -3
- package/e2e-legacy/import/import-view.spec.js +2 -2
- package/e2e-legacy/repository/rename-repository-restrictions.spec.js +125 -0
- package/e2e-legacy/repository/repositories.spec.js +3 -3
- package/e2e-legacy/resource/resource.spec.js +4 -17
- package/e2e-legacy/setup/settings/my-settings-initial-state.spec.js +5 -11
- package/e2e-legacy/setup/users-and-access/user-and-access.spec.js +43 -23
- package/e2e-legacy/ttyg/create-agent.spec.js +111 -0
- package/e2e-legacy/ttyg/edit-agent.spec.js +57 -0
- package/e2e-legacy/ttyg/ttyg-initial-state-with-configured-api-key.spec.js +1 -1
- package/e2e-legacy/ttyg/ttyg-initial-state-with-selected-repository.spec.js +1 -1
- package/e2e-legacy/ttyg/ttyg-initial-state-without-repositories.spec.js +1 -1
- package/fixtures/cluster/3-nodes-cluster-group-status-no-leader.json +41 -0
- package/fixtures/repositories/get-repositories-with-unsupported-graphql-types.json +46 -0
- package/npm-shrinkwrap.json +2 -2
- package/package.json +1 -1
- package/steps/cluster/cluster-configuration-steps.js +4 -0
- package/steps/import/import-steps.js +26 -6
- package/steps/main-menu-steps.js +5 -23
- package/steps/resource/resource-steps.js +0 -8
- package/steps/setup/settings-steps.js +4 -0
- package/steps/setup/user-and-access-steps.js +44 -19
- package/steps/ttyg/ttyg-agent-settings-modal.steps.js +16 -0
- package/stubs/cluster/cluster-stubs.js +8 -1
- package/e2e-legacy/reactodia/reactodia.spec.js +0 -122
- package/steps/reactodia-steps.js +0 -42
|
@@ -46,7 +46,7 @@ describe('Import user data: File upload', () => {
|
|
|
46
46
|
ImportSettingsDialogSteps.getDialog().should('not.exist');
|
|
47
47
|
// Then I should see the uploaded file
|
|
48
48
|
ImportUserDataSteps.getResources().should('have.length', 1);
|
|
49
|
-
ImportUserDataSteps.
|
|
49
|
+
ImportUserDataSteps.checkImportedResourceByIndex(0, 'bnodes.ttl');
|
|
50
50
|
// When I try to import the same file again
|
|
51
51
|
ImportUserDataSteps.importFile(0);
|
|
52
52
|
// Then I should not see the upload only option
|
|
@@ -56,7 +56,7 @@ describe('Import user data: File upload', () => {
|
|
|
56
56
|
ImportSettingsDialogSteps.import();
|
|
57
57
|
ImportSettingsDialogSteps.getDialog().should('not.exist');
|
|
58
58
|
ImportUserDataSteps.getResources().should('have.length', 1);
|
|
59
|
-
ImportUserDataSteps.
|
|
59
|
+
ImportUserDataSteps.checkImportedResourceByIndex(0, 'bnodes.ttl');
|
|
60
60
|
});
|
|
61
61
|
|
|
62
62
|
it('Should be able to cancel the file upload', () => {
|
|
@@ -106,15 +106,15 @@ describe('Import user data: File upload', () => {
|
|
|
106
106
|
ImportSettingsDialogSteps.getDialog().should('be.visible');
|
|
107
107
|
ImportSettingsDialogSteps.import();
|
|
108
108
|
// Then I should see the uploaded file
|
|
109
|
-
ImportUserDataSteps.
|
|
109
|
+
ImportUserDataSteps.checkImportedResourceByIndex(0, 'bnodes.ttl');
|
|
110
110
|
// When I upload another file
|
|
111
111
|
const file2 = ImportUserDataSteps.createFile(testFiles[1], jsonld);
|
|
112
112
|
ImportUserDataSteps.selectFile(file2);
|
|
113
113
|
ImportSettingsDialogSteps.getDialog().should('be.visible');
|
|
114
114
|
ImportSettingsDialogSteps.import();
|
|
115
115
|
// Then I should see the uploaded file - it becomes first in the list
|
|
116
|
-
ImportUserDataSteps.
|
|
117
|
-
ImportUserDataSteps.
|
|
116
|
+
ImportUserDataSteps.checkImportedResourceByIndex(0, 'jsonld.jsonld');
|
|
117
|
+
ImportUserDataSteps.checkImportedResourceByIndex(1, 'bnodes.ttl');
|
|
118
118
|
// When I override the first file
|
|
119
119
|
const file3 = ImportUserDataSteps.createFile(testFiles[0], bnodes);
|
|
120
120
|
ImportUserDataSteps.selectFile(file3);
|
|
@@ -123,16 +123,16 @@ describe('Import user data: File upload', () => {
|
|
|
123
123
|
ImportSettingsDialogSteps.import();
|
|
124
124
|
// Then I should see the uploaded file - it becomes first in the list
|
|
125
125
|
// TODO: timestamps currently seems to not be changed on reimport
|
|
126
|
-
ImportUserDataSteps.
|
|
127
|
-
ImportUserDataSteps.
|
|
126
|
+
ImportUserDataSteps.checkImportedResourceByIndex(0, 'jsonld.jsonld');
|
|
127
|
+
ImportUserDataSteps.checkImportedResourceByIndex(1, 'bnodes.ttl');
|
|
128
128
|
// When I override the second file
|
|
129
129
|
ImportUserDataSteps.selectFile(file2);
|
|
130
130
|
FileOverwriteDialogSteps.overwrite();
|
|
131
131
|
ImportSettingsDialogSteps.getDialog().should('be.visible');
|
|
132
132
|
ImportSettingsDialogSteps.import();
|
|
133
133
|
// Then I should see the uploaded file - it becomes first in the list
|
|
134
|
-
ImportUserDataSteps.
|
|
135
|
-
ImportUserDataSteps.
|
|
134
|
+
ImportUserDataSteps.checkImportedResourceByIndex(0, 'jsonld.jsonld');
|
|
135
|
+
ImportUserDataSteps.checkImportedResourceByIndex(1, 'bnodes.ttl');
|
|
136
136
|
});
|
|
137
137
|
|
|
138
138
|
it('should be able to only upload a single file without importing it', () => {
|
|
@@ -165,8 +165,8 @@ describe('Import user data: File upload', () => {
|
|
|
165
165
|
ImportSettingsDialogSteps.import();
|
|
166
166
|
// Then I should see the uploaded file
|
|
167
167
|
ImportUserDataSteps.getResources().should('have.length', 2);
|
|
168
|
-
ImportUserDataSteps.
|
|
169
|
-
ImportUserDataSteps.
|
|
168
|
+
ImportUserDataSteps.checkImportedResourceByIndex(0, 'jsonld.jsonld');
|
|
169
|
+
ImportUserDataSteps.checkImportedResourceByIndex(1, 'bnodes.ttl');
|
|
170
170
|
// And the files should really be there
|
|
171
171
|
HeaderSteps.openHomePage();
|
|
172
172
|
ImportUserDataSteps.visit();
|
|
@@ -182,7 +182,7 @@ describe('Import user data: File upload', () => {
|
|
|
182
182
|
ImportSettingsDialogSteps.getDialog().should('be.visible');
|
|
183
183
|
ImportSettingsDialogSteps.import();
|
|
184
184
|
ImportUserDataSteps.getResources().should('have.length', 1);
|
|
185
|
-
ImportUserDataSteps.
|
|
185
|
+
ImportUserDataSteps.checkImportedResourceByIndex(0, 'bnodes.ttl');
|
|
186
186
|
// When I upload a file with the same name
|
|
187
187
|
ImportUserDataSteps.selectFile(file1);
|
|
188
188
|
// Then I should see a file override confirmation dialog
|
|
@@ -193,7 +193,7 @@ describe('Import user data: File upload', () => {
|
|
|
193
193
|
ImportSettingsDialogSteps.import();
|
|
194
194
|
// Then The file should be overridden
|
|
195
195
|
ImportUserDataSteps.getResources().should('have.length', 1);
|
|
196
|
-
ImportUserDataSteps.
|
|
196
|
+
ImportUserDataSteps.checkImportedResourceByIndex(0, 'bnodes.ttl');
|
|
197
197
|
});
|
|
198
198
|
|
|
199
199
|
it('Should be able to upload file with same name and preserve the existing file', () => {
|
|
@@ -205,7 +205,7 @@ describe('Import user data: File upload', () => {
|
|
|
205
205
|
ImportSettingsDialogSteps.getDialog().should('be.visible');
|
|
206
206
|
ImportSettingsDialogSteps.import();
|
|
207
207
|
ImportUserDataSteps.getResources().should('have.length', 1);
|
|
208
|
-
ImportUserDataSteps.
|
|
208
|
+
ImportUserDataSteps.checkImportedResourceByIndex(0, 'bnodes.ttl');
|
|
209
209
|
// When I upload a file with the same name
|
|
210
210
|
ImportUserDataSteps.selectFile(file1);
|
|
211
211
|
// Then I should see a file override confirmation dialog
|
|
@@ -215,8 +215,8 @@ describe('Import user data: File upload', () => {
|
|
|
215
215
|
ImportSettingsDialogSteps.import();
|
|
216
216
|
// Then The file should not be overridden but prefixed instead
|
|
217
217
|
ImportUserDataSteps.getResources().should('have.length', 2);
|
|
218
|
-
ImportUserDataSteps.
|
|
219
|
-
ImportUserDataSteps.
|
|
218
|
+
ImportUserDataSteps.checkImportedResourceByIndex(0, 'bnodes-0.ttl');
|
|
219
|
+
ImportUserDataSteps.checkImportedResourceByIndex(1, 'bnodes.ttl');
|
|
220
220
|
// When I upload two files, one with the same name and second new one
|
|
221
221
|
const file2 = ImportUserDataSteps.createFile(testFiles[1], jsonld);
|
|
222
222
|
ImportUserDataSteps.selectFile([file1, file2]);
|
|
@@ -225,10 +225,10 @@ describe('Import user data: File upload', () => {
|
|
|
225
225
|
ImportSettingsDialogSteps.import();
|
|
226
226
|
// Then The file should not be overridden but prefixed with increased index instead
|
|
227
227
|
ImportUserDataSteps.getResources().should('have.length', 4);
|
|
228
|
-
ImportUserDataSteps.
|
|
229
|
-
ImportUserDataSteps.
|
|
230
|
-
ImportUserDataSteps.
|
|
231
|
-
ImportUserDataSteps.
|
|
228
|
+
ImportUserDataSteps.checkImportedResourceByIndex(0, 'jsonld.jsonld');
|
|
229
|
+
ImportUserDataSteps.checkImportedResourceByIndex(1, 'bnodes-1.ttl');
|
|
230
|
+
ImportUserDataSteps.checkImportedResourceByIndex(2, 'bnodes-0.ttl');
|
|
231
|
+
ImportUserDataSteps.checkImportedResourceByIndex(3, 'bnodes.ttl');
|
|
232
232
|
});
|
|
233
233
|
|
|
234
234
|
it('should see error message when uploaded file has invalid format', () => {
|
|
@@ -242,6 +242,6 @@ describe('Import user data: File upload', () => {
|
|
|
242
242
|
ImportSettingsDialogSteps.import();
|
|
243
243
|
// Then I should see an error message
|
|
244
244
|
ImportUserDataSteps.getResources().should('have.length', 1);
|
|
245
|
-
ImportUserDataSteps.
|
|
245
|
+
ImportUserDataSteps.checkImportedResourceByIndex(0, 'invalid-format.json', 'RDF Parse Error: Invalid file format');
|
|
246
246
|
});
|
|
247
247
|
});
|
|
@@ -75,7 +75,7 @@ describe('Import user data: Text snippet', () => {
|
|
|
75
75
|
ImportUserDataSteps.fillRDFTextSnippet(RDF_TEXT_SNIPPET_1);
|
|
76
76
|
ImportUserDataSteps.clickImportTextSnippetButton();
|
|
77
77
|
ImportSettingsDialogSteps.import();
|
|
78
|
-
ImportUserDataSteps.
|
|
78
|
+
ImportUserDataSteps.checkImportedResourceByIndex(0, TEXT_SNIPPET);
|
|
79
79
|
});
|
|
80
80
|
|
|
81
81
|
it('Should import RDF text snippet with invalid RDF format selected', () => {
|
|
@@ -84,7 +84,7 @@ describe('Import user data: Text snippet', () => {
|
|
|
84
84
|
ImportUserDataSteps.selectRDFFormat(JSONLD_FORMAT);
|
|
85
85
|
ImportUserDataSteps.clickImportTextSnippetButton();
|
|
86
86
|
ImportSettingsDialogSteps.import();
|
|
87
|
-
ImportUserDataSteps.
|
|
87
|
+
ImportUserDataSteps.checkImportedResourceByIndex(0, TEXT_SNIPPET, RDF_ERROR_MESSAGE);
|
|
88
88
|
});
|
|
89
89
|
|
|
90
90
|
it('Should import RDF text snippet successfully with valid RDF format selected', () => {
|
|
@@ -93,7 +93,7 @@ describe('Import user data: Text snippet', () => {
|
|
|
93
93
|
ImportUserDataSteps.selectRDFFormat(VALID_SNIPPET_RDF_FORMAT);
|
|
94
94
|
ImportUserDataSteps.clickImportTextSnippetButton();
|
|
95
95
|
ImportSettingsDialogSteps.import();
|
|
96
|
-
ImportUserDataSteps.
|
|
96
|
+
ImportUserDataSteps.checkImportedResourceByIndex(0, TEXT_SNIPPET);
|
|
97
97
|
});
|
|
98
98
|
|
|
99
99
|
it('Should import Turtle* text snippet successfully with valid RDF star format selected', () => {
|
|
@@ -102,7 +102,7 @@ describe('Import user data: Text snippet', () => {
|
|
|
102
102
|
ImportUserDataSteps.selectRDFFormat(VALID_SNIPPET_TURTLESTAR_FORMAT);
|
|
103
103
|
ImportUserDataSteps.clickImportTextSnippetButton();
|
|
104
104
|
ImportSettingsDialogSteps.import();
|
|
105
|
-
ImportUserDataSteps.
|
|
105
|
+
ImportUserDataSteps.checkImportedResourceByIndex(0, TEXT_SNIPPET);
|
|
106
106
|
});
|
|
107
107
|
|
|
108
108
|
it('Should import TriG* text snippet successfully with valid RDF star format selected', () => {
|
|
@@ -111,7 +111,7 @@ describe('Import user data: Text snippet', () => {
|
|
|
111
111
|
ImportUserDataSteps.selectRDFFormat(VALID_SNIPPET_TRIGSTAR_FORMAT);
|
|
112
112
|
ImportUserDataSteps.clickImportTextSnippetButton();
|
|
113
113
|
ImportSettingsDialogSteps.import();
|
|
114
|
-
ImportUserDataSteps.
|
|
114
|
+
ImportUserDataSteps.checkImportedResourceByIndex(0, TEXT_SNIPPET);
|
|
115
115
|
});
|
|
116
116
|
|
|
117
117
|
it('Should import RDF text snippet successfully with filled base URI and context', () => {
|
|
@@ -123,7 +123,7 @@ describe('Import user data: Text snippet', () => {
|
|
|
123
123
|
ImportSettingsDialogSteps.selectNamedGraph();
|
|
124
124
|
ImportSettingsDialogSteps.fillNamedGraph(CONTEXT);
|
|
125
125
|
ImportSettingsDialogSteps.import();
|
|
126
|
-
ImportUserDataSteps.
|
|
126
|
+
ImportUserDataSteps.checkImportedResourceByIndex(0, TEXT_SNIPPET);
|
|
127
127
|
|
|
128
128
|
// Go to Graphs overview
|
|
129
129
|
cy.visit('/graphs');
|
|
@@ -211,7 +211,7 @@ describe('Import user data: Text snippet', () => {
|
|
|
211
211
|
ImportSettingsDialogSteps.selectNamedGraph();
|
|
212
212
|
ImportSettingsDialogSteps.fillNamedGraph(CONTEXT);
|
|
213
213
|
ImportSettingsDialogSteps.import();
|
|
214
|
-
ImportUserDataSteps.
|
|
214
|
+
ImportUserDataSteps.checkImportedResourceByIndex(0, TEXT_SNIPPET);
|
|
215
215
|
|
|
216
216
|
// Go to Graphs overview
|
|
217
217
|
cy.visit('/graphs');
|
|
@@ -235,7 +235,7 @@ describe('Import user data: Text snippet', () => {
|
|
|
235
235
|
ImportSettingsDialogSteps.fillContextLink('https://w3c.github.io/json-ld-api/tests/compact/0007-context.jsonld');
|
|
236
236
|
// ImportUserDataSteps.importFromSettingsDialog();
|
|
237
237
|
ImportSettingsDialogSteps.import();
|
|
238
|
-
ImportUserDataSteps.
|
|
238
|
+
ImportUserDataSteps.checkImportedResourceByIndex(0, TEXT_SNIPPET);
|
|
239
239
|
const graphName = CONTEXT.slice(0, CONTEXT.lastIndexOf('.'));
|
|
240
240
|
// Verify that created graph can be found
|
|
241
241
|
ImportUserDataSteps.verifyGraphData(graphName, "rdf:Property", "rdf:Property", "rdf:Property", "http://example.org/graph", false);
|
|
@@ -59,7 +59,7 @@ describe('Import user data: URL import', () => {
|
|
|
59
59
|
ImportUserDataSteps.clickImportUrlButton();
|
|
60
60
|
// Without changing settings
|
|
61
61
|
ImportSettingsDialogSteps.import();
|
|
62
|
-
ImportUserDataSteps.
|
|
62
|
+
ImportUserDataSteps.checkImportedResourceByIndex(0, IMPORT_URL);
|
|
63
63
|
});
|
|
64
64
|
|
|
65
65
|
it('Test import file via URL with invalid RDF format selected', () => {
|
|
@@ -67,7 +67,7 @@ describe('Import user data: URL import', () => {
|
|
|
67
67
|
ImportUserDataSteps.selectRDFFormat(JSONLD_FORMAT);
|
|
68
68
|
ImportUserDataSteps.clickImportUrlButton();
|
|
69
69
|
ImportSettingsDialogSteps.import();
|
|
70
|
-
ImportUserDataSteps.
|
|
70
|
+
ImportUserDataSteps.checkImportedResourceByIndex(0, IMPORT_URL, RDF_ERROR_MESSAGE);
|
|
71
71
|
});
|
|
72
72
|
|
|
73
73
|
it('Test import file via URL successfully with valid RDF format selected', () => {
|
|
@@ -75,6 +75,6 @@ describe('Import user data: URL import', () => {
|
|
|
75
75
|
ImportUserDataSteps.selectRDFFormat(VALID_URL_RDF_FORMAT);
|
|
76
76
|
ImportUserDataSteps.clickImportUrlButton();
|
|
77
77
|
ImportSettingsDialogSteps.import();
|
|
78
|
-
ImportUserDataSteps.
|
|
78
|
+
ImportUserDataSteps.checkImportedResourceByIndex(0, IMPORT_URL);
|
|
79
79
|
});
|
|
80
80
|
});
|
|
@@ -46,7 +46,7 @@ describe('Import view', () => {
|
|
|
46
46
|
// Then I should see the uploaded file
|
|
47
47
|
ImportUserDataSteps.getResources().should('have.length', 1);
|
|
48
48
|
ImportUserDataSteps.getResourceByName('bnodes.ttl').should('be.visible');
|
|
49
|
-
ImportUserDataSteps.
|
|
49
|
+
ImportUserDataSteps.checkImportedResourceByIndex(0, 'bnodes.ttl');
|
|
50
50
|
});
|
|
51
51
|
|
|
52
52
|
it('Should display/hide help message depends on resource result', () => {
|
|
@@ -108,7 +108,7 @@ describe('Import view', () => {
|
|
|
108
108
|
ImportSettingsDialogSteps.getDialog().should('be.visible');
|
|
109
109
|
ImportSettingsDialogSteps.import();
|
|
110
110
|
ImportUserDataSteps.getResources().should('have.length', 1);
|
|
111
|
-
ImportUserDataSteps.
|
|
111
|
+
ImportUserDataSteps.checkImportedResourceByIndex(0, 'bnodes.ttl');
|
|
112
112
|
|
|
113
113
|
// Then I expect the help message not exist, because user because there are resource displayed
|
|
114
114
|
ImportUserDataSteps.getHelpMessage().should('not.exist');
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
import {RepositorySteps} from "../../steps/repository-steps";
|
|
2
|
+
import {OntopRepositorySteps} from "../../steps/ontop-repository-steps";
|
|
3
|
+
import {ToasterSteps} from "../../steps/toaster-steps";
|
|
4
|
+
import {ModalDialogSteps} from "../../steps/modal-dialog-steps";
|
|
5
|
+
|
|
6
|
+
describe('Repository rename restrictions', () => {
|
|
7
|
+
|
|
8
|
+
let repositoryId;
|
|
9
|
+
let memberRepositoryId;
|
|
10
|
+
|
|
11
|
+
beforeEach(() => {
|
|
12
|
+
repositoryId = 'repo-' + Date.now();
|
|
13
|
+
memberRepositoryId = 'member-' + Date.now();
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
afterEach(() => {
|
|
17
|
+
cy.deleteRepository(repositoryId);
|
|
18
|
+
cy.deleteRepository(memberRepositoryId);
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
it('should allow renaming of a GraphDB repository', () => {
|
|
22
|
+
// Given there is a GraphDB repository.
|
|
23
|
+
cy.createRepository({id: repositoryId});
|
|
24
|
+
|
|
25
|
+
// When I open its edit page.
|
|
26
|
+
RepositorySteps.visitEditPage(repositoryId);
|
|
27
|
+
|
|
28
|
+
// Then the repository id should be rendered as read only,
|
|
29
|
+
RepositorySteps.getGDBIdInput()
|
|
30
|
+
.should('have.value', repositoryId)
|
|
31
|
+
.and('be.disabled');
|
|
32
|
+
// and the action which unlocks the repository id field should be available.
|
|
33
|
+
RepositorySteps.getRepositoryIdEditElement().should('be.visible');
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
it('should not allow renaming of an Ontop repository', () => {
|
|
37
|
+
// Given there is an Ontop repository.
|
|
38
|
+
createOntopRepository(repositoryId);
|
|
39
|
+
|
|
40
|
+
// When I open its edit page.
|
|
41
|
+
RepositorySteps.visit();
|
|
42
|
+
RepositorySteps.editRepository(repositoryId);
|
|
43
|
+
|
|
44
|
+
// Then the repository id should be rendered as read only,
|
|
45
|
+
RepositorySteps.getGDBIdInput()
|
|
46
|
+
.should('have.value', repositoryId)
|
|
47
|
+
.and('be.disabled');
|
|
48
|
+
// and the action which unlocks the repository id field should not be available, because
|
|
49
|
+
// renaming is allowed only for GraphDB repositories.
|
|
50
|
+
RepositorySteps.getRepositoryIdEditElement().should('not.exist');
|
|
51
|
+
|
|
52
|
+
// When the repository id is changed despite the field being disabled,
|
|
53
|
+
forceChangeRepositoryId('renamed-' + repositoryId);
|
|
54
|
+
// and I try to save the configuration.
|
|
55
|
+
RepositorySteps.clickSaveEditedRepo();
|
|
56
|
+
|
|
57
|
+
// Then I expect to see an error message,
|
|
58
|
+
ToasterSteps.verifyError('Can not change the name of ontop repository');
|
|
59
|
+
// and the repository should keep its original id.
|
|
60
|
+
RepositorySteps.visit();
|
|
61
|
+
RepositorySteps.getRepositoryFromList(repositoryId).should('be.visible');
|
|
62
|
+
});
|
|
63
|
+
|
|
64
|
+
it('should not allow renaming of a FedX repository', () => {
|
|
65
|
+
// Given there is a FedX repository.
|
|
66
|
+
cy.createRepository({id: memberRepositoryId});
|
|
67
|
+
createFedxRepository(repositoryId, memberRepositoryId);
|
|
68
|
+
|
|
69
|
+
// When I open its edit page.
|
|
70
|
+
RepositorySteps.visit();
|
|
71
|
+
RepositorySteps.editRepository(repositoryId);
|
|
72
|
+
|
|
73
|
+
// Then the repository id should be rendered as read only,
|
|
74
|
+
RepositorySteps.getGDBIdInput()
|
|
75
|
+
.should('have.value', repositoryId)
|
|
76
|
+
.and('be.disabled');
|
|
77
|
+
// and the action which unlocks the repository id field should not be available, because
|
|
78
|
+
// renaming is allowed only for GraphDB repositories.
|
|
79
|
+
RepositorySteps.getRepositoryIdEditElement().should('not.exist');
|
|
80
|
+
|
|
81
|
+
// When I save the configuration.
|
|
82
|
+
RepositorySteps.getSaveRepositoryButton().click();
|
|
83
|
+
ModalDialogSteps.clickOnConfirmButton();
|
|
84
|
+
|
|
85
|
+
// Then the repository should keep its original id.
|
|
86
|
+
RepositorySteps.visit();
|
|
87
|
+
RepositorySteps.getRepositoryFromList(repositoryId).should('be.visible');
|
|
88
|
+
});
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* Changes the repository id field although it is disabled in order to verify that the restriction is
|
|
92
|
+
* enforced by the controller too and not only by the view.
|
|
93
|
+
*
|
|
94
|
+
* @param {string} newRepositoryId The new repository id.
|
|
95
|
+
*/
|
|
96
|
+
const forceChangeRepositoryId = (newRepositoryId) => {
|
|
97
|
+
RepositorySteps.getGDBIdInput()
|
|
98
|
+
.clear({force: true})
|
|
99
|
+
.type(newRepositoryId, {force: true})
|
|
100
|
+
.should('have.value', newRepositoryId);
|
|
101
|
+
};
|
|
102
|
+
|
|
103
|
+
const createOntopRepository = (repositoryId) => {
|
|
104
|
+
OntopRepositorySteps.visitCreate();
|
|
105
|
+
RepositorySteps.typeRepositoryId(repositoryId);
|
|
106
|
+
OntopRepositorySteps.selectOracleDatabase();
|
|
107
|
+
OntopRepositorySteps.typeHostName('localhost');
|
|
108
|
+
OntopRepositorySteps.typePort(5423);
|
|
109
|
+
OntopRepositorySteps.typeDatabaseName('database-name');
|
|
110
|
+
OntopRepositorySteps.clickObdaFileUploadButton();
|
|
111
|
+
OntopRepositorySteps.uploadObdaFile('fixtures/ontop/university-complete.obda');
|
|
112
|
+
// Wait the OBDA edit button to become visible to ensure that the file is uploaded.
|
|
113
|
+
OntopRepositorySteps.getOBDAFileFieldEditButton().should('be.visible');
|
|
114
|
+
OntopRepositorySteps.clickOnCreateRepositoryButton();
|
|
115
|
+
};
|
|
116
|
+
|
|
117
|
+
const createFedxRepository = (repositoryId, memberRepositoryId) => {
|
|
118
|
+
RepositorySteps.visit();
|
|
119
|
+
RepositorySteps.createRepository();
|
|
120
|
+
RepositorySteps.createFedexRepositoryType();
|
|
121
|
+
RepositorySteps.typeRepositoryId(repositoryId);
|
|
122
|
+
RepositorySteps.selectFedexMember(memberRepositoryId);
|
|
123
|
+
RepositorySteps.saveRepository();
|
|
124
|
+
};
|
|
125
|
+
});
|
|
@@ -452,7 +452,7 @@ describe('Repositories', () => {
|
|
|
452
452
|
.selectRDFFormat("TriG")
|
|
453
453
|
.clickImportTextSnippetButton();
|
|
454
454
|
ImportSettingsDialogSteps.import();
|
|
455
|
-
ImportUserDataSteps.
|
|
455
|
+
ImportUserDataSteps.checkImportedResourceByIndex(0, 'Text snippet');
|
|
456
456
|
// Import data that conforms with the shape - import is successfully
|
|
457
457
|
// The newly imported file is first in the list
|
|
458
458
|
ImportUserDataSteps
|
|
@@ -461,7 +461,7 @@ describe('Repositories', () => {
|
|
|
461
461
|
.selectRDFFormat("Turtle")
|
|
462
462
|
.clickImportTextSnippetButton();
|
|
463
463
|
ImportSettingsDialogSteps.import();
|
|
464
|
-
ImportUserDataSteps.
|
|
464
|
+
ImportUserDataSteps.checkImportedResourceByIndex(0, 'Text snippet');
|
|
465
465
|
// Import data that does not conform with the shape - GraphDBShaclSailValidationException
|
|
466
466
|
// The newly imported file is first in the list
|
|
467
467
|
ImportUserDataSteps
|
|
@@ -470,7 +470,7 @@ describe('Repositories', () => {
|
|
|
470
470
|
.selectRDFFormat("Turtle")
|
|
471
471
|
.clickImportTextSnippetButton();
|
|
472
472
|
ImportSettingsDialogSteps.import();
|
|
473
|
-
ImportUserDataSteps.
|
|
473
|
+
ImportUserDataSteps.checkImportedResourceByIndex(0, 'Text snippet', 'org.eclipse.rdf4j.sail.shacl.GraphDBShaclSailValidationException: Failed SHACL validation');
|
|
474
474
|
});
|
|
475
475
|
|
|
476
476
|
it('should allow editing of repository name if repository is in cluster', () => {
|
|
@@ -9,7 +9,6 @@ import {YasguiSteps} from "../../steps/yasgui/yasgui-steps";
|
|
|
9
9
|
import {JsonLdModalSteps} from "../../steps/json-ld-modal-steps";
|
|
10
10
|
import {GraphConfigStubs} from '../../stubs/graph-config-stubs.js';
|
|
11
11
|
import {VisualGraphSplitButtonSteps} from '../../steps/visual-graph-split-button-steps.js';
|
|
12
|
-
import {ReactodiaSteps} from '../../steps/reactodia-steps.js';
|
|
13
12
|
|
|
14
13
|
const FILE_TO_IMPORT = 'resource-test-data.ttl';
|
|
15
14
|
const SUBJECT_RESOURCE_ENCODED = 'http:%2F%2Fexample.com%2Fontology%23CustomerLoyalty';
|
|
@@ -76,18 +75,6 @@ describe('Resource view', () => {
|
|
|
76
75
|
VisualGraphSteps.verifyUrl();
|
|
77
76
|
});
|
|
78
77
|
|
|
79
|
-
it('should open reactodia view when click on the "Visualize Reactodia" button', () => {
|
|
80
|
-
// When I am on resource view and page loaded a resource.
|
|
81
|
-
ResourceSteps.visit(`uri=${SUBJECT_RESOURCE_ENCODED}`);
|
|
82
|
-
|
|
83
|
-
// When I click on "Visualize Reactodia" button.
|
|
84
|
-
ResourceSteps.clickOnVisualizeReactodiaButton();
|
|
85
|
-
|
|
86
|
-
// Then I expect to be redirected to the reactodia view with the resource as the start uri.
|
|
87
|
-
ReactodiaSteps.verifyUrl();
|
|
88
|
-
ReactodiaSteps.verifyStartResourceUri(SUBJECT_RESOURCE);
|
|
89
|
-
});
|
|
90
|
-
|
|
91
78
|
it('should open graphs-visualizations view when select a graph configuration', () => {
|
|
92
79
|
// When I am on resource view and page loaded a resource.
|
|
93
80
|
ResourceSteps.visit(`uri=${SUBJECT_RESOURCE_ENCODED}&role=subject`);
|
|
@@ -133,7 +120,7 @@ describe('Resource view', () => {
|
|
|
133
120
|
YasrSteps.getResults().should('have.length', 24);
|
|
134
121
|
});
|
|
135
122
|
|
|
136
|
-
|
|
123
|
+
context('Same as', () => {
|
|
137
124
|
|
|
138
125
|
it('should display sameAs button when is enabled by user settings', () => {
|
|
139
126
|
// When I am on resource view and page loaded a resource that has triplets in explicit and implicit context,
|
|
@@ -203,7 +190,7 @@ describe('Resource view', () => {
|
|
|
203
190
|
});
|
|
204
191
|
});
|
|
205
192
|
|
|
206
|
-
|
|
193
|
+
context('Role tabs', () => {
|
|
207
194
|
|
|
208
195
|
it('should list the triples of a resource used as subject', () => {
|
|
209
196
|
// When I am on resource view,
|
|
@@ -355,7 +342,7 @@ describe('Resource view', () => {
|
|
|
355
342
|
});
|
|
356
343
|
});
|
|
357
344
|
|
|
358
|
-
|
|
345
|
+
context('Triple resource', () => {
|
|
359
346
|
it('should show triple resource', () => {
|
|
360
347
|
// When I visit resource view with triple resource.
|
|
361
348
|
ResourceSteps.visit(`triple=${TRIPLE_RESOURCE}&role=subject`);
|
|
@@ -394,7 +381,7 @@ describe('Resource view', () => {
|
|
|
394
381
|
});
|
|
395
382
|
});
|
|
396
383
|
|
|
397
|
-
|
|
384
|
+
context('Download as', () => {
|
|
398
385
|
it('should download as JSON-LD and then restore defaults', () => {
|
|
399
386
|
// Given I am in the Resource view
|
|
400
387
|
ResourceSteps.visit(`uri=${SUBJECT_RESOURCE_ENCODED}&role=subject`);
|
|
@@ -2,7 +2,7 @@ import {MainMenuSteps} from "../../../steps/main-menu-steps";
|
|
|
2
2
|
import HomeSteps from "../../../steps/home-steps";
|
|
3
3
|
import {SettingsSteps} from "../../../steps/setup/settings-steps";
|
|
4
4
|
|
|
5
|
-
function verifyInitialState(
|
|
5
|
+
function verifyInitialState() {
|
|
6
6
|
// Password change field is for admin.
|
|
7
7
|
// explicitly state that the fields must be of type password
|
|
8
8
|
SettingsSteps.getPasswordField().should('be.visible')
|
|
@@ -43,14 +43,8 @@ function verifyInitialState(repositoryId) {
|
|
|
43
43
|
// Repository rights
|
|
44
44
|
// - Admin has read and write access to all repositories."
|
|
45
45
|
SettingsSteps.getUserRepositoryTable().should('be.visible');
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
.and('be.checked')
|
|
49
|
-
.and('be.disabled');
|
|
50
|
-
SettingsSteps.getWriteRightsCheckbox(repositoryId)
|
|
51
|
-
.should('be.visible')
|
|
52
|
-
.and('be.checked')
|
|
53
|
-
.and('be.disabled');
|
|
46
|
+
// And Admin doesn't see the list of the repositories
|
|
47
|
+
SettingsSteps.getRepositoryRightsRows().should('not.exist');
|
|
54
48
|
}
|
|
55
49
|
|
|
56
50
|
describe('My Settings initial state', () => {
|
|
@@ -69,7 +63,7 @@ describe('My Settings initial state', () => {
|
|
|
69
63
|
// Given, I visit the My Settings page via URL
|
|
70
64
|
SettingsSteps.visit();
|
|
71
65
|
// Then,
|
|
72
|
-
verifyInitialState(
|
|
66
|
+
verifyInitialState();
|
|
73
67
|
});
|
|
74
68
|
|
|
75
69
|
it('Should display the correct initial state when navigating via the navigation bar', () => {
|
|
@@ -77,6 +71,6 @@ describe('My Settings initial state', () => {
|
|
|
77
71
|
HomeSteps.visit();
|
|
78
72
|
MainMenuSteps.clickOnMySettings();
|
|
79
73
|
// Then,
|
|
80
|
-
verifyInitialState(
|
|
74
|
+
verifyInitialState();
|
|
81
75
|
});
|
|
82
76
|
});
|