Skip to content

Commit

Permalink
fix e2e test error on electron browser
Browse files Browse the repository at this point in the history
  • Loading branch information
Junjiequan committed Feb 7, 2025
1 parent d70575d commit ba565bb
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions cypress/e2e/datasets/datasets-datafiles.cy.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
describe("Dataset datafiles", () => {
beforeEach(() => {
cy.readFile("CI/e2e/frontend.config.e2e.json").then((baseConfig) => {
cy.intercept("GET", "**/admin/config", baseConfig).as(
"getFrontendConfig",
);
});
cy.login(Cypress.env("username"), Cypress.env("password"));
cy.intercept("PATCH", "/api/v3/datasets/**/*").as("change");
cy.intercept("GET", "*").as("fetch");
cy.visit("/");
});

after(() => {
Expand All @@ -11,10 +17,10 @@ describe("Dataset datafiles", () => {

describe("Datafiles action test", () => {
const actionUrl = {
downloadSelected: "https://www.scicat.info/download/selected",
downloadAll: "https://www.scicat.info/download/all",
notebookSelected: "https://www.scicat.info/notebook/selected",
notebookAll: "https://www.scicat.info/notebook/all",
downloadSelected: "http://localhost:4200/download/selected",
downloadAll: "http://localhost:4200/download/all",
notebookSelected: "http://localhost:4200/notebook/selected",
notebookAll: "http://localhost:4200/notebook/all",
};
it("Should be able to download/notebook with selected/all", () => {
cy.createDataset("raw", undefined, "small");
Expand Down

0 comments on commit ba565bb

Please sign in to comment.