Skip to content

Commit

Permalink
Merge branch 'develop' into issue/9374/Upgrade_cypress_ci_node_version
Browse files Browse the repository at this point in the history
  • Loading branch information
AdityaJ2305 authored Dec 11, 2024
2 parents ddc98a8 + bd19bcb commit 6b103f9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
5 changes: 3 additions & 2 deletions cypress/e2e/users_spec/UsersManage.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ describe("Manage User", () => {

beforeEach(() => {
cy.restoreLocalStorage();
cy.viewport(1280, 720);
cy.clearLocalStorage(/filters--.+/);
cy.awaitUrl("/users");
});
Expand Down Expand Up @@ -233,7 +234,7 @@ describe("Manage User", () => {
cy.wait(500);
manageUserPage.verifyLinkedSkillsTabPage();
manageUserPage.selectSkillFromDropdown(linkedskill);
manageUserPage.clickAddSkillButton();
manageUserPage.clickAddSkillButton(usernameforworkinghour);
cy.wait(500);
manageUserPage.assertSkillInAddedUserSkills(linkedskill);
cy.wait(500);
Expand Down Expand Up @@ -268,7 +269,7 @@ describe("Manage User", () => {
manageUserPage.clickLinkedSkillTab();
manageUserPage.verifyLinkedSkillsTabPage();
manageUserPage.selectSkillFromDropdown(linkedskill);
manageUserPage.clickAddSkillButton();
manageUserPage.clickAddSkillButton(usernameToLinkSkill);
cy.verifyNotification("Skill added successfully");
cy.closeNotification();
manageUserPage.assertSkillInAddedUserSkills(linkedskill);
Expand Down
7 changes: 5 additions & 2 deletions cypress/pageobject/Users/ManageUserPage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ export class ManageUserPage {
}

clearProfessionalInfo() {
cy.get("input[name='weekly_working_hours']").scrollIntoView();
cy.get("input[name='weekly_working_hours']").click().clear();
cy.get("input[name='video_connect_link']").click().clear();
}
Expand Down Expand Up @@ -180,6 +181,7 @@ export class ManageUserPage {
}

typeInWeeklyWorkingHours(hours: string) {
cy.get("input[name='weekly_working_hours']").scrollIntoView();
cy.get("input[name='weekly_working_hours']").click().type(hours);
}

Expand All @@ -191,6 +193,7 @@ export class ManageUserPage {
}

verifyWorkingHours(expectedHours: string) {
cy.get("input[name='weekly_working_hours']").scrollIntoView();
cy.get("input[name='weekly_working_hours']").should("be.visible");
cy.get("input[name='weekly_working_hours']").should(
"have.value",
Expand Down Expand Up @@ -359,8 +362,8 @@ export class ManageUserPage {
cy.get("[data-testid='user-delete-button']").click();
}

clickAddSkillButton() {
cy.intercept("GET", "**/api/v1/skill/**").as("getSkills");
clickAddSkillButton(username: string) {
cy.intercept("GET", `**/api/v1/users/${username}/skill/**`).as("getSkills");
cy.get("#add-skill-button").click();
cy.wait("@getSkills").its("response.statusCode").should("eq", 200);
}
Expand Down

0 comments on commit 6b103f9

Please sign in to comment.