Skip to content

Commit

Permalink
Merge pull request #8991 from ohcnetwork/staging
Browse files Browse the repository at this point in the history
November First Week [24.45.0] Production Release
  • Loading branch information
gigincg authored Nov 4, 2024
2 parents 6607fba + 62406b8 commit 0ab7af0
Show file tree
Hide file tree
Showing 96 changed files with 2,037 additions and 1,782 deletions.
8 changes: 4 additions & 4 deletions cypress/e2e/patient_spec/PatientConsultationCreation.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ describe("Patient Consultation in multiple combination", () => {
patientConsultationPage.selectPatientPrincipalDiagnosis(diagnosis4);
patientTreatmentPlan.clickAddProcedure();
patientTreatmentPlan.typeProcedureName(procedureName);
patientTreatmentPlan.typeProcedureTime("2024-02-22T12:30");
patientTreatmentPlan.typeProcedureTime("220220241230");
patientTreatmentPlan.typeTreatmentPlan(patientTreatment);
patientTreatmentPlan.typePatientGeneralInstruction(generalInstruction);
patientTreatmentPlan.typeSpecialInstruction(specialInstruction);
Expand Down Expand Up @@ -182,12 +182,12 @@ describe("Patient Consultation in multiple combination", () => {
patientConsultationPage.typeCauseOfDeath("Cause of Death");
patientConsultationPage.typePatientConsultationDate(
"#death_datetime",
"2024-02-22T12:45",
"220220241230",
);
patientConsultationPage.typeDeathConfirmedBy(doctorName);
patientConsultationPage.typePatientConsultationDate(
"#encounter_date",
"2024-02-22T12:30",
"220220241230",
);
cy.submitButton("Create Consultation");
cy.verifyNotification(
Expand Down Expand Up @@ -245,7 +245,7 @@ describe("Patient Consultation in multiple combination", () => {
);
patientConsultationPage.typePatientConsultationDate(
"#icu_admission_date",
"2024-02-23T12:30",
"230220241230",
);
// add investigation
patientInvestigation.clickAddInvestigation();
Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/patient_spec/PatientRegistration.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const getRelativeDateString = (deltaDays = 0) => {
month: "2-digit",
year: "numeric",
})
.replace("/", "");
.replace(/\//g, "");
};

describe("Patient Creation with consultation", () => {
Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/users_spec/UsersCreation.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ describe("User Creation", () => {
userCreationPage.typeIntoElementById("password", "Test@123");
userCreationPage.selectHomeFacility("Dummy Shifting Center");
userCreationPage.typeIntoElementById("phone_number", phone_number);
userCreationPage.setInputDate("date_of_birth", "date-input", "25081999");
userCreationPage.setInputDate("date_of_birth", "25081999");
userCreationPage.selectDropdownOption("user_type", "Doctor");
userCreationPage.typeIntoElementById("c_password", "Test@123");
userCreationPage.typeIntoElementById("qualification", "MBBS");
Expand Down
19 changes: 9 additions & 10 deletions cypress/pageobject/Asset/AssetCreation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,10 @@ export class AssetPage {
cy.get("[data-testid=asset-support-email-input] input").type(supportEmail);
cy.get("[data-testid=asset-vendor-name-input] input").type(vendorName);
cy.get("[data-testid=asset-serial-number-input] input").type(serialNumber);
cy.get(
"[data-testid=asset-last-serviced-on-input] input[type='text']",
).click();
cy.get("#date-input").click().type(lastServicedOn);
cy.clickAndTypeDate(
"[data-testid=asset-last-serviced-on-input]",
lastServicedOn,
);
cy.get("[data-testid=asset-notes-input] textarea").type(notes);
}

Expand Down Expand Up @@ -117,10 +117,10 @@ export class AssetPage {
cy.get("[data-testid=asset-vendor-name-input] input")
.clear()
.type(vendorName);
cy.get(
"[data-testid=asset-last-serviced-on-input] input[type='text']",
).click();
cy.get("#date-input").click().clear().type(lastServicedOn);
cy.clickAndTypeDate(
"[data-testid=asset-last-serviced-on-input]",
lastServicedOn,
);
cy.get("[data-testid=asset-notes-input] textarea").clear().type(notes);
}

Expand Down Expand Up @@ -267,8 +267,7 @@ export class AssetPage {
}

enterAssetservicedate(text: string) {
cy.get("input[name='last_serviced_on']").click();
cy.get("#date-input").click().type(text);
cy.clickAndTypeDate("input[name='last_serviced_on']", text);
}

scrollintoWarrantyDetails() {
Expand Down
3 changes: 1 addition & 2 deletions cypress/pageobject/Facility/FacilityCreation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -245,8 +245,7 @@ class FacilityPage {
}

fillEntryDate(date: string) {
cy.get("#entry_date").click();
cy.get("#date-input").click().type(date);
cy.clickAndTypeDate("#entry_date", date);
}

clickEditButton() {
Expand Down
2 changes: 1 addition & 1 deletion cypress/pageobject/Patient/PatientConsultation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ export class PatientConsultationPage {
}

typePatientConsultationDate(selector: string, date: string) {
cy.get(selector).clear().click().type(date);
cy.clickAndTypeDate(selector, date);
}

clickPatientDetails() {
Expand Down
10 changes: 3 additions & 7 deletions cypress/pageobject/Patient/PatientCreation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,7 @@ export class PatientPage {

typePatientDateOfBirth(dateOfBirth: string) {
cy.clickAndSelectOption("#patientAge", "DOB");
cy.get("#date_of_birth").scrollIntoView();
cy.get("#date_of_birth").should("be.visible").click();
cy.get("#date-input").click().type(dateOfBirth);
cy.clickAndTypeDate("#date_of_birth", dateOfBirth);
}

typePatientAge(age: string) {
Expand All @@ -80,13 +78,11 @@ export class PatientPage {
}

typeLastMenstruationStartDate(date: string) {
cy.get("#last_menstruation_start_date").click();
cy.get("#date-input").click().type(date);
cy.clickAndTypeDate("#last_menstruation_start_date", date);
}

typeDateOfDelivery(date: string) {
cy.get("#date_of_delivery").click();
cy.get("#date-input").click().type(date);
cy.clickAndTypeDate("#date_of_delivery", date);
}

clickPermanentAddress() {
Expand Down
2 changes: 1 addition & 1 deletion cypress/pageobject/Patient/PatientTreatmentPlan.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class PatientTreatmentPlan {
}

typeProcedureTime(time: string) {
cy.get("#procedure-time").type(time);
cy.clickAndTypeDate("#procedure-time", time);
}

typeTreatmentPlan(treatment: string) {
Expand Down
10 changes: 2 additions & 8 deletions cypress/pageobject/Shift/ShiftFilters.ts
Original file line number Diff line number Diff line change
Expand Up @@ -139,18 +139,12 @@ class ShiftingPage {
modified_date_end: string,
) {
this.createdDateStartInput().click();
cy.get("[id^='headlessui-popover-panel-'] .care-l-angle-left-b")
.eq(0)
.closest("button")
.click();
cy.get("[data-test-id='increment-date-range']").click();
cy.get(created_date_start).click();
cy.get(created_date_end).click();

this.modifiedDateStartInput().click();
cy.get("[id^='headlessui-popover-panel-'] .care-l-angle-left-b")
.eq(0)
.closest("button")
.click();
cy.get("[data-test-id='increment-date-range']").click();
cy.get(modified_date_start).click();
cy.get(modified_date_end).click();

Expand Down
12 changes: 3 additions & 9 deletions cypress/pageobject/Users/UserCreation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@ export class UserCreationPage {
.type(value);
}
typeIntoElementByIdPostClearDob(elementId: string, value: string) {
cy.get("#" + elementId).click();
cy.get("#date-input").clear().type(value);
cy.clickAndTypeDate("#" + elementId, value);
}
clearIntoElementById(elementId: string) {
cy.get("#" + elementId)
Expand Down Expand Up @@ -54,13 +53,8 @@ export class UserCreationPage {
this.selectOptionContainingText(name);
}

setInputDate(
dateElementId: string,
inputElementId: string,
dateValue: string,
) {
this.clickElementById(dateElementId);
this.typeIntoElementById(inputElementId, dateValue);
setInputDate(dateElementId: string, dateValue: string) {
cy.clickAndTypeDate("#" + dateElementId, dateValue);
}

selectDropdownOption(dropdownId: string, optionText: string) {
Expand Down
4 changes: 1 addition & 3 deletions cypress/pageobject/Users/UserProfilePage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,7 @@ export default class UserProfilePage {
}

typedate_of_birth(date_of_birth: string) {
//check
cy.get("#date_of_birth").click();
cy.get("#date-input").clear().type(date_of_birth);
cy.clickAndTypeDate("#date_of_birth", date_of_birth);
}

selectGender(gender: string) {
Expand Down
10 changes: 8 additions & 2 deletions cypress/support/commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -183,10 +183,16 @@ Cypress.Commands.add("selectRadioOption", (name: string, value: string) => {
cy.get(`input[type='radio'][name='${name}'][value=${value}]`).click();
});

Cypress.Commands.add("clickAndTypeDate", (selector: string, date: string) => {
Cypress.Commands.add("clickAndTypeDate", (selector, date) => {
cy.get(selector).scrollIntoView();
cy.get(selector).click();
cy.get("#date-input").click().type(date);
cy.get('[data-test-id="date-input"]:visible [data-time-input]').each((el) =>
cy.wrap(el).clear(),
);
cy.get(`[data-test-id="date-input"]:visible [data-time-input="0"]`)
.click()
.type(date);
cy.get("body").click(0, 0);
});

Cypress.Commands.add(
Expand Down
7 changes: 6 additions & 1 deletion src/CAREUI/interactive/SlideOver.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,12 @@ export default function SlideOver({
<h1 className="w-full text-xl font-black">{title}</h1>
</div>
</div>
<div className="flex-1 overflow-auto p-4">{children}</div>
<div
className="flex-1 overflow-auto p-4"
data-test-id="slide-over-container"
>
{children}
</div>
</div>
)}
</DialogPanel>
Expand Down
8 changes: 8 additions & 0 deletions src/Locale/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -316,6 +316,7 @@
"audio__allow_permission": "Please allow microphone permission in site settings",
"audio__allow_permission_button": "Click here to know how to allow",
"audio__allow_permission_helper": "You might have denied microphone access in the past.",
"audio__permission_message": "Please grant microphone permission to record audio.",
"audio__record": "Record Audio",
"audio__record_helper": "Click the button to start recording",
"audio__recorded": "Audio Recorded",
Expand Down Expand Up @@ -348,6 +349,7 @@
"bed_type__300": "Oxygen Supported Bed",
"bed_type__400": "Isolation Bed",
"bed_type__500": "Others",
"beta": "beta",
"bladder": "Bladder",
"blood_group": "Blood Group",
"blood_pressure_error": {
Expand Down Expand Up @@ -508,6 +510,7 @@
"customer_support_number": "Customer support number",
"cylinders": "Cylinders",
"cylinders_per_day": "Cylinders/day",
"daily_rounds": "Daily Rounds",
"date_and_time": "Date and Time",
"date_declared_positive": "Date of declaring positive",
"date_of_admission": "Date of Admission",
Expand Down Expand Up @@ -624,6 +627,7 @@
"error_while_deleting_record": "Error while deleting record",
"escape": "Escape",
"estimated_contact_date": "Estimated contact date",
"events": "Events",
"expand_sidebar": "Expand Sidebar",
"expected_burn_rate": "Expected Burn Rate",
"expired_on": "Expired On",
Expand Down Expand Up @@ -808,6 +812,8 @@
"max_dosage_24_hrs": "Max. dosage in 24 hrs.",
"max_dosage_in_24hrs_gte_base_dosage_error": "Max. dosage in 24 hours must be greater than or equal to base dosage",
"max_size_for_image_uploaded_should_be": "Max size for image uploaded should be",
"measured_after": "Measured after",
"measured_before": "Measured before",
"medical_council_registration": "Medical Council Registration",
"medical_worker": "Medical Worker",
"medicine": "Medicine",
Expand Down Expand Up @@ -1156,6 +1162,7 @@
"summary": "Summary",
"support": "Support",
"switch": "Switch",
"switch_camera_is_not_available": "Switch camera is not available.",
"systolic": "Systolic",
"tachycardia": "Tachycardia",
"target_dosage": "Target Dosage",
Expand All @@ -1165,6 +1172,7 @@
"to_be_conducted": "To be conducted",
"total_amount": "Total Amount",
"total_beds": "Total Beds",
"total_staff": "Total Staff",
"total_users": "Total Users",
"transfer_in_progress": "TRANSFER IN PROGRESS",
"transfer_to_receiving_facility": "Transfer to receiving facility",
Expand Down
Loading

0 comments on commit 0ab7af0

Please sign in to comment.