From 7359cc114375385b9bd0d06afaeacd48a8b49e80 Mon Sep 17 00:00:00 2001 From: Jacobjohnjeevan Date: Tue, 10 Dec 2024 16:44:53 +0530 Subject: [PATCH] test fix --- cypress/e2e/users_spec/UsersCreation.cy.ts | 9 +++------ cypress/pageobject/Users/UserCreation.ts | 2 +- public/locale/en.json | 2 +- 3 files changed, 5 insertions(+), 8 deletions(-) diff --git a/cypress/e2e/users_spec/UsersCreation.cy.ts b/cypress/e2e/users_spec/UsersCreation.cy.ts index 947d5b6ce87..d93707617ff 100644 --- a/cypress/e2e/users_spec/UsersCreation.cy.ts +++ b/cypress/e2e/users_spec/UsersCreation.cy.ts @@ -43,7 +43,7 @@ describe("User Creation", () => { "Please enter valid phone number", "Please enter the username", "Please enter date in DD/MM/YYYY format", - "Please enter the password", + "Password is required", "Confirm password is required", "First Name is required", "Last Name is required", @@ -164,13 +164,10 @@ describe("User Creation", () => { cy.verifyNotification("User added successfully"); userPage.typeInSearchInput(username); userPage.checkUsernameText(username); - cy.verifyContentPresence("#name", [newUserFirstName]); + cy.verifyContentPresence(`#name-${username}`, [newUserFirstName]); cy.verifyContentPresence("#role", [role]); cy.verifyContentPresence("#district", [district]); - cy.verifyContentPresence("#home_facility", [homeFacility]); - cy.verifyContentPresence("#qualification", [qualification]); - cy.verifyContentPresence("#doctor-experience", [experience]); - cy.verifyContentPresence("#medical-council-registration", [regNo]); + cy.verifyContentPresence("#home-facility", [homeFacility]); }); it("create new user form throwing mandatory field error", () => { diff --git a/cypress/pageobject/Users/UserCreation.ts b/cypress/pageobject/Users/UserCreation.ts index d8d386402b7..26eaa088e23 100644 --- a/cypress/pageobject/Users/UserCreation.ts +++ b/cypress/pageobject/Users/UserCreation.ts @@ -46,6 +46,6 @@ export class UserCreationPage { } clickSaveUserButton() { - cy.clickSubmitButton("Save User"); + cy.clickSubmitButton("Submit"); } } diff --git a/public/locale/en.json b/public/locale/en.json index 2e4b8b8f355..9f0bc5ecf12 100644 --- a/public/locale/en.json +++ b/public/locale/en.json @@ -1495,7 +1495,7 @@ "uploading": "Uploading", "use_existing_abha_address": "Use Existing ABHA Address", "user_add_error": "Error while adding User", - "user_added_successfully": "User Added successfully", + "user_added_successfully": "User added successfully", "user_delete_error": "Error while deleting User", "user_deleted_successfully": "User Deleted Successfully", "user_details": "User Details",