From 9817da704d699759ad7d5d9fd1f74e547995840c Mon Sep 17 00:00:00 2001 From: Henry Oforeh Date: Fri, 20 Oct 2023 14:00:17 -0600 Subject: [PATCH] fix bug. --- services/core-web/cypress/e2e/majorprojects.cy.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/services/core-web/cypress/e2e/majorprojects.cy.ts b/services/core-web/cypress/e2e/majorprojects.cy.ts index 87d131726b..11062c5495 100644 --- a/services/core-web/cypress/e2e/majorprojects.cy.ts +++ b/services/core-web/cypress/e2e/majorprojects.cy.ts @@ -21,14 +21,12 @@ describe("Major Projects", () => { it("should upload a document successfully", () => { - cy.intercept("PATCH", "/documents/**").as("patchRequest"); - cy.intercept("GET", "/mines/documents/upload/**").as("getRequest1"); - cy.intercept("GET", "/mines/documents/upload/**").as("getRequest2"); + cy.intercept("GET", `${Cypress.env("CYPRESS_API_URL")}/mines/documents/upload/**`).as("getRequest"); // Access the file input element and attach a file from the fixtures directory. cy.get('input[type="file"]').scrollIntoView().attachFile('dummy.pdf'); - cy.wait(["@patchRequest", "@getRequest1", "@getRequest2"], { timeout: 25000 }); + cy.wait("@getRequest", { timeout: 25000 }); cy.get('.filepond--file-status-main').should('have.text', 'Upload complete');