Skip to content

Commit

Permalink
fixed cypress test: patient_logudpate
Browse files Browse the repository at this point in the history
  • Loading branch information
rithviknishad committed May 22, 2024
1 parent 1e507be commit a772e4a
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 12 deletions.
18 changes: 8 additions & 10 deletions cypress/e2e/patient_spec/patient_logupdate.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ describe("Patient Log Update in Normal, Critical and TeleIcu", () => {
const patientLogupdate = new PatientLogupdate();
const domicilaryPatient = "Dummy Patient 11";
const patientCategory = "Moderate";
const additionalSymptoms = "ASYMPTOMATIC";
const additionalSymptoms = "Fever";
const physicalExamination = "physical examination details";
const otherExamination = "Other";
const patientSystolic = "119";
Expand Down Expand Up @@ -59,9 +59,7 @@ describe("Patient Log Update in Normal, Critical and TeleIcu", () => {
patientLogupdate.typeRhythm(patientRhythm);
cy.get("#consciousness_level-2").click();
cy.submitButton("Save");
cy.verifyNotification(
"Telemedicine Log Updates details created successfully",
);
cy.verifyNotification("Tele-medicine log update created successfully");
});

it("Create a new log normal update for a domicilary care patient and edit it", () => {
Expand All @@ -86,7 +84,7 @@ describe("Patient Log Update in Normal, Critical and TeleIcu", () => {
patientLogupdate.typeRhythm(patientRhythm);
cy.get("#consciousness_level-2").click();
cy.submitButton("Save");
cy.verifyNotification("Normal Log Updates details created successfully");
cy.verifyNotification("Normal log update created successfully");
cy.closeNotification();
// edit the card and verify the data.
cy.contains("Daily Rounds").click();
Expand All @@ -109,7 +107,7 @@ describe("Patient Log Update in Normal, Critical and TeleIcu", () => {
patientLogupdate.clickClearButtonInElement("#diastolic");
patientLogupdate.typeDiastolic(patientModifiedDiastolic);
cy.submitButton("Continue");
cy.verifyNotification("Normal Log Updates details updated successfully");
cy.verifyNotification("Normal log update details updated successfully");
cy.contains("Daily Rounds").click();
patientLogupdate.clickLogupdateCard("#dailyround-entry", patientCategory);
cy.verifyContentPresence("#consultation-preview", [
Expand Down Expand Up @@ -140,10 +138,10 @@ describe("Patient Log Update in Normal, Critical and TeleIcu", () => {
cy.get("#consciousness_level-2").click();
cy.submitButton("Save");
cy.wait(2000);
cy.verifyNotification("Normal Log Updates details created successfully");
cy.verifyNotification("Normal log update created successfully");
// Verify the card content
cy.get("#basic-information").scrollIntoView();
cy.verifyContentPresence("#basic-information", [additionalSymptoms]);
cy.verifyContentPresence("#encounter-symptoms", [additionalSymptoms]);
});

it("Create a normal log update to verify MEWS Score Functionality", () => {
Expand All @@ -163,7 +161,7 @@ describe("Patient Log Update in Normal, Critical and TeleIcu", () => {
patientLogupdate.typeRespiratory(patientRespiratory);
cy.get("#consciousness_level-2").click();
cy.submitButton("Save");
cy.verifyNotification("Normal Log Updates details created successfully");
cy.verifyNotification("Normal log update created successfully");
cy.closeNotification();
cy.verifyContentPresence("#consultation-buttons", ["9"]);
// Verify the Incomplete data will give blank info
Expand All @@ -173,7 +171,7 @@ describe("Patient Log Update in Normal, Critical and TeleIcu", () => {
patientLogupdate.typeDiastolic(patientDiastolic);
patientLogupdate.typePulse(patientPulse);
cy.submitButton("Save");
cy.verifyNotification("Normal Log Updates details created successfully");
cy.verifyNotification("Normal log update created successfully");
cy.closeNotification();
cy.verifyContentPresence("#consultation-buttons", ["-"]);
});
Expand Down
2 changes: 1 addition & 1 deletion src/Components/Patient/DailyRounds.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ export const DailyRounds = (props: any) => {
if (obj) {
dispatch({ type: "set_form", form: initForm });
Notification.Success({
msg: `${obj.rounds_type === "VENTILATOR" ? "Critical Care" : capitalize(obj.rounds_type)} Log Updates details updated successfully`,
msg: `${obj.rounds_type === "VENTILATOR" ? "Critical Care" : capitalize(obj.rounds_type)} log update details updated successfully`,
});
if (["NORMAL", "TELEMEDICINE"].includes(state.form.rounds_type)) {
navigate(
Expand Down
2 changes: 1 addition & 1 deletion src/Components/Symptoms/SymptomsCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const EncounterSymptomsCard = () => {
const records = groupAndSortSymptoms(data.results);

return (
<div>
<div id="encounter-symptoms">
<h3 className="mb-2 text-lg font-semibold leading-relaxed text-gray-900">
Symptoms
</h3>
Expand Down

0 comments on commit a772e4a

Please sign in to comment.