Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: fix tests using the new sdk #1665

Merged
merged 29 commits into from
Nov 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
f54b1db
start fixing tests with the new sdk
martin-trajanovski Nov 19, 2024
1efa821
add needed stub classes and fix some more tests
martin-trajanovski Nov 20, 2024
a98ff14
Merge branch 'new-sdk-release' of https://github.com/SciCatProject/fr…
martin-trajanovski Nov 20, 2024
464ba8c
continue fixing unit tests
martin-trajanovski Nov 20, 2024
3c54858
try to fix e2e tests and revert some changes that need more attention…
martin-trajanovski Nov 21, 2024
066f6f7
changes to just run the tests
martin-trajanovski Nov 21, 2024
db0eecf
use latest sdk
martin-trajanovski Nov 21, 2024
4f37b80
update package-lock file
martin-trajanovski Nov 21, 2024
76bd6fd
fixing unit tests
martin-trajanovski Nov 21, 2024
37260d3
fix more unit tests
martin-trajanovski Nov 22, 2024
f63b432
continue fixing tests
martin-trajanovski Nov 22, 2024
fb4fc01
update the sdk
martin-trajanovski Nov 25, 2024
8d38fda
fix last e2e test
martin-trajanovski Nov 25, 2024
24dcebb
fix thumbnail unit tests
martin-trajanovski Nov 25, 2024
047afbf
revert some change
martin-trajanovski Nov 25, 2024
dcff2ab
finalize fixing unit tests
martin-trajanovski Nov 25, 2024
76c8fcf
revert the backend image changes after the tests pass
martin-trajanovski Nov 25, 2024
59a0ed7
add some improvements in the mocked objects for unit tests based on a…
martin-trajanovski Nov 25, 2024
8280f95
chore(deps-dev): bump @types/node in the types group
dependabot[bot] Nov 25, 2024
2f34ab0
Merge pull request #1668 from SciCatProject/dependabot/npm_and_yarn/t…
github-actions[bot] Nov 25, 2024
308714c
chore(deps-dev): bump cypress from 13.15.2 to 13.16.0
dependabot[bot] Nov 25, 2024
f94ca4c
Merge pull request #1670 from SciCatProject/dependabot/npm_and_yarn/c…
github-actions[bot] Nov 25, 2024
fefc9f2
chore(deps): bump mathjs from 13.2.2 to 14.0.0
dependabot[bot] Nov 25, 2024
06b4b7e
Merge pull request #1671 from SciCatProject/dependabot/npm_and_yarn/m…
github-actions[bot] Nov 26, 2024
8bf15e2
remove encodeURIComponent in the effects as it seems redundant
martin-trajanovski Nov 27, 2024
4cc40a8
fix test files after some changes
martin-trajanovski Nov 27, 2024
5f490c0
fix: center logo in LoginDialog (#1656)
cfelder Nov 27, 2024
e5f9cd8
try to use mock objects as much as possible
martin-trajanovski Nov 27, 2024
51a5e5e
resolve merge conflicts
martin-trajanovski Nov 27, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions cypress.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ import { defineConfig } from "cypress";

export default defineConfig({
env: {
lbBaseUrl: "http://localhost:3000/api/v3",
lbLoginEndpoint: "/auth/login",
lbTokenPrefix: "Bearer ",
baseUrl: "http://localhost:3000/api/v3",
loginEndpoint: "/auth/login",
tokenPrefix: "Bearer",
username: "admin",
password: "27f5fd86ae68fe740eef42b8bbd1d7d5",
secondaryUsername: "archiveManager",
Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/datasets/datasets-attachment.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ describe("Dataset attachments", () => {
beforeEach(() => {
cy.login(Cypress.env("username"), Cypress.env("password"));

cy.intercept("POST", "/api/v3/Datasets/**/*").as("upload");
cy.intercept("POST", "/api/v3/datasets/**/*").as("upload");
});

after(() => {
Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/datasets/datasets-datafiles.cy.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
describe("Dataset datafiles", () => {
beforeEach(() => {
cy.login(Cypress.env("username"), Cypress.env("password"));
cy.intercept("PATCH", "/api/v3/Datasets/**/*").as("change");
cy.intercept("PATCH", "/api/v3/datasets/**/*").as("change");
cy.intercept("GET", "*").as("fetch");
});

Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/datasets/datasets-keyword.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ describe("Datasets", () => {
beforeEach(() => {
cy.login(Cypress.env("username"), Cypress.env("password"));

cy.intercept("PATCH", "/api/v3/Datasets/**/*").as("keyword");
cy.intercept("PATCH", "/api/v3/datasets/**/*").as("keyword");
cy.intercept("GET", "*").as("fetch");
});

Expand Down
4 changes: 3 additions & 1 deletion cypress/e2e/datasets/datasets-metadata.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ describe("Datasets", () => {
beforeEach(() => {
cy.login(Cypress.env("username"), Cypress.env("password"));

cy.intercept("PATCH", "/api/v3/Datasets/**/*").as("metadata");
cy.intercept("PATCH", "/api/v3/datasets/**/*").as("metadata");
cy.intercept("GET", "*").as("fetch");
});

Expand Down Expand Up @@ -67,6 +67,8 @@ describe("Datasets", () => {

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

cy.finishedLoading();

cy.wait("@metadata").then(({ request, response }) => {
expect(request.method).to.eq("PATCH");
expect(response.statusCode).to.eq(200);
Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/datasets/datasets-public.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ describe("Datasets", () => {

cy.createDataset("raw");

cy.intercept("PATCH", "/api/v3/Datasets/**/*").as("change");
cy.intercept("PATCH", "/api/v3/datasets/**/*").as("change");
cy.intercept("GET", "*").as("fetch");
});

Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/datasets/datasets-reduce.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ describe("Datasets", () => {
beforeEach(() => {
cy.login(Cypress.env("username"), Cypress.env("password"));

cy.intercept("PATCH", "/api/v3/Datasets/**/*").as("metadata");
cy.intercept("PATCH", "/api/v3/datasets/**/*").as("metadata");
cy.intercept("GET", "*").as("fetch");
});

Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/other/policy-delegate.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ describe("Policies", () => {
beforeEach(() => {
cy.login(Cypress.env("username"), Cypress.env("password"));

cy.intercept("POST", "/api/v3/Policies/**/*").as("update");
cy.intercept("POST", "/api/v3/policies/**/*").as("update");
cy.intercept("GET", "*").as("fetch");
});

Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/other/users-login.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ describe("Users Login", () => {
const guestUsername = Cypress.env("guestUsername");
const guestPassword = Cypress.env("guestPassword");

const loginEndpoint = Cypress.env("lbLoginEndpoint");
const loginEndpoint = Cypress.env("loginEndpoint");

beforeEach(() => {
cy.intercept("POST", "**/auth/msad").as("adLogin");
Expand Down
Loading