diff --git a/app/cypress/e2e/cif/fixtures/mock.pdf b/app/cypress/e2e/cif/fixtures/mock.pdf new file mode 100644 index 0000000000..8a0b6a4f58 Binary files /dev/null and b/app/cypress/e2e/cif/fixtures/mock.pdf differ diff --git a/app/cypress/e2e/cif/project-revision/create-first-project-revision.cy.js b/app/cypress/e2e/cif/project-revision/create-first-project-revision.cy.js index 007ecbcf10..45051536a1 100644 --- a/app/cypress/e2e/cif/project-revision/create-first-project-revision.cy.js +++ b/app/cypress/e2e/cif/project-revision/create-first-project-revision.cy.js @@ -167,6 +167,8 @@ describe("when creating a project, the project page", () => { // Add attachments cy.url().should("include", "/form/8"); + cy.get("input[type=file]").selectFile("cypress/e2e/cif/fixtures/mock.pdf"); + cy.findByText("mock.pdf").should("be.visible"); cy.findByText(/Submit project attachments/i).click(); //review and submit @@ -284,6 +286,10 @@ describe("when creating a project, the project page", () => { cy.findByText("TEST-123-12345").should("be.visible"); // this checks that the project view list shows the milestone report status vs. the other report statuses cy.findAllByRole("status").should("have.text", "Complete"); + + // cleanup attachments + + cy.visit("/delete/${attachmentId}"); }); it("allows an admin user to create an IA project", () => {