Skip to content

Commit

Permalink
chore: update dsp-api to v28.1.2 (#524)
Browse files Browse the repository at this point in the history
* update api and test-data

* fix dates

* fix number of expected project - 2 system projects were removed in API

* fix number of expected project - 2 system projects were removed in API in e2e test

* update node builder

* update node builder

* legacy-peer-deps

* npm audit fix

* update karma-jasmine-html-reporter

* update karma-jasmine-html-reporter

* update jasmine-core

* update test deps
  • Loading branch information
mpro7 committed Apr 28, 2023
1 parent b3fd077 commit ffc40b3
Show file tree
Hide file tree
Showing 126 changed files with 715 additions and 487 deletions.
357 changes: 246 additions & 111 deletions package-lock.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/api/admin/projects/projects-endpoint.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ describe("ProjectsEndpoint", () => {
knoraApiConnection.admin.projectsEndpoint.getProjects().subscribe(
(response: ApiResponseData<ProjectsResponse>) => {

expect(response.body.projects.length).toEqual(8);
expect(response.body.projects.length).toEqual(6);
expect(response.body.projects[0].id).toEqual("http://rdfh.ch/projects/00FF");

done();
Expand Down
4 changes: 2 additions & 2 deletions src/api/v2/ontology/ontologies-endpoint.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1220,7 +1220,7 @@ describe("OntologiesEndpoint", () => {
deleteCardinalitiesFromClassRequest.id = "http://0.0.0.0:3333/ontology/0001/freetest/v2";

// update this timestamp after every release of dsp-api
deleteCardinalitiesFromClassRequest.lastModificationDate = "2023-04-14T07:30:13.608840362Z";
deleteCardinalitiesFromClassRequest.lastModificationDate = "2023-04-28T08:20:27.505176490Z";

const cardinalityToRemove = new UpdateResourceClassCardinality();

Expand Down Expand Up @@ -1265,7 +1265,7 @@ describe("OntologiesEndpoint", () => {
deleteCardinalitiesFromClassRequest.id = "http://0.0.0.0:3333/ontology/0001/freetest/v2";

// update this timestamp after every release of dsp-api
deleteCardinalitiesFromClassRequest.lastModificationDate = "2023-04-14T07:30:13.608840362Z";
deleteCardinalitiesFromClassRequest.lastModificationDate = "2023-04-28T08:20:27.505176490Z";

const cardinalityToRemove = new UpdateResourceClassCardinality();

Expand Down
8 changes: 4 additions & 4 deletions src/api/v2/resource/resources-endpoint.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -486,7 +486,7 @@ describe("ResourcesEndpoint", () => {
expect(res.hasPermissions).toEqual("CR knora-admin:Creator|M knora-admin:ProjectMember|V knora-admin:ProjectMember");

// update this timestamp after every release of dsp-api
expect(res.lastModificationDate).toEqual("2023-04-15T07:20:50.321304635Z");
expect(res.lastModificationDate).toEqual("2023-04-29T08:09:06.082021935Z");
done();
}
);
Expand Down Expand Up @@ -550,7 +550,7 @@ describe("ResourcesEndpoint", () => {
updateResourceMetadata.lastModificationDate = "2021-09-30T16:41:46.980756Z";

// update this timestamp after every release of dsp-api
updateResourceMetadata.newModificationDate = "2023-04-15T07:20:51.393023726Z";
updateResourceMetadata.newModificationDate = "2023-04-29T08:09:06.987408746Z";

knoraApiConnection.v2.res.updateResourceMetadata(updateResourceMetadata).subscribe(
(res: UpdateResourceMetadataResponse) => {
Expand All @@ -560,7 +560,7 @@ describe("ResourcesEndpoint", () => {
expect(res.hasPermissions).toEqual("CR knora-admin:ProjectMember|V knora-admin:ProjectMember");

// update this timestamp after every release of dsp-api
expect(res.lastModificationDate).toEqual("2023-04-15T07:20:51.393023726Z");
expect(res.lastModificationDate).toEqual("2023-04-29T08:09:06.987408746Z");
done();
}
);
Expand All @@ -578,7 +578,7 @@ describe("ResourcesEndpoint", () => {
expectedPayload["http://api.knora.org/ontology/knora-api/v2#lastModificationDate"]["@value"] = "2021-09-30T16:41:46.980756Z";

// update this timestamp after every release of dsp-api
expectedPayload["http://api.knora.org/ontology/knora-api/v2#newModificationDate"]["@value"] = "2023-04-15T07:20:51.393023726Z";
expectedPayload["http://api.knora.org/ontology/knora-api/v2#newModificationDate"]["@value"] = "2023-04-29T08:09:06.987408746Z";

expect(request.data()).toEqual(expectedPayload);

Expand Down
2 changes: 1 addition & 1 deletion test-framework/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
### STAGE 1: Build ###

# We label our stage as 'builder'
FROM node:12-stretch as builder
FROM node:16-buster as builder

LABEL maintainer="ivan.subotic@unibas.ch"

Expand Down
2 changes: 1 addition & 1 deletion test-framework/e2e/src/app.e2e-spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ describe('workspace-project App', () => {
button.click();

const projectCount = page.getEle('div#projects span.project-count');
expect(projectCount.getText()).toEqual('8');
expect(projectCount.getText()).toEqual('6');
})

it('request a project\'s permissions', () => {
Expand Down
Loading

0 comments on commit ffc40b3

Please sign in to comment.