Skip to content

Test/automate/resource management/team-view-tests#708

Merged
jayson31 merged 11 commits intodevelopfrom
test/automate/resource-management/TC55-TC63
Aug 5, 2025
Merged

Test/automate/resource management/team-view-tests#708
jayson31 merged 11 commits intodevelopfrom
test/automate/resource-management/TC55-TC63

Conversation

@jayson31
Copy link
Copy Markdown
Collaborator

@jayson31 jayson31 commented Aug 1, 2025

Description

Updated tests for Resource management >> Team View.

  1. TC56
  2. TC57
  3. TC58
  4. TC59
  5. TC60
  6. TC61
  7. TC62
  8. TC68

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

  • I have carefully reviewed the code before submitting it for review.
  • This code is adequately covered by unit tests to validate its functionality.
  • I have conducted thorough testing to ensure it functions as intended.
  • A member of the QA team has reviewed and tested this PR (To be checked by QA or code reviewer)

@jayson31 jayson31 requested a review from maharrshi August 1, 2025 17:24
@maharrshi
Copy link
Copy Markdown
Collaborator

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
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jayson31 , please use playwright locator here

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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;
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rename variable to managerName

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated

test.describe("Manager : Resource Management Tab", () => {
test("TC56: Validate the search functionality", async () => {
allure.story("Resource Management");
await teamPage.goto();
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

move the goto to beforeEach hook

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are tests redirecting to:

  1. Resource Management > Timeline
  2. Resource Management > Team
  3. Resource Management > Project

in this spec file so we cannot add the go to command in the before each.

@jayson31 jayson31 changed the title Test/automate/resource management/tc55 tc63 Test/automate/resource management/team-view-tests Aug 4, 2025
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} /`);
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated for TC61

@jayson31 jayson31 merged commit 74e8dc7 into develop Aug 5, 2025
8 of 10 checks passed
@jayson31 jayson31 deleted the test/automate/resource-management/TC55-TC63 branch August 5, 2025 10:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants