Test/automate/resource management/team-view-tests#708
Conversation
|
Please update PR title |
| constructor(page) { | ||
| super(page); | ||
| this.deleteButton = page.getByRole("img", { name: "Delete" }); | ||
| this.firstEmployeeFromTable = page.locator("table:nth-child(1) tbody > div:nth-child(1) p").first(); // using locator to fetch dynamically the first employee |
There was a problem hiding this comment.
@jayson31 , please use playwright locator here
There was a problem hiding this comment.
We need to add .locator here as this fetches the first employee name from the list. This is used to fetch the first employee after filtering.
| let teamPage; | ||
| let projectPage; | ||
| let createdAllocations = []; | ||
| let adminName = process.env.REP_MAN_NAME; |
There was a problem hiding this comment.
rename variable to managerName
| test.describe("Manager : Resource Management Tab", () => { | ||
| test("TC56: Validate the search functionality", async () => { | ||
| allure.story("Resource Management"); | ||
| await teamPage.goto(); |
There was a problem hiding this comment.
move the goto to beforeEach hook
There was a problem hiding this comment.
There are tests redirecting to:
- Resource Management > Timeline
- Resource Management > Team
- Resource Management > Project
in this spec file so we cannot add the go to command in the before each.
…ping allocation deletion
| await teamPage.selectView("Actual vs Planned"); | ||
| await expect(page.getByText(`${actualHours} /`).first()).toBeVisible(); | ||
| await teamPage.selectView("Planned vs Capacity"); | ||
| await expect(page.locator("body")).not.toContainText(`${actualHours} /`); |
There was a problem hiding this comment.
instead of 0 / 40 , can you please make use of the payload information and use those variables here.. That way it will be easy to modify any values if needed.
Description
Updated tests for Resource management >> Team View.
Test case details can be found at: https://docs.google.com/spreadsheets/d/1ezVa3BnqkgUlJEeOmc_cYCoT3b3JhQ8nGvAOk-W7Q6g/edit?pli=1&gid=1778975438#gid=1778975438
Relevant Technical Choices
Testing Instructions
Additional Information:
Screenshot/Screencast
Checklist