graphdb-workbench-tests 2.0.0-M3-TR2 → 2.0.0-M3-API-CHANGES-TR1
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.
|
@@ -35,7 +35,7 @@ describe('Help / REST API', () => {
|
|
|
35
35
|
verifyControllerListIsCollapsed(getRDF4JAPI());
|
|
36
36
|
|
|
37
37
|
// Examine the import controller
|
|
38
|
-
verifyControllerOptions('
|
|
38
|
+
verifyControllerOptions('repository-management-controller', 'Repository management');
|
|
39
39
|
});
|
|
40
40
|
|
|
41
41
|
function getSwaggerFrame() {
|
|
@@ -373,7 +373,7 @@ describe('Repositories', () => {
|
|
|
373
373
|
let obdaFileUpload = '';
|
|
374
374
|
let ontologyFileUpload = '';
|
|
375
375
|
let propertiesFileUpload = '';
|
|
376
|
-
const url = 'http://localhost:9000/rest/repositories/
|
|
376
|
+
const url = 'http://localhost:9000/rest/repositories/file/upload';
|
|
377
377
|
const fileType = '';
|
|
378
378
|
const virtualRepoName = 'virtual-repo-' + Date.now();
|
|
379
379
|
|
|
@@ -381,7 +381,7 @@ describe('Repositories', () => {
|
|
|
381
381
|
cy.fixture('ontop/university-complete.obda', 'binary').then((file) => {
|
|
382
382
|
Cypress.Blob.binaryStringToBlob(file, fileType).then((blob) => {
|
|
383
383
|
const formData = new FormData();
|
|
384
|
-
formData.set('
|
|
384
|
+
formData.set('file', blob, 'university-complete.obda');
|
|
385
385
|
|
|
386
386
|
cy.form_request(url, formData).then(response => {
|
|
387
387
|
return obdaFileUpload = response.response.body.fileLocation;
|
|
@@ -392,7 +392,7 @@ describe('Repositories', () => {
|
|
|
392
392
|
cy.fixture('ontop/university-complete.ttl', 'binary').then((file) => {
|
|
393
393
|
Cypress.Blob.binaryStringToBlob(file, fileType).then((blob) => {
|
|
394
394
|
const formData = new FormData();
|
|
395
|
-
formData.set('
|
|
395
|
+
formData.set('file', blob, 'university-complete.ttl');
|
|
396
396
|
|
|
397
397
|
cy.form_request(url, formData).then(response => {
|
|
398
398
|
return ontologyFileUpload = response.response.body.fileLocation;
|
|
@@ -403,7 +403,7 @@ describe('Repositories', () => {
|
|
|
403
403
|
cy.fixture('ontop/university-complete.properties', 'binary').then((file) => {
|
|
404
404
|
Cypress.Blob.binaryStringToBlob(file, fileType).then((blob) => {
|
|
405
405
|
const formData = new FormData();
|
|
406
|
-
formData.set('
|
|
406
|
+
formData.set('file', blob, 'university-complete.properties');
|
|
407
407
|
|
|
408
408
|
cy.form_request(url, formData).then(response => {
|
|
409
409
|
return propertiesFileUpload = response.response.body.fileLocation;
|
package/package.json
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import snippetImportTemplate from '../fixtures/snippet-import-template.json';
|
|
2
2
|
|
|
3
|
-
const
|
|
4
|
-
const
|
|
3
|
+
const REPOSITORIES_URL = '/rest/repositories/';
|
|
4
|
+
const UPLOAD_URL = '/import/upload/';
|
|
5
|
+
const SERVER_URL = '/import/server/';
|
|
5
6
|
const POLL_INTERVAL = 200;
|
|
6
7
|
|
|
7
8
|
Cypress.Commands.add('importRDFTextSnippet', (repositoryId, rdf, importSettings = {}) => {
|
|
@@ -10,7 +11,8 @@ Cypress.Commands.add('importRDFTextSnippet', (repositoryId, rdf, importSettings
|
|
|
10
11
|
|
|
11
12
|
cy.request({
|
|
12
13
|
method: 'POST',
|
|
13
|
-
url: UPLOAD_URL + repositoryId + '/text',
|
|
14
|
+
//url: UPLOAD_URL + repositoryId + '/text',
|
|
15
|
+
url: REPOSITORIES_URL + repositoryId + UPLOAD_URL + '/text',
|
|
14
16
|
body: importData
|
|
15
17
|
}).should((response) => expect(response.status).to.equal(202));
|
|
16
18
|
waitServerOperation(UPLOAD_URL, repositoryId, importData.name);
|
|
@@ -24,16 +26,16 @@ Cypress.Commands.add('importServerFile', (repositoryId, fileName, importSettings
|
|
|
24
26
|
|
|
25
27
|
cy.request({
|
|
26
28
|
method: 'POST',
|
|
27
|
-
url:
|
|
29
|
+
url: REPOSITORIES_URL + repositoryId + SERVER_URL,
|
|
28
30
|
body: importData
|
|
29
31
|
}).should((response) => expect(response.status).to.equal(202));
|
|
30
|
-
waitServerOperation(
|
|
32
|
+
waitServerOperation(SERVER_URL, repositoryId, fileName);
|
|
31
33
|
});
|
|
32
34
|
|
|
33
35
|
function waitServerOperation(url, repositoryId, fileName) {
|
|
34
36
|
cy.request({
|
|
35
37
|
method: 'GET',
|
|
36
|
-
url:
|
|
38
|
+
url: REPOSITORIES_URL + repositoryId + url
|
|
37
39
|
}).then((response) => {
|
|
38
40
|
const importStatus = Cypress._.find(response.body, (importStatus) => importStatus.name === fileName);
|
|
39
41
|
if (importStatus.status === 'DONE') {
|
|
@@ -8,7 +8,7 @@ Cypress.Commands.add('setDefaultUserData', () => {
|
|
|
8
8
|
};
|
|
9
9
|
cy.request({
|
|
10
10
|
method: 'PATCH',
|
|
11
|
-
url: `rest/security/
|
|
11
|
+
url: `rest/security/users/${encodeURIComponent('admin')}`,
|
|
12
12
|
headers: {
|
|
13
13
|
'X-GraphDB-Password': 'root'
|
|
14
14
|
},
|