Skip to content

Commit

Permalink
test: add file upload to cypress test
Browse files Browse the repository at this point in the history
  • Loading branch information
BCerki committed Jun 28, 2023
1 parent 43e6923 commit 593e03b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
Binary file added app/cypress/e2e/cif/fixtures/mock.pdf
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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", () => {
Expand Down

0 comments on commit 593e03b

Please sign in to comment.