Skip to content

Commit ab8a166

Browse files
nitrosxmartin-trajanovskiJunjiequan
authored
BREAKING CHANGE: new sdk release (#1658)
* feat: add the new auth service to prepare for the new sdk * try to fix some ai-bot review suggestions * add the note for the good review suggestion from ai-bot * remove old sdk and adjust types against the new one * fix more types and issues against the new sdk * finalize type error fixes * remove prefix * add the new sdk generation script for local development * start fixing TODOs after newly generated sdk * fixed sdk local generation for linux * update the sdk package version and fix some more types * detect the OS and use the right current directory path * improve types and fix more TODOs * improve types and fix TODOs after backend improvements * finalize TODOs and FIXMEs fixes and type improvements with the new sdk * fix some sourcery-ai comments * fix some of the last TODOs * adapted sdk generation to unix environment * ignore the @SciCatProject that is generated with the sdk * start fixing tests with the new sdk * add needed stub classes and fix some more tests * continue fixing unit tests * try to fix e2e tests and revert some changes that need more attention for now * changes to just run the tests * use latest sdk * update package-lock file * fixing unit tests * fix more unit tests * continue fixing tests * update the sdk * fix last e2e test * fix thumbnail unit tests * revert some change * finalize fixing unit tests * revert the backend image changes after the tests pass * add some improvements in the mocked objects for unit tests based on ai bot suggestion * remove encodeURIComponent in the effects as it seems redundant * fix test files after some changes * try to use mock objects as much as possible * update the sdk version * update package-lock file * update the sdk to latest * BREAKING CHANGE: new sdk release --------- Co-authored-by: martintrajanovski <[email protected]> Co-authored-by: Jay <[email protected]>
1 parent e68fabb commit ab8a166

File tree

233 files changed

+2763
-25364
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

233 files changed

+2763
-25364
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
/out-tsc
77
# Only exists if Bazel was run
88
/bazel-out
9+
@scicatproject/
910

1011
# dependencies
1112
/node_modules

cypress.config.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ import { defineConfig } from "cypress";
22

33
export default defineConfig({
44
env: {
5-
lbBaseUrl: "http://localhost:3000/api/v3",
6-
lbLoginEndpoint: "/auth/login",
7-
lbTokenPrefix: "Bearer ",
5+
baseUrl: "http://localhost:3000/api/v3",
6+
loginEndpoint: "/auth/login",
7+
tokenPrefix: "Bearer",
88
username: "admin",
99
password: "27f5fd86ae68fe740eef42b8bbd1d7d5",
1010
secondaryUsername: "archiveManager",

cypress/e2e/datasets/datasets-attachment.cy.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ describe("Dataset attachments", () => {
44
beforeEach(() => {
55
cy.login(Cypress.env("username"), Cypress.env("password"));
66

7-
cy.intercept("POST", "/api/v3/Datasets/**/*").as("upload");
7+
cy.intercept("POST", "/api/v3/datasets/**/*").as("upload");
88
});
99

1010
after(() => {

cypress/e2e/datasets/datasets-datafiles.cy.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
describe("Dataset datafiles", () => {
22
beforeEach(() => {
33
cy.login(Cypress.env("username"), Cypress.env("password"));
4-
cy.intercept("PATCH", "/api/v3/Datasets/**/*").as("change");
4+
cy.intercept("PATCH", "/api/v3/datasets/**/*").as("change");
55
cy.intercept("GET", "*").as("fetch");
66
});
77

cypress/e2e/datasets/datasets-keyword.cy.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ describe("Datasets", () => {
22
beforeEach(() => {
33
cy.login(Cypress.env("username"), Cypress.env("password"));
44

5-
cy.intercept("PATCH", "/api/v3/Datasets/**/*").as("keyword");
5+
cy.intercept("PATCH", "/api/v3/datasets/**/*").as("keyword");
66
cy.intercept("GET", "*").as("fetch");
77
});
88

cypress/e2e/datasets/datasets-metadata.cy.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ describe("Datasets", () => {
1212
beforeEach(() => {
1313
cy.login(Cypress.env("username"), Cypress.env("password"));
1414

15-
cy.intercept("PATCH", "/api/v3/Datasets/**/*").as("metadata");
15+
cy.intercept("PATCH", "/api/v3/datasets/**/*").as("metadata");
1616
cy.intercept("GET", "*").as("fetch");
1717
});
1818

@@ -67,6 +67,8 @@ describe("Datasets", () => {
6767

6868
cy.get("button[data-cy=save-changes-button]").click();
6969

70+
cy.finishedLoading();
71+
7072
cy.wait("@metadata").then(({ request, response }) => {
7173
expect(request.method).to.eq("PATCH");
7274
expect(response.statusCode).to.eq(200);

cypress/e2e/datasets/datasets-public.cy.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ describe("Datasets", () => {
44

55
cy.createDataset("raw");
66

7-
cy.intercept("PATCH", "/api/v3/Datasets/**/*").as("change");
7+
cy.intercept("PATCH", "/api/v3/datasets/**/*").as("change");
88
cy.intercept("GET", "*").as("fetch");
99
});
1010

cypress/e2e/datasets/datasets-reduce.cy.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ describe("Datasets", () => {
22
beforeEach(() => {
33
cy.login(Cypress.env("username"), Cypress.env("password"));
44

5-
cy.intercept("PATCH", "/api/v3/Datasets/**/*").as("metadata");
5+
cy.intercept("PATCH", "/api/v3/datasets/**/*").as("metadata");
66
cy.intercept("GET", "*").as("fetch");
77
});
88

cypress/e2e/other/policy-delegate.cy.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ describe("Policies", () => {
22
beforeEach(() => {
33
cy.login(Cypress.env("username"), Cypress.env("password"));
44

5-
cy.intercept("POST", "/api/v3/Policies/**/*").as("update");
5+
cy.intercept("POST", "/api/v3/policies/**/*").as("update");
66
cy.intercept("GET", "*").as("fetch");
77
});
88

cypress/e2e/other/users-login.cy.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ describe("Users Login", () => {
55
const guestUsername = Cypress.env("guestUsername");
66
const guestPassword = Cypress.env("guestPassword");
77

8-
const loginEndpoint = Cypress.env("lbLoginEndpoint");
8+
const loginEndpoint = Cypress.env("loginEndpoint");
99

1010
beforeEach(() => {
1111
cy.intercept("POST", "**/auth/msad").as("adLogin");

0 commit comments

Comments
 (0)