diff --git a/e2e-test/cypress/integration/documents_spec.js b/e2e-test/cypress/integration/documents_spec.js index 377f1fc86..c864408fc 100644 --- a/e2e-test/cypress/integration/documents_spec.js +++ b/e2e-test/cypress/integration/documents_spec.js @@ -4,21 +4,15 @@ let projectId; let subprojectId; let workflowitemId; let baseUrl, apiRoute; -let isExternalStorageEnabled = false; // Actual file in fixture folder const fileName = "documents_test.json"; -describe("Attaching a document to a workflowitem.", function () { +describe("Attaching a document to a workflowitem.", function() { before(() => { baseUrl = Cypress.env("API_BASE_URL") || `${Cypress.config("baseUrl")}/test`; apiRoute = baseUrl.toLowerCase().includes("test") ? "/test/api" : "/api"; cy.login(); - cy.getVersion().then(data => { - if (data.storage && data.storage.release) { - isExternalStorageEnabled = true; - } - }); cy.createProject("documents test project", "workflowitem documents test", []) .then(({ id }) => { projectId = id; @@ -34,7 +28,7 @@ describe("Attaching a document to a workflowitem.", function () { }); }); - beforeEach(function () { + beforeEach(function() { cy.login(); cy.visit(`/projects/${projectId}/${subprojectId}`); }); @@ -60,7 +54,7 @@ describe("Attaching a document to a workflowitem.", function () { return cy.get("[data-test=workflowitemDocumentFileName]").should("contain", fileName); }; - it("A document can be validated.", function () { + it("A document can be validated.", function() { cy.intercept(apiRoute + "/workflowitem.update*").as("update"); cy.intercept(apiRoute + "/subproject.viewDetails*").as("viewDetails"); cy.intercept(apiRoute + "/workflowitem.validate*").as("validate"); @@ -97,7 +91,7 @@ describe("Attaching a document to a workflowitem.", function () { .should("contain", "Identical"); }); - it("Validation of wrong document fails.", function () { + it("Validation of wrong document fails.", function() { cy.intercept(apiRoute + "/workflowitem.update*").as("update"); cy.intercept(apiRoute + "/subproject.viewDetails*").as("viewDetails"); cy.intercept(apiRoute + "/workflowitem.validate*").as("validate"); @@ -135,7 +129,7 @@ describe("Attaching a document to a workflowitem.", function () { .should("contain", "Different"); }); - it("The filename and document name are shown correctly", function () { + it("The filename and document name are shown correctly", function() { cy.intercept(apiRoute + "/workflowitem.update*").as("update"); cy.intercept(apiRoute + "/subproject.viewDetails*").as("viewDetails"); cy.intercept(apiRoute + "/workflowitem.validate*").as("validate"); @@ -161,7 +155,7 @@ describe("Attaching a document to a workflowitem.", function () { // Check document name cy.get("[data-test=workflowitemDocumentFileName]") .should("be.visible") + .first() .contains(fileName); - }); });