Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rewriting UsersCreation.cy.ts according to POM approach #8930

Merged
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
e98e99f
removed ClickElementById function from UsersCreation.cy.ts
AnveshNalimela Oct 25, 2024
5479921
Update .env
AnveshNalimela Oct 27, 2024
d47a676
Removed ClickELementById from userCreation.ts
AnveshNalimela Oct 27, 2024
a1ac783
updated .env
AnveshNalimela Oct 27, 2024
b4d9129
Merge branch 'remove-clickElementById/#8929' of https://github.com/An…
AnveshNalimela Oct 27, 2024
2d81b26
Added functions in pageobject/usercreation.ts according to POM approch
AnveshNalimela Oct 27, 2024
086eb6b
Rewrite user creation.cy.ts
AnveshNalimela Oct 28, 2024
daa6deb
Resloving conflicts
AnveshNalimela Nov 1, 2024
5ac2a1c
Finsihed Writing UserCreation.cy.ts
AnveshNalimela Nov 1, 2024
8f98d25
Merge branch 'develop' into remove-clickElementById/#8929
AnveshNalimela Nov 2, 2024
5deaa38
Merge branch 'develop' into remove-clickElementById/#8929
AnveshNalimela Nov 4, 2024
21fb0b2
Merge branch 'develop' into remove-clickElementById/#8929
AnveshNalimela Nov 5, 2024
6e78b30
clear and type functions are defined
AnveshNalimela Nov 5, 2024
012f68e
trying to reslove
AnveshNalimela Nov 7, 2024
b075b33
Merge branch 'ohcnetwork:develop' into remove-clickElementById/#8929
AnveshNalimela Nov 8, 2024
057f1e2
Merge branch 'develop' into remove-clickElementById/#8929
AnveshNalimela Nov 8, 2024
9a0a15e
Merge branch 'remove-clickElementById/#8929' of https://github.com/An…
AnveshNalimela Nov 8, 2024
b7950cd
Merge branch 'develop' into remove-clickElementById/#8929
nihal467 Nov 8, 2024
7aaa96a
Merge branch 'develop' into remove-clickElementById/#8929
AnveshNalimela Nov 9, 2024
d231102
made changes mentioned by coderrabit
AnveshNalimela Nov 10, 2024
b3850f2
Merge branch 'ohcnetwork:develop' into remove-clickElementById/#8929
AnveshNalimela Nov 10, 2024
4cdbdfa
ALtPhoneNumber function crrrected
AnveshNalimela Nov 10, 2024
908926e
Merge branch 'remove-clickElementById/#8929' of github.com:AnveshNali…
AnveshNalimela Nov 10, 2024
289421e
Merge branch 'develop' into remove-clickElementById/#8929
AnveshNalimela Nov 11, 2024
fcceae4
made few changes suggested by coderrabit
AnveshNalimela Nov 11, 2024
926535d
Merge branch 'develop' into remove-clickElementById/#8929
AnveshNalimela Nov 13, 2024
9ab927a
made requested changes
AnveshNalimela Nov 13, 2024
54e9abe
Merge branch 'develop' into remove-clickElementById/#8929
AnveshNalimela Nov 15, 2024
c021f4e
PhoneNumber changes revered
AnveshNalimela Nov 15, 2024
6a56e6f
Merge branch 'develop' into remove-clickElementById/#8929
nihal467 Nov 18, 2024
f70faa3
Merged into develop
AnveshNalimela Nov 26, 2024
54b420f
Merge branch 'remove-clickElementById/#8929' of github.com:AnveshNali…
AnveshNalimela Nov 26, 2024
92fde8b
Made requested changes
AnveshNalimela Nov 26, 2024
8a7b927
Merge branch 'ohcnetwork:develop' into remove-clickElementById/#8929
AnveshNalimela Nov 26, 2024
e735efa
made suggestions from the code rabbit
AnveshNalimela Nov 26, 2024
535e641
Merge branch 'remove-clickElementById/#8929' of github.com:AnveshNali…
AnveshNalimela Nov 26, 2024
b51a349
updated package-lock.json
AnveshNalimela Nov 26, 2024
3593709
Merge branch 'ohcnetwork:develop' into remove-clickElementById/#8929
AnveshNalimela Nov 27, 2024
0c5135f
fix line endings
rithviknishad Nov 28, 2024
ad5da79
coderabbit suggestions
nihal467 Nov 29, 2024
66c8064
number variable modified
nihal467 Nov 29, 2024
cd7c551
removed hard code
nihal467 Nov 29, 2024
360c540
secure the phone number generation
nihal467 Nov 29, 2024
e24c032
add missing # to id
nihal467 Nov 29, 2024
bacfc8a
Merge branch 'develop' into remove-clickElementById/#8929
nihal467 Nov 29, 2024
185e6f3
modified the bed name
nihal467 Nov 29, 2024
5bf8c5d
Merge branch 'remove-clickElementById/#8929' of https://github.com/An…
nihal467 Nov 29, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,4 @@ CARE_CDN_URL="https://egov-s3-facility-10bedicu.s3.amazonaws.com https://egov-s3
REACT_ALLOWED_LOCALES="en,hi,ta,ml,mr,kn"

REACT_ENABLED_APPS="ohcnetwork/care_livekit_fe@main"
REACT_CARE_API_URL=http://127.0.0.1:9000
AnveshNalimela marked this conversation as resolved.
Show resolved Hide resolved
27 changes: 14 additions & 13 deletions cypress/e2e/users_spec/UsersCreation.cy.ts
AnveshNalimela marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import LoginPage from "../../pageobject/Login/LoginPage";
import { AssetSearchPage } from "../../pageobject/Asset/AssetSearch";
import FacilityPage from "../../pageobject/Facility/FacilityCreation";
import { UserPage } from "../../pageobject/Users/UserSearch";
import LoginPage from "../../pageobject/Login/LoginPage";
import { UserCreationPage } from "../../pageobject/Users/UserCreation";
import { UserPage } from "../../pageobject/Users/UserSearch";
import {
generatePhoneNumber,
generateEmergencyPhoneNumber,
generatePhoneNumber,
} from "../../pageobject/utils/constants";

describe("User Creation", () => {
Expand Down Expand Up @@ -66,13 +66,13 @@ describe("User Creation", () => {
});

it("Update the existing user profile and verify its reflection", () => {
userCreationPage.clickElementById("user-profile-name");
userCreationPage.clickElementById("profile-button");
cy.get("#user-profile-name").click();
cy.get("#profile-button").click();
userCreationPage.verifyElementContainsText(
"username-profile-details",
AnveshNalimela marked this conversation as resolved.
Show resolved Hide resolved
"devdistrictadmin",
);
userCreationPage.clickElementById("edit-cancel-profile-button");
cy.get("#edit-cancel-profile-button").click();
userCreationPage.typeIntoElementByIdPostClear(
"firstName",
AnveshNalimela marked this conversation as resolved.
Show resolved Hide resolved
"District Editted",
Expand All @@ -90,7 +90,7 @@ describe("User Creation", () => {
"date_of_birth",
"01011998",
);
userCreationPage.clickElementById("submit");
cy.submitButton("Update");
userCreationPage.verifyElementContainsText(
"contactno-profile-details",
AnveshNalimela marked this conversation as resolved.
Show resolved Hide resolved
"+91" + phone_number,
Expand Down Expand Up @@ -126,15 +126,16 @@ describe("User Creation", () => {
});

it("Update the existing user profile Form Mandatory File Error", () => {
userCreationPage.clickElementById("user-profile-name");
userCreationPage.clickElementById("profile-button");
userCreationPage.clickElementById("edit-cancel-profile-button");
cy.get("#user-profile-name").click();
cy.get("#profile-button").click();
cy.get("#edit-cancel-profile-button").click();

userCreationPage.clearIntoElementById("firstName");
userCreationPage.clearIntoElementById("lastName");
AnveshNalimela marked this conversation as resolved.
Show resolved Hide resolved
userCreationPage.clearIntoElementById("phoneNumber");
userCreationPage.clearIntoElementById("altPhoneNumber");
userCreationPage.clearIntoElementById("weekly_working_hours");
userCreationPage.clickElementById("submit");
cy.submitButton("Update");
userCreationPage.verifyErrorMessages(EXPECTED_PROFILE_ERROR_MESSAGES);
});

Expand Down Expand Up @@ -180,8 +181,8 @@ describe("User Creation", () => {
});

it("create new user form throwing mandatory field error", () => {
userCreationPage.clickElementById("addUserButton");
userCreationPage.clickElementById("submit");
cy.get("#addUserButton").click();
cy.submitButton("Save User");
cy.wait(2000);
userCreationPage.verifyErrorMessages(EXPECTED_ERROR_MESSAGES);
});
Expand Down
Loading