graphdb-workbench-tests 4.0.0-TR3 → 4.0.0-TR5
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/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 -22
- 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 +5 -1
- package/e2e-legacy/repository/repositories.spec.js +3 -3
- package/e2e-legacy/ttyg/edit-agent.spec.js +8 -0
- package/fixtures/cluster/3-nodes-cluster-group-status-no-leader.json +41 -0
- package/npm-shrinkwrap.json +138 -497
- package/package.json +1 -1
- package/steps/cluster/cluster-configuration-steps.js +4 -0
- package/steps/import/import-steps.js +26 -6
- package/stubs/cluster/cluster-stubs.js +8 -1
- package/stubs/repositories/repositories-stubs.js +4 -0
|
@@ -31,7 +31,7 @@ describe('Import server files - Operations', () => {
|
|
|
31
31
|
ImportServerFilesSteps.importResourceByName(FILE_FOR_IMPORT);
|
|
32
32
|
ImportSettingsDialogSteps.import();
|
|
33
33
|
// Then I should see the file imported successfully
|
|
34
|
-
ImportServerFilesSteps.
|
|
34
|
+
ImportServerFilesSteps.checkImportedResourceByIndex(0, FILE_FOR_IMPORT);
|
|
35
35
|
// TODO: this and all similar check in the tests below are a checking for the default import settings which we probably should not verify here.
|
|
36
36
|
// ImportServerFilesSteps.verifyImportStatusDetails(FILE_FOR_IMPORT, '"preserveBNodeIds": false,');
|
|
37
37
|
});
|
|
@@ -42,7 +42,7 @@ describe('Import server files - Operations', () => {
|
|
|
42
42
|
ImportServerFilesSteps.importResourceByName(FILE_FROM_DIRECTORY_FOR_IMPORT);
|
|
43
43
|
ImportSettingsDialogSteps.import();
|
|
44
44
|
// Then I should see the file imported successfully
|
|
45
|
-
ImportServerFilesSteps.
|
|
45
|
+
ImportServerFilesSteps.checkImportedResourceByIndex(0, FILE_FROM_DIRECTORY_FOR_IMPORT);
|
|
46
46
|
});
|
|
47
47
|
|
|
48
48
|
it('Should import Server files successfully with changing settings', () => {
|
|
@@ -57,7 +57,7 @@ describe('Import server files - Operations', () => {
|
|
|
57
57
|
ImportSettingsDialogSteps.enablePreserveBNodes();
|
|
58
58
|
ImportSettingsDialogSteps.import();
|
|
59
59
|
// Then I should see the file imported successfully
|
|
60
|
-
ImportServerFilesSteps.
|
|
60
|
+
ImportServerFilesSteps.checkImportedResourceByIndex(0, FILE_FOR_IMPORT);
|
|
61
61
|
// ImportSteps.verifyImportStatusDetails(FILE_FOR_IMPORT, [CONTEXT, BASE_URI, '"preserveBNodeIds": true,']);
|
|
62
62
|
});
|
|
63
63
|
|
|
@@ -75,7 +75,7 @@ describe('Import server files - Operations', () => {
|
|
|
75
75
|
ImportSettingsDialogSteps.enablePreserveBNodes();
|
|
76
76
|
ImportSettingsDialogSteps.import();
|
|
77
77
|
// Then I should see the file imported successfully
|
|
78
|
-
ImportServerFilesSteps.
|
|
78
|
+
ImportServerFilesSteps.checkImportedResourceByIndex(0, JSONLD_FILE_FOR_IMPORT);
|
|
79
79
|
// ImportSteps.verifyImportStatusDetails(JSONLD_FILE_FOR_IMPORT, [CONTEXT, BASE_URI, '"preserveBNodeIds": true,', JSONLD_CONTEXT]);
|
|
80
80
|
});
|
|
81
81
|
|
|
@@ -92,7 +92,7 @@ describe('Import server files - Operations', () => {
|
|
|
92
92
|
ImportSettingsDialogSteps.enablePreserveBNodes();
|
|
93
93
|
ImportSettingsDialogSteps.import();
|
|
94
94
|
// Then I should see the file imported successfully
|
|
95
|
-
ImportServerFilesSteps.
|
|
95
|
+
ImportServerFilesSteps.checkImportedResourceByIndex(0, JSONLD_FILE_FOR_IMPORT);
|
|
96
96
|
// ImportSteps.verifyImportStatusDetails(JSONLD_FILE_FOR_IMPORT, [CONTEXT, BASE_URI, '"preserveBNodeIds": true,']);
|
|
97
97
|
});
|
|
98
98
|
|
|
@@ -101,7 +101,7 @@ describe('Import server files - Operations', () => {
|
|
|
101
101
|
// And I have imported a file
|
|
102
102
|
ImportServerFilesSteps.importResourceByName(FILE_FOR_IMPORT);
|
|
103
103
|
ImportSettingsDialogSteps.import();
|
|
104
|
-
ImportServerFilesSteps.
|
|
104
|
+
ImportServerFilesSteps.checkImportedResourceByIndex(0, FILE_FOR_IMPORT);
|
|
105
105
|
// When I reset the status of the imported file
|
|
106
106
|
ImportServerFilesSteps.resetResourceStatusByName(FILE_FOR_IMPORT);
|
|
107
107
|
// Then Import status of the file should not be visible
|
|
@@ -113,7 +113,7 @@ describe('Import server files - Operations', () => {
|
|
|
113
113
|
// And I have imported a file
|
|
114
114
|
ImportServerFilesSteps.importResourceByName(FILE_FROM_DIRECTORY_FOR_IMPORT);
|
|
115
115
|
ImportSettingsDialogSteps.import();
|
|
116
|
-
ImportServerFilesSteps.
|
|
116
|
+
ImportServerFilesSteps.checkImportedResourceByIndex(0, FILE_FROM_DIRECTORY_FOR_IMPORT);
|
|
117
117
|
// When I reset the status of the imported file
|
|
118
118
|
ImportServerFilesSteps.resetResourceStatusByName(FILE_FROM_DIRECTORY_FOR_IMPORT);
|
|
119
119
|
// Then Import status of the file should not be visible
|
|
@@ -126,7 +126,7 @@ describe('Import server files - Operations', () => {
|
|
|
126
126
|
// When I select to import a ttl file without changing settings
|
|
127
127
|
ImportSettingsDialogSteps.import();
|
|
128
128
|
// Then I should see the file imported successfully
|
|
129
|
-
ImportServerFilesSteps.
|
|
129
|
+
ImportServerFilesSteps.checkImportedResourceByIndex(0, TTLS_FOR_IMPORT);
|
|
130
130
|
// ImportSteps.verifyImportStatusDetails(TTLS_FOR_IMPORT, '"preserveBNodeIds": false,');
|
|
131
131
|
});
|
|
132
132
|
|
|
@@ -136,7 +136,7 @@ describe('Import server files - Operations', () => {
|
|
|
136
136
|
// When I select to import a trigstar file without changing settings
|
|
137
137
|
ImportSettingsDialogSteps.import();
|
|
138
138
|
// Then I should see the file imported successfully
|
|
139
|
-
ImportServerFilesSteps.
|
|
139
|
+
ImportServerFilesSteps.checkImportedResourceByIndex(0, TRIGS_FOR_IMPORT);
|
|
140
140
|
// ImportSteps.verifyImportStatusDetails(TRIGS_FOR_IMPORT, '"preserveBNodeIds": false,');
|
|
141
141
|
});
|
|
142
142
|
});
|
|
@@ -56,7 +56,7 @@ describe('Import user data: Batch operations', () => {
|
|
|
56
56
|
ImportSettingsDialogSteps.getDialog().should('be.visible');
|
|
57
57
|
ImportSettingsDialogSteps.import();
|
|
58
58
|
ImportUserDataSteps.getResources().should('have.length', 3);
|
|
59
|
-
ImportUserDataSteps.
|
|
59
|
+
ImportUserDataSteps.checkImportedResourceByIndex(0, 'jsonld-2.jsonld');
|
|
60
60
|
// When I select Imported from the menu
|
|
61
61
|
ImportUserDataSteps.selectImportedResources();
|
|
62
62
|
// Then I should see only imported files selected
|
|
@@ -83,7 +83,7 @@ describe('Import user data: Batch operations', () => {
|
|
|
83
83
|
ImportUserDataSteps.batchImport();
|
|
84
84
|
ImportSettingsDialogSteps.import();
|
|
85
85
|
// Then the file should be imported
|
|
86
|
-
ImportUserDataSteps.
|
|
86
|
+
ImportUserDataSteps.checkImportedResourceByIndex(0, 'jsonld-2.jsonld');
|
|
87
87
|
ImportUserDataSteps.selectImportedResources();
|
|
88
88
|
ImportUserDataSteps.getSelectedResources().should('have.length', 1);
|
|
89
89
|
ImportUserDataSteps.deselectAllResources();
|
|
@@ -94,8 +94,8 @@ describe('Import user data: Batch operations', () => {
|
|
|
94
94
|
ImportUserDataSteps.batchImport();
|
|
95
95
|
ImportSettingsDialogSteps.import();
|
|
96
96
|
// Then the files should be imported
|
|
97
|
-
ImportUserDataSteps.
|
|
98
|
-
ImportUserDataSteps.
|
|
97
|
+
ImportUserDataSteps.checkImportedResourceByIndex(1, 'jsonld.jsonld');
|
|
98
|
+
ImportUserDataSteps.checkImportedResourceByIndex(2, 'bnodes.ttl');
|
|
99
99
|
ImportUserDataSteps.selectImportedResources();
|
|
100
100
|
ImportUserDataSteps.getSelectedResources().should('have.length', 3);
|
|
101
101
|
});
|
|
@@ -162,9 +162,9 @@ function uploadWithImportFiles(files) {
|
|
|
162
162
|
ImportUserDataSteps.selectFile([file1, file2, file3]);
|
|
163
163
|
ImportSettingsDialogSteps.import();
|
|
164
164
|
ImportUserDataSteps.getResources().should('have.length', 3);
|
|
165
|
-
ImportUserDataSteps.
|
|
166
|
-
ImportUserDataSteps.
|
|
167
|
-
ImportUserDataSteps.
|
|
165
|
+
ImportUserDataSteps.checkImportedResourceByIndex(0, 'jsonld-2.jsonld');
|
|
166
|
+
ImportUserDataSteps.checkImportedResourceByIndex(1, 'jsonld.jsonld');
|
|
167
|
+
ImportUserDataSteps.checkImportedResourceByIndex(2, 'bnodes.ttl');
|
|
168
168
|
}
|
|
169
169
|
|
|
170
170
|
function uploadFiles(data) {
|
|
@@ -58,6 +58,6 @@ describe('Import user data: URL import', () => {
|
|
|
58
58
|
return xhr.response.body[0]?.status === 'ERROR'
|
|
59
59
|
}), {timeout: 10000, interval: 1000}
|
|
60
60
|
)
|
|
61
|
-
ImportUserDataSteps.
|
|
61
|
+
ImportUserDataSteps.checkImportedResourceByIndex(0, IMPORT_JSONLD_URL, 'https://example.com/0007-context.jsonld');
|
|
62
62
|
});
|
|
63
63
|
});
|
|
@@ -64,6 +64,26 @@ describe('Cluster configuration', () => {
|
|
|
64
64
|
});
|
|
65
65
|
});
|
|
66
66
|
|
|
67
|
+
it('should show an alert when there is no elected leader in the cluster', () => {
|
|
68
|
+
// Given there is no elected leader in the cluster
|
|
69
|
+
ClusterStubs.stubClusterGroupStatusWithoutLeader();
|
|
70
|
+
|
|
71
|
+
// When I have opened the cluster management page
|
|
72
|
+
ClusterPageSteps.visit();
|
|
73
|
+
// And I click on edit properties and open Multi-region tab
|
|
74
|
+
ClusterPageSteps.previewClusterConfig();
|
|
75
|
+
ClusterConfigurationSteps.selectMultiRegionConfigTab();
|
|
76
|
+
|
|
77
|
+
// Then I expect to see an alert that the leader is not elected
|
|
78
|
+
ClusterConfigurationSteps.getNoLeaderAlert().should('be.visible')
|
|
79
|
+
.and('contain.text', 'Leader is not elected');
|
|
80
|
+
// And no primary or secondary cluster configuration should be rendered
|
|
81
|
+
ClusterConfigurationSteps.getMultiRegionHeader().should('not.exist');
|
|
82
|
+
ClusterConfigurationSteps.getAddTagButton().should('not.exist');
|
|
83
|
+
ClusterConfigurationSteps.getEnableSecondaryModeButton().should('not.exist');
|
|
84
|
+
ClusterConfigurationSteps.getTagsTable().should('not.exist');
|
|
85
|
+
});
|
|
86
|
+
|
|
67
87
|
it('should be able to switch modes', () => {
|
|
68
88
|
ClusterStubs.stubEnableSecondaryMode();
|
|
69
89
|
const rpcAddress = 'node-name:7300';
|
|
@@ -33,7 +33,7 @@ describe('Confirm duplicate RDF file', () => {
|
|
|
33
33
|
GuideDialogSteps.assertDialogWithTitleIsVisible('Import file');
|
|
34
34
|
GuideDialogSteps.assertDialogWithContentIsVisible('Click on the Import button.');
|
|
35
35
|
ImportSettingsDialogSteps.import();
|
|
36
|
-
ImportUserDataSteps.
|
|
36
|
+
ImportUserDataSteps.checkImportedResourceByIndex(0, GUIDE_RESOURCE_FILE);
|
|
37
37
|
|
|
38
38
|
// WHEN: I run a guide that includes the Import RDF File step.
|
|
39
39
|
GuideDialogSteps.assertDialogWithTitleIsVisible('Import file — 1/6');
|
|
@@ -57,7 +57,7 @@ describe('Import server files - Batch operations', () => {
|
|
|
57
57
|
// precondition for the next step
|
|
58
58
|
ImportServerFilesSteps.importResourceByName(FILE_FOR_IMPORT);
|
|
59
59
|
ImportSettingsDialogSteps.import();
|
|
60
|
-
ImportServerFilesSteps.
|
|
60
|
+
ImportServerFilesSteps.checkImportedResourceByName(FILE_FOR_IMPORT);
|
|
61
61
|
// When I select Imported from the menu
|
|
62
62
|
ImportServerFilesSteps.selectImportedResources();
|
|
63
63
|
// Then I should see only imported files selected
|
|
@@ -97,8 +97,8 @@ describe('Import server files - Batch operations', () => {
|
|
|
97
97
|
// Then the files should be imported
|
|
98
98
|
// We send only the files in the folder for import
|
|
99
99
|
// ImportServerFilesSteps.checkImportedResource(0, 'more-files');
|
|
100
|
-
ImportServerFilesSteps.
|
|
101
|
-
ImportServerFilesSteps.
|
|
100
|
+
ImportServerFilesSteps.checkImportedResourceByName('jsonld-file.jsonld');
|
|
101
|
+
ImportServerFilesSteps.checkImportedResourceByName('rdfxml.rdf');
|
|
102
102
|
ImportServerFilesSteps.deselectFileByName('more-files');
|
|
103
103
|
// When I select the folder and click on the batch reset button
|
|
104
104
|
ImportServerFilesSteps.selectFileByName('more-files');
|
|
@@ -116,7 +116,7 @@ describe('Import server files - Batch operations', () => {
|
|
|
116
116
|
// Then the files should be imported
|
|
117
117
|
// We send only the files in the folder for import
|
|
118
118
|
// ImportServerFilesSteps.checkImportedResource(0, 'more-files');
|
|
119
|
-
ImportServerFilesSteps.
|
|
120
|
-
ImportServerFilesSteps.
|
|
119
|
+
ImportServerFilesSteps.checkImportedResourceByName('jsonld-file.jsonld');
|
|
120
|
+
ImportServerFilesSteps.checkImportedResourceByName('rdfxml.rdf');
|
|
121
121
|
});
|
|
122
122
|
});
|
|
@@ -87,8 +87,8 @@ describe('Import server files', () => {
|
|
|
87
87
|
// Then I expect all files to be successfully imported.
|
|
88
88
|
// TODO: this check is failing right now because the fix https://ontotext.atlassian.net/browse/GDB-10295 is not yet completed.
|
|
89
89
|
// ImportServerFilesSteps.checkImportedResource(0, 'more-files', 'Imported successfully in');
|
|
90
|
-
ImportServerFilesSteps.
|
|
91
|
-
ImportServerFilesSteps.
|
|
90
|
+
ImportServerFilesSteps.checkImportedResourceByIndex(1, 'jsonld-file.jsonld', 'Imported successfully in');
|
|
91
|
+
ImportServerFilesSteps.checkImportedResourceByIndex(2, 'rdfxml.rdf', 'Imported successfully in');
|
|
92
92
|
|
|
93
93
|
// When I try to import a directory that contains resources with incorrect rdf data.
|
|
94
94
|
ImportServerFilesSteps.importResourceByName('more-files-with-error');
|
|
@@ -119,7 +119,7 @@ describe('Import server files', () => {
|
|
|
119
119
|
ImportSettingsDialogSteps.import();
|
|
120
120
|
|
|
121
121
|
// I expect only part of the error be displayed,
|
|
122
|
-
ImportServerFilesSteps.
|
|
122
|
+
ImportServerFilesSteps.checkImportedResourceByName(importResourceName, 'RDF Parse Error: The element type ');
|
|
123
123
|
// and when click on that error
|
|
124
124
|
ImportServerFilesSteps.openErrorDialog(importResourceName);
|
|
125
125
|
|
|
@@ -152,39 +152,39 @@ describe('Import server files', () => {
|
|
|
152
152
|
ImportServerFilesSteps.orderBySize();
|
|
153
153
|
|
|
154
154
|
// Then I expect the directories to be sorted in ascending order,
|
|
155
|
-
ImportServerFilesSteps.
|
|
156
|
-
ImportServerFilesSteps.
|
|
155
|
+
ImportServerFilesSteps.getResourceTitleRow(0).should('contain', "more-files");
|
|
156
|
+
ImportServerFilesSteps.getResourceTitleRow(3).should('contain', "more-files-with-error");
|
|
157
157
|
|
|
158
158
|
// and inner files to be sorted ascending as well.
|
|
159
159
|
// checks first folder files
|
|
160
|
-
ImportServerFilesSteps.
|
|
161
|
-
ImportServerFilesSteps.
|
|
160
|
+
ImportServerFilesSteps.getResourceTitleRow(1).should('contain', "jsonld-file.jsonld");
|
|
161
|
+
ImportServerFilesSteps.getResourceTitleRow(2).should('contain', "rdfxml.rdf");
|
|
162
162
|
// checks second folder files
|
|
163
|
-
ImportServerFilesSteps.
|
|
164
|
-
ImportServerFilesSteps.
|
|
165
|
-
ImportServerFilesSteps.
|
|
163
|
+
ImportServerFilesSteps.getResourceTitleRow(4).should('contain', "import-resource-with-correct-data.jsonld");
|
|
164
|
+
ImportServerFilesSteps.getResourceTitleRow(5).should('contain', "import-resource-with-incorrect-data.rdf");
|
|
165
|
+
ImportServerFilesSteps.getResourceTitleRow(6).should('contain', "import-resource-with-long-error.rdf");
|
|
166
166
|
// checks files in root
|
|
167
|
-
ImportServerFilesSteps.
|
|
168
|
-
ImportServerFilesSteps.
|
|
169
|
-
ImportServerFilesSteps.
|
|
167
|
+
ImportServerFilesSteps.getResourceTitleRow(7).should('contain', "bnodes.ttl");
|
|
168
|
+
ImportServerFilesSteps.getResourceTitleRow(8).should('contain', "test_turtlestar.ttls");
|
|
169
|
+
ImportServerFilesSteps.getResourceTitleRow(9).should('contain', "0007-import-file.jsonld");
|
|
170
170
|
|
|
171
171
|
// When I change the order by size.
|
|
172
172
|
ImportServerFilesSteps.orderBySize();
|
|
173
173
|
|
|
174
174
|
// Then I expect the directories to be sorted in descending order,
|
|
175
|
-
ImportServerFilesSteps.
|
|
176
|
-
ImportServerFilesSteps.
|
|
175
|
+
ImportServerFilesSteps.getResourceTitleRow(0).should('contain', "more-files-with-error");
|
|
176
|
+
ImportServerFilesSteps.getResourceTitleRow(4).should('contain', "more-files");
|
|
177
177
|
// checks first folder files
|
|
178
|
-
ImportServerFilesSteps.
|
|
179
|
-
ImportServerFilesSteps.
|
|
180
|
-
ImportServerFilesSteps.
|
|
178
|
+
ImportServerFilesSteps.getResourceTitleRow(1).should('contain', "import-resource-with-long-error.rdf");
|
|
179
|
+
ImportServerFilesSteps.getResourceTitleRow(2).should('contain', "import-resource-with-incorrect-data.rdf");
|
|
180
|
+
ImportServerFilesSteps.getResourceTitleRow(3).should('contain', "import-resource-with-correct-data.jsonld");
|
|
181
181
|
// checks second folder files
|
|
182
|
-
ImportServerFilesSteps.
|
|
183
|
-
ImportServerFilesSteps.
|
|
182
|
+
ImportServerFilesSteps.getResourceTitleRow(5).should('contain', "rdfxml.rdf");
|
|
183
|
+
ImportServerFilesSteps.getResourceTitleRow(6).should('contain', "jsonld-file.jsonld");
|
|
184
184
|
// checks files in root
|
|
185
|
-
ImportServerFilesSteps.
|
|
186
|
-
ImportServerFilesSteps.
|
|
187
|
-
ImportServerFilesSteps.
|
|
185
|
+
ImportServerFilesSteps.getResourceTitleRow(17).should('contain', "0007-import-file.jsonld");
|
|
186
|
+
ImportServerFilesSteps.getResourceTitleRow(18).should('contain', "test_turtlestar.ttls");
|
|
187
|
+
ImportServerFilesSteps.getResourceTitleRow(19).should('contain', "bnodes.ttl");
|
|
188
188
|
});
|
|
189
189
|
|
|
190
190
|
it('should allow importing jsonld with empty "JSON-LD Context"', () => {
|
|
@@ -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);
|
|
@@ -122,17 +122,16 @@ describe('Import user data: File upload', () => {
|
|
|
122
122
|
ImportSettingsDialogSteps.getDialog().should('be.visible');
|
|
123
123
|
ImportSettingsDialogSteps.import();
|
|
124
124
|
// Then I should see the uploaded file - it becomes first in the list
|
|
125
|
-
|
|
126
|
-
ImportUserDataSteps.
|
|
127
|
-
ImportUserDataSteps.checkImportedResource(1, 'bnodes.ttl');
|
|
125
|
+
ImportUserDataSteps.checkImportedResourceByIndex(0, 'bnodes.ttl');
|
|
126
|
+
ImportUserDataSteps.checkImportedResourceByIndex(1, 'jsonld.jsonld');
|
|
128
127
|
// When I override the second file
|
|
129
128
|
ImportUserDataSteps.selectFile(file2);
|
|
130
129
|
FileOverwriteDialogSteps.overwrite();
|
|
131
130
|
ImportSettingsDialogSteps.getDialog().should('be.visible');
|
|
132
131
|
ImportSettingsDialogSteps.import();
|
|
133
132
|
// Then I should see the uploaded file - it becomes first in the list
|
|
134
|
-
ImportUserDataSteps.
|
|
135
|
-
ImportUserDataSteps.
|
|
133
|
+
ImportUserDataSteps.checkImportedResourceByIndex(0, 'jsonld.jsonld');
|
|
134
|
+
ImportUserDataSteps.checkImportedResourceByIndex(1, 'bnodes.ttl');
|
|
136
135
|
});
|
|
137
136
|
|
|
138
137
|
it('should be able to only upload a single file without importing it', () => {
|
|
@@ -165,8 +164,8 @@ describe('Import user data: File upload', () => {
|
|
|
165
164
|
ImportSettingsDialogSteps.import();
|
|
166
165
|
// Then I should see the uploaded file
|
|
167
166
|
ImportUserDataSteps.getResources().should('have.length', 2);
|
|
168
|
-
ImportUserDataSteps.
|
|
169
|
-
ImportUserDataSteps.
|
|
167
|
+
ImportUserDataSteps.checkImportedResourceByIndex(0, 'jsonld.jsonld');
|
|
168
|
+
ImportUserDataSteps.checkImportedResourceByIndex(1, 'bnodes.ttl');
|
|
170
169
|
// And the files should really be there
|
|
171
170
|
HeaderSteps.openHomePage();
|
|
172
171
|
ImportUserDataSteps.visit();
|
|
@@ -182,7 +181,7 @@ describe('Import user data: File upload', () => {
|
|
|
182
181
|
ImportSettingsDialogSteps.getDialog().should('be.visible');
|
|
183
182
|
ImportSettingsDialogSteps.import();
|
|
184
183
|
ImportUserDataSteps.getResources().should('have.length', 1);
|
|
185
|
-
ImportUserDataSteps.
|
|
184
|
+
ImportUserDataSteps.checkImportedResourceByIndex(0, 'bnodes.ttl');
|
|
186
185
|
// When I upload a file with the same name
|
|
187
186
|
ImportUserDataSteps.selectFile(file1);
|
|
188
187
|
// Then I should see a file override confirmation dialog
|
|
@@ -193,7 +192,7 @@ describe('Import user data: File upload', () => {
|
|
|
193
192
|
ImportSettingsDialogSteps.import();
|
|
194
193
|
// Then The file should be overridden
|
|
195
194
|
ImportUserDataSteps.getResources().should('have.length', 1);
|
|
196
|
-
ImportUserDataSteps.
|
|
195
|
+
ImportUserDataSteps.checkImportedResourceByIndex(0, 'bnodes.ttl');
|
|
197
196
|
});
|
|
198
197
|
|
|
199
198
|
it('Should be able to upload file with same name and preserve the existing file', () => {
|
|
@@ -205,7 +204,7 @@ describe('Import user data: File upload', () => {
|
|
|
205
204
|
ImportSettingsDialogSteps.getDialog().should('be.visible');
|
|
206
205
|
ImportSettingsDialogSteps.import();
|
|
207
206
|
ImportUserDataSteps.getResources().should('have.length', 1);
|
|
208
|
-
ImportUserDataSteps.
|
|
207
|
+
ImportUserDataSteps.checkImportedResourceByIndex(0, 'bnodes.ttl');
|
|
209
208
|
// When I upload a file with the same name
|
|
210
209
|
ImportUserDataSteps.selectFile(file1);
|
|
211
210
|
// Then I should see a file override confirmation dialog
|
|
@@ -215,8 +214,8 @@ describe('Import user data: File upload', () => {
|
|
|
215
214
|
ImportSettingsDialogSteps.import();
|
|
216
215
|
// Then The file should not be overridden but prefixed instead
|
|
217
216
|
ImportUserDataSteps.getResources().should('have.length', 2);
|
|
218
|
-
ImportUserDataSteps.
|
|
219
|
-
ImportUserDataSteps.
|
|
217
|
+
ImportUserDataSteps.checkImportedResourceByIndex(0, 'bnodes-0.ttl');
|
|
218
|
+
ImportUserDataSteps.checkImportedResourceByIndex(1, 'bnodes.ttl');
|
|
220
219
|
// When I upload two files, one with the same name and second new one
|
|
221
220
|
const file2 = ImportUserDataSteps.createFile(testFiles[1], jsonld);
|
|
222
221
|
ImportUserDataSteps.selectFile([file1, file2]);
|
|
@@ -225,10 +224,10 @@ describe('Import user data: File upload', () => {
|
|
|
225
224
|
ImportSettingsDialogSteps.import();
|
|
226
225
|
// Then The file should not be overridden but prefixed with increased index instead
|
|
227
226
|
ImportUserDataSteps.getResources().should('have.length', 4);
|
|
228
|
-
ImportUserDataSteps.
|
|
229
|
-
ImportUserDataSteps.
|
|
230
|
-
ImportUserDataSteps.
|
|
231
|
-
ImportUserDataSteps.
|
|
227
|
+
ImportUserDataSteps.checkImportedResourceByIndex(0, 'jsonld.jsonld');
|
|
228
|
+
ImportUserDataSteps.checkImportedResourceByIndex(1, 'bnodes-1.ttl');
|
|
229
|
+
ImportUserDataSteps.checkImportedResourceByIndex(2, 'bnodes-0.ttl');
|
|
230
|
+
ImportUserDataSteps.checkImportedResourceByIndex(3, 'bnodes.ttl');
|
|
232
231
|
});
|
|
233
232
|
|
|
234
233
|
it('should see error message when uploaded file has invalid format', () => {
|
|
@@ -242,6 +241,6 @@ describe('Import user data: File upload', () => {
|
|
|
242
241
|
ImportSettingsDialogSteps.import();
|
|
243
242
|
// Then I should see an error message
|
|
244
243
|
ImportUserDataSteps.getResources().should('have.length', 1);
|
|
245
|
-
ImportUserDataSteps.
|
|
244
|
+
ImportUserDataSteps.checkImportedResourceByIndex(0, 'invalid-format.json', 'RDF Parse Error: Invalid file format');
|
|
246
245
|
});
|
|
247
246
|
});
|
|
@@ -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');
|
|
@@ -2,6 +2,7 @@ import {RepositorySteps} from "../../steps/repository-steps";
|
|
|
2
2
|
import {OntopRepositorySteps} from "../../steps/ontop-repository-steps";
|
|
3
3
|
import {ToasterSteps} from "../../steps/toaster-steps";
|
|
4
4
|
import {ModalDialogSteps} from "../../steps/modal-dialog-steps";
|
|
5
|
+
import {RepositoriesStubs} from '../../stubs/repositories/repositories-stubs.js';
|
|
5
6
|
|
|
6
7
|
describe('Repository rename restrictions', () => {
|
|
7
8
|
|
|
@@ -34,13 +35,14 @@ describe('Repository rename restrictions', () => {
|
|
|
34
35
|
});
|
|
35
36
|
|
|
36
37
|
it('should not allow renaming of an Ontop repository', () => {
|
|
38
|
+
RepositoriesStubs.spyGetRepository(repositoryId);
|
|
37
39
|
// Given there is an Ontop repository.
|
|
38
40
|
createOntopRepository(repositoryId);
|
|
39
41
|
|
|
40
42
|
// When I open its edit page.
|
|
41
43
|
RepositorySteps.visit();
|
|
42
44
|
RepositorySteps.editRepository(repositoryId);
|
|
43
|
-
|
|
45
|
+
cy.wait('@getRepository');
|
|
44
46
|
// Then the repository id should be rendered as read only,
|
|
45
47
|
RepositorySteps.getGDBIdInput()
|
|
46
48
|
.should('have.value', repositoryId)
|
|
@@ -62,6 +64,7 @@ describe('Repository rename restrictions', () => {
|
|
|
62
64
|
});
|
|
63
65
|
|
|
64
66
|
it('should not allow renaming of a FedX repository', () => {
|
|
67
|
+
RepositoriesStubs.spyGetRepository(repositoryId);
|
|
65
68
|
// Given there is a FedX repository.
|
|
66
69
|
cy.createRepository({id: memberRepositoryId});
|
|
67
70
|
createFedxRepository(repositoryId, memberRepositoryId);
|
|
@@ -69,6 +72,7 @@ describe('Repository rename restrictions', () => {
|
|
|
69
72
|
// When I open its edit page.
|
|
70
73
|
RepositorySteps.visit();
|
|
71
74
|
RepositorySteps.editRepository(repositoryId);
|
|
75
|
+
cy.wait('@getRepository');
|
|
72
76
|
|
|
73
77
|
// Then the repository id should be rendered as read only,
|
|
74
78
|
RepositorySteps.getGDBIdInput()
|
|
@@ -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', () => {
|
|
@@ -109,6 +109,14 @@ describe('TTYG edit an agent', () => {
|
|
|
109
109
|
|
|
110
110
|
// THEN: The Save Agent button should be disabled
|
|
111
111
|
TtygAgentSettingsModalSteps.getSaveAgentButton().should('be.disabled');
|
|
112
|
+
// AND: The panel of the FTS extraction method should be expanded, so that the reason is visible
|
|
113
|
+
TtygAgentSettingsModalSteps.getFtsDisabledHelp().should('be.visible');
|
|
114
|
+
|
|
115
|
+
// WHEN: I try to collapse the panel of the FTS extraction method
|
|
116
|
+
TtygAgentSettingsModalSteps.toggleFTSExtractionMethodPanel();
|
|
117
|
+
// THEN: The panel should remain expanded, because the precondition error is not resolved yet
|
|
118
|
+
TtygAgentSettingsModalSteps.getFtsDisabledHelp().should('be.visible');
|
|
119
|
+
TtygAgentSettingsModalSteps.getSaveAgentButton().should('be.disabled');
|
|
112
120
|
});
|
|
113
121
|
|
|
114
122
|
it('should be able to edit Autocomplete extraction method option', () => {
|