Skip to content

Commit

Permalink
Further migrations
Browse files Browse the repository at this point in the history
  • Loading branch information
psrok1 committed Jul 15, 2024
1 parent 378c0dc commit 867b48c
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 11 deletions.
3 changes: 1 addition & 2 deletions tests/frontend/cypress/e2e/blob.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,7 @@ describe("Blob view test - mwdb-core", function () {

cy.get("@blobId").then((blobId) => {
cy.get('.d-none a[href*="' + blobId + '"] > div').click({ force: true });
cy.server()
.route("GET", "/api/blob/" + blobId)
cy.intercept("GET", "/api/blob/" + blobId)
.as("dataGetFirst");
});

Expand Down
13 changes: 6 additions & 7 deletions tests/frontend/cypress/e2e/sample.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,13 @@ describe("Sample view test - mwdb-core", function () {
const addedFile = new Cypress.Promise((resolve) => {
cy.get("@token").then((token) => {
cy.fixture(fileName).then((bin) => {
return Cypress.Blob.binaryStringToBlob(bin, fileType).then((blob) => {
const formData = new FormData();
formData.set("file", blob, fileName);
const blob = Cypress.Blob.binaryStringToBlob(bin, fileType);
const formData = new FormData();
formData.set("file", blob, fileName);

cy.formRequest(method, apiUrl, formData, token).then((response) => {
expect(response.status).to.eq(200);
resolve(response.response.body);
});
cy.formRequest(method, apiUrl, formData, token).then((response) => {
expect(response.status).to.eq(200);
resolve(response.response.body);
});
});
});
Expand Down
3 changes: 1 addition & 2 deletions tests/frontend/cypress/support/commands.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@

Cypress.Commands.add("formRequest", (method, url, formData, token) => {
return cy
.server()
.route(method, url)
.intercept(method, url)
.as("formRequest")
.window()
.then((win) => {
Expand Down

0 comments on commit 867b48c

Please sign in to comment.