-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
21e1c11
commit a0932a5
Showing
1 changed file
with
26 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"); | ||
}); | ||
}); | ||
}); |