Skip to content

Commit

Permalink
Update input fields with click before clearing and typing
Browse files Browse the repository at this point in the history
  • Loading branch information
Ashesh3 committed Jan 10, 2024
1 parent 89127d8 commit 64523a9
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions cypress/pageobject/Users/UserProfilePage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export default class UserProfilePage {
}

typeAge(age: string) {
cy.get("#age").clear().type(age);
cy.get("#age").click().clear().type(age);
}

selectGender(gender: string) {
Expand All @@ -25,31 +25,32 @@ export default class UserProfilePage {
}

typeEmail(email: string) {
cy.get("#email").clear().type(email);
cy.get("#email").click().clear().type(email);
}

typePhone(phone: string) {
cy.get("#phoneNumber").clear().type(phone);
cy.get("#phoneNumber").click().clear().type(phone);
}

typeWhatsApp(phone: string) {
cy.get("#altPhoneNumber").clear().type(phone);
cy.get("#altPhoneNumber").click().clear().type(phone);
}

typeWorkingHours(workinghours: string) {
cy.get("#weekly_working_hours").clear().type(workinghours);
cy.get("#weekly_working_hours").click().clear().type(workinghours);
}

typeDoctorQualification = (doctorQualification: string) => {
cy.get("#doctor_qualification").clear().type(doctorQualification);
cy.get("#doctor_qualification").click().clear().type(doctorQualification);
};

typeDoctorYoE = (doctorYoE: string) => {
cy.get("#doctor_experience_commenced_on").clear().type(doctorYoE);
cy.get("#doctor_experience_commenced_on").click().clear().type(doctorYoE);
};

typeMedicalCouncilRegistration = (medicalCouncilRegistration: string) => {
cy.get("#doctor_medical_council_registration")
.click()
.clear()
.type(medicalCouncilRegistration);
};
Expand Down

0 comments on commit 64523a9

Please sign in to comment.