Skip to content

Commit

Permalink
modified the started from draft PR
Browse files Browse the repository at this point in the history
  • Loading branch information
nihal467 committed Mar 3, 2024
1 parent a631c35 commit 3794ad6
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
8 changes: 5 additions & 3 deletions cypress/e2e/users_spec/user_manage.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ describe("Manage User", () => {
userPage.typeInSearchInput(usernameforworkinghour);
userPage.checkUsernameText(usernameforworkinghour);
manageUserPage.clicklinkedskillbutton();
manageUserPage.selectFacilityFromDropdown(linkedskill);
manageUserPage.selectSkillFromDropdown(linkedskill);
manageUserPage.clickAddSkillButton();
manageUserPage.clickCloseSlideOver();
cy.wait(5000);
Expand All @@ -59,15 +59,15 @@ describe("Manage User", () => {
userPage.typeInSearchInput(usernametolinkskill);
userPage.checkUsernameText(usernametolinkskill);
manageUserPage.clicklinkedskillbutton();
manageUserPage.selectFacilityFromDropdown(linkedskill);
manageUserPage.selectSkillFromDropdown(linkedskill);
manageUserPage.clickAddSkillButton();
manageUserPage.clickCloseSlideOver();
cy.wait(5000); // temporary hack to fix the failure
manageUserPage.clicklinkedskillbutton();
manageUserPage.assertSkillInAddedUserSkills(linkedskill);
manageUserPage.clickUnlinkSkill();
manageUserPage.clickSubmit();
manageUserPage.selectFacilityFromDropdown(linkedskill);
manageUserPage.selectSkillFromDropdown(linkedskill);
manageUserPage.clickAddSkillButton();
manageUserPage.clickCloseSlideOver();
// verifying the doctor connect
Expand Down Expand Up @@ -104,6 +104,8 @@ describe("Manage User", () => {
manageUserPage.clickFacilitiesTab();
manageUserPage.selectFacilityFromDropdown(facilitytolinkusername);
manageUserPage.clickLinkFacility();
manageUserPage.clickCloseSlideOver();
manageUserPage.clickFacilitiesTab();
manageUserPage.assertLinkedFacility(facilitytolinkusername);
// Verify in the already linked facility are not present in droplist
manageUserPage.assertFacilityNotInDropdown(facilitytolinkusername);
Expand Down
5 changes: 4 additions & 1 deletion cypress/pageobject/Users/ManageUserPage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,13 @@ export class ManageUserPage {
}

selectFacilityFromDropdown(facilityName) {
cy.wait(2000);
cy.searchAndSelectOption("input[name='facility']", facilityName);
}

selectSkillFromDropdown(skill) {
cy.searchAndSelectOption("input[name='skill']", skill);
}

clickLinkFacility() {
cy.get("#link-facility").click();
}
Expand Down

0 comments on commit 3794ad6

Please sign in to comment.