Skip to content

Commit

Permalink
Added Status PCP Task Change Test
Browse files Browse the repository at this point in the history
  • Loading branch information
adrian-rmz committed Jun 14, 2024
1 parent 21e1c11 commit a0932a5
Showing 1 changed file with 26 additions and 3 deletions.
29 changes: 26 additions & 3 deletions cypress/e2e/pcp.cy.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,36 @@
describe("PCP", () => {
beforeEach(() => {
cy.visit("/");
cy.wait(8000);
cy.get("label").contains("Email").click().type("[email protected]");
cy.get("label").contains("Password").click().type("cypress");
cy.get("button").contains("Log in").click();
cy.wait(15000);
cy.wait(12000);
cy.url().should("include", "/dashboard");
cy.visit("/pcp");
cy.wait(15000);
cy.wait(8000);
});

describe("PCP", () => {
beforeEach(() => {
cy.visit("/");
cy.get("label").contains("Email").click().type("[email protected]");
cy.get("label").contains("Password").click().type("cypress");
cy.get("button").contains("Log in").click();
cy.wait(12000);
cy.url().should("include", "/dashboard");
cy.visit("/pcp");
cy.wait(8000);
});

it("Should change the status of the task", () => {
const statusButton = cy.get('[data-testid="task-status-button"]');
statusButton.should("exist");
statusButton.click();
cy.get('[data-testid="IN_PROGRESS"]').click();

cy.get("div")
.contains("Task status updated successfully")
.should("exist");
});
});
});

0 comments on commit a0932a5

Please sign in to comment.