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

Merge Develop to Staging v24.36.0 #8494

Merged
merged 6 commits into from
Sep 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion cypress.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,6 @@ export default defineConfig({
excludeSpecPattern: "**/*roles.cy.ts",
},
env: {
API_URL: process.env.REACT_CARE_API_URL,
API_URL: process.env.REACT_CARE_API_URL ?? "http://localhost:9000",
},
});
5 changes: 1 addition & 4 deletions cypress/e2e/assets_spec/asset_homepage.cy.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
/// <reference types="cypress" />

import { cy, describe, before, beforeEach, it, afterEach } from "local-cypress";
import { AssetSearchPage } from "../../pageobject/Asset/AssetSearch";
import { AssetQRScanPage } from "../../pageobject/Asset/AssetQRScan";
import { AssetPagination } from "../../pageobject/Asset/AssetPagination";
Expand Down Expand Up @@ -65,7 +62,7 @@ describe("Asset Tab", () => {
"Dummy Facility 40",
"ACTIVE",
"ONVIF Camera",
"Camera Loc"
"Camera Loc",
);
assetFilters.clickadvancefilter();
assetFilters.clickslideoverbackbutton(); // to verify the back button doesn't clear applied filters
Expand Down
2 changes: 0 additions & 2 deletions cypress/e2e/assets_spec/assets_creation.cy.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
/// <reference types="cypress" />
import { afterEach, before, beforeEach, cy, describe, it } from "local-cypress";
import { AssetPage } from "../../pageobject/Asset/AssetCreation";
import { v4 as uuidv4 } from "uuid";
import LoginPage from "../../pageobject/Login/LoginPage";
Expand Down
1 change: 0 additions & 1 deletion cypress/e2e/assets_spec/assets_manage.cy.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { afterEach, before, beforeEach, cy, describe, it } from "local-cypress";
import { AssetPage } from "../../pageobject/Asset/AssetCreation";
import LoginPage from "../../pageobject/Login/LoginPage";
import { AssetSearchPage } from "../../pageobject/Asset/AssetSearch";
Expand Down
4 changes: 0 additions & 4 deletions cypress/e2e/auth_spec/auth.cy.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
/// <reference types="cypress" />

import { cy, describe, beforeEach, it } from "local-cypress";

describe("Authorisation/Authentication", () => {
beforeEach(() => {
cy.awaitUrl("/", true);
Expand Down
2 changes: 0 additions & 2 deletions cypress/e2e/auth_spec/forget_password.cy.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import { cy, describe, beforeEach, it } from "local-cypress";

describe("Forgot Password", () => {
beforeEach(() => {
cy.awaitUrl("/", true);
Expand Down
1 change: 0 additions & 1 deletion cypress/e2e/auth_spec/redirect.cy.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { cy, describe, it, beforeEach, Cypress } from "local-cypress";
import LoginPage from "../../pageobject/Login/LoginPage";

describe("redirect", () => {
Expand Down
1 change: 0 additions & 1 deletion cypress/e2e/auth_spec/roles.cy.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { afterEach, cy, describe, it } from "local-cypress";
import * as users from "../../fixtures/users.json";

describe("authentication", () => {
Expand Down
12 changes: 1 addition & 11 deletions cypress/e2e/external_results_spec/external_result.cy.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,3 @@
import {
cy,
describe,
it,
before,
beforeEach,
afterEach,
expect,
} from "local-cypress";

describe("Edit Profile Testing", () => {
before(() => {
cy.loginByApi("devdistrictadmin", "Coronasafe@123");
Expand Down Expand Up @@ -52,7 +42,7 @@ describe("Edit Profile Testing", () => {
});

it("export", () => {
cy.intercept("**", (req: Cypress.Request) => {
cy.intercept("**", (req) => {
const url = new URL(req.url);
const params = new URLSearchParams(url.search);
if (
Expand Down
2 changes: 0 additions & 2 deletions cypress/e2e/external_results_spec/filter.cy.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import { cy, describe, before, beforeEach, it, afterEach } from "local-cypress";

describe("External Results Filters", () => {
before(() => {
cy.loginByApi("devdistrictadmin", "Coronasafe@123");
Expand Down
10 changes: 0 additions & 10 deletions cypress/e2e/facility_spec/facility_creation.cy.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,3 @@
// FacilityCreation
import {
cy,
describe,
before,
beforeEach,
it,
afterEach,
expect,
} from "local-cypress";
import FacilityPage from "../../pageobject/Facility/FacilityCreation";
import LoginPage from "../../pageobject/Login/LoginPage";
import FacilityHome from "../../pageobject/Facility/FacilityHome";
Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/facility_spec/facility_homepage.cy.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// FacilityCreation
import { cy, describe, before, beforeEach, it, afterEach } from "local-cypress";

import LoginPage from "../../pageobject/Login/LoginPage";
import FacilityHome from "../../pageobject/Facility/FacilityHome";
import ManageUserPage from "../../pageobject/Users/ManageUserPage";
Expand Down
1 change: 0 additions & 1 deletion cypress/e2e/facility_spec/facility_manage.cy.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { cy, describe, before, beforeEach, it, afterEach } from "local-cypress";
import LoginPage from "../../pageobject/Login/LoginPage";
import FacilityManage from "../../pageobject/Facility/FacilityManage";
import FacilityPage from "../../pageobject/Facility/FacilityCreation";
Expand Down
1 change: 0 additions & 1 deletion cypress/e2e/facility_spec/inventory.cy.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { cy, describe, before, beforeEach, it, afterEach } from "local-cypress";
import FacilityPage from "../../pageobject/Facility/FacilityCreation";
import LoginPage from "../../pageobject/Login/LoginPage";
import FacilityHome from "../../pageobject/Facility/FacilityHome";
Expand Down
15 changes: 7 additions & 8 deletions cypress/e2e/facility_spec/locations.cy.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { afterEach, before, beforeEach, cy, describe, it } from "local-cypress";
import { AssetPage } from "../../pageobject/Asset/AssetCreation";
import { UserCreationPage } from "../../pageobject/Users/UserCreation";
import FacilityPage from "../../pageobject/Facility/FacilityCreation";
Expand Down Expand Up @@ -92,7 +91,7 @@ describe("Location Management Section", () => {
facilityLocation.selectBedType(bedType);
assetPage.clickassetupdatebutton();
facilityLocation.verifyNotification(
"Name - Bed with same name already exists in location"
"Name - Bed with same name already exists in location",
);
facilityHome.verifyAndCloseNotifyModal();
// edit the created bed
Expand Down Expand Up @@ -185,7 +184,7 @@ describe("Location Management Section", () => {
facilityLocation.deleteLocation("Test Location");
assetPage.clickassetupdatebutton();
facilityLocation.verifyNotification(
"Location Test Location deleted successfully"
"Location Test Location deleted successfully",
);
facilityLocation.closeNotification();
});
Expand All @@ -204,7 +203,7 @@ describe("Location Management Section", () => {
facilityLocation.deleteLocation("Test Location with Beds");
assetPage.clickassetupdatebutton();
facilityLocation.verifyNotification(
"Cannot delete a Location with associated Beds"
"Cannot delete a Location with associated Beds",
);
facilityLocation.closeNotification();

Expand All @@ -219,7 +218,7 @@ describe("Location Management Section", () => {
facilityLocation.deleteLocation("Test Location with Beds");
assetPage.clickassetupdatebutton();
facilityLocation.verifyNotification(
"Location Test Location with Beds deleted successfully"
"Location Test Location with Beds deleted successfully",
);
facilityLocation.closeNotification();
});
Expand Down Expand Up @@ -249,14 +248,14 @@ describe("Location Management Section", () => {
"Vendor's Name",
serialNumber,
"25122021",
"Test note for asset creation!"
"Test note for asset creation!",
);
assetPage.clickassetupdatebutton();
facilityLocation.loadLocationManagementPage("Dummy Shifting Center");
facilityLocation.deleteLocation("Test Location with linked Assets");
assetPage.clickassetupdatebutton();
facilityLocation.verifyNotification(
"Cannot delete a Location with associated Assets"
"Cannot delete a Location with associated Assets",
);
facilityLocation.closeNotification();

Expand All @@ -271,7 +270,7 @@ describe("Location Management Section", () => {
facilityLocation.deleteLocation("Test Location with linked Assets");
assetPage.clickassetupdatebutton();
facilityLocation.verifyNotification(
"Location Test Location with linked Assets deleted successfully"
"Location Test Location with linked Assets deleted successfully",
);
facilityLocation.closeNotification();
});
Expand Down
1 change: 0 additions & 1 deletion cypress/e2e/patient_spec/patient_consultation.cy.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { afterEach, before, beforeEach, cy, describe, it } from "local-cypress";
import LoginPage from "../../pageobject/Login/LoginPage";
import { PatientPage } from "../../pageobject/Patient/PatientCreation";
import { PatientConsultationPage } from "../../pageobject/Patient/PatientConsultation";
Expand Down
1 change: 0 additions & 1 deletion cypress/e2e/patient_spec/patient_discharge.cy.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { afterEach, before, beforeEach, cy, describe, it } from "local-cypress";
import LoginPage from "../../pageobject/Login/LoginPage";
import { PatientPage } from "../../pageobject/Patient/PatientCreation";
import PatientDischarge from "../../pageobject/Patient/PatientDischarge";
Expand Down
1 change: 0 additions & 1 deletion cypress/e2e/patient_spec/patient_fileupload.cy.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { afterEach, before, beforeEach, cy, describe, it } from "local-cypress";
import LoginPage from "../../pageobject/Login/LoginPage";
import { PatientPage } from "../../pageobject/Patient/PatientCreation";
import { PatientFileUpload } from "../../pageobject/Patient/PatientFileupload";
Expand Down
78 changes: 73 additions & 5 deletions cypress/e2e/patient_spec/patient_logupdate.cy.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
import { afterEach, before, beforeEach, cy, describe, it } from "local-cypress";
import LoginPage from "../../pageobject/Login/LoginPage";
import { PatientConsultationPage } from "../../pageobject/Patient/PatientConsultation";
import { PatientPage } from "../../pageobject/Patient/PatientCreation";
import PatientLogupdate from "../../pageobject/Patient/PatientLogupdate";
import PatientInvestigation from "../../pageobject/Patient/PatientInvestigation";
import PatientPrescription from "../../pageobject/Patient/PatientPrescription";

describe("Patient Log Update in Normal, Critical and TeleIcu", () => {
const loginPage = new LoginPage();
const patientConsultationPage = new PatientConsultationPage();
const patientPage = new PatientPage();
const patientLogupdate = new PatientLogupdate();
const patientInvestigation = new PatientInvestigation();
const patientPrescription = new PatientPrescription();
const domicilaryPatient = "Dummy Patient 11";
const patientCategory = "Moderate";
const additionalSymptoms = "Fever";
Expand Down Expand Up @@ -36,7 +39,72 @@ describe("Patient Log Update in Normal, Critical and TeleIcu", () => {
cy.awaitUrl("/patients");
});

it("Create a new log teleicu update for a domicilary care patient and verify the copy previous value function", () => {
it("Create a new Progress log update for a admitted patient and edit it", () => {
patientPage.visitPatient("Dummy Patient 12");
patientLogupdate.clickLogupdate();
cy.verifyNotification("Please assign a bed to the patient");
patientLogupdate.selectBed("Dummy Bed 4");
cy.closeNotification();
patientLogupdate.clickLogupdate();
// Only will be using random non-unique progress note fields
patientLogupdate.selectPatientCategory(patientCategory);
patientLogupdate.selectRoundType("Progress Note");
patientLogupdate.selectSymptomsDate("01012024");
patientLogupdate.typeAndMultiSelectSymptoms("fe", ["Fever"]);
patientLogupdate.typeTemperature(patientTemperature);
// add diagnosis
patientConsultationPage.selectPatientDiagnosis(
"1A06",
"add-icd11-diagnosis-as-differential",
);
// add a investigation for the patient
patientInvestigation.clickAddInvestigation();
patientInvestigation.selectInvestigation("Vitals (GROUP)");
patientInvestigation.clickInvestigationCheckbox();
patientInvestigation.selectInvestigationFrequency("6");
// add a medicine for the patient
patientPrescription.clickAddPrescription();
patientPrescription.interceptMedibase();
patientPrescription.selectMedicinebox();
patientPrescription.selectMedicine("DOLO");
patientPrescription.enterDosage("4");
patientPrescription.selectDosageFrequency("Twice daily");
cy.submitButton("Submit");
cy.verifyNotification("Medicine prescribed");
cy.closeNotification();
// Submit the doctors log update
cy.submitButton("Save and Continue");
cy.verifyNotification("Progress Note log created successfully");
cy.closeNotification();
// modify the relevant critical care log update
cy.contains("button", "Neurological Monitoring").click();
cy.get("#consciousness_level-option-RESPONDS_TO_PAIN").click();
cy.get("#left_pupil_light_reaction-option-FIXED").click();
cy.submitButton("Update Details");
cy.verifyNotification(
"Neurological Monitoring details succesfully updated.",
);
cy.closeNotification();
// Final Submission of the form
cy.submitButton("Complete");
cy.verifyNotification("Progress Note Log Update filed successfully");
cy.closeNotification();
// Verify the data reflection
cy.contains("button", "Daily Rounds").click();
patientLogupdate.clickLogupdateCard("#dailyround-entry", patientCategory);
cy.verifyContentPresence("#consultation-preview", [
patientCategory,
patientTemperature,
]);
// verify the edit functionality
patientLogupdate.clickUpdateDetail();
patientLogupdate.typeSystolic(patientModifiedSystolic);
patientLogupdate.typeDiastolic(patientModifiedDiastolic);
cy.submitButton("Continue");
cy.verifyNotification("Progress Note log updated successfully");
});

it("Create a new TeleIcu log update for a domicilary care patient", () => {
patientPage.visitPatient("Dummy Patient 11");
patientConsultationPage.clickEditConsultationButton();
patientConsultationPage.selectPatientSuggestion("Domiciliary Care");
Expand All @@ -63,7 +131,7 @@ describe("Patient Log Update in Normal, Critical and TeleIcu", () => {
cy.verifyNotification("Telemedicine log created successfully");
});

it("Create a new log normal update for a domicilary care patient and edit it", () => {
it("Create a new Normal Log update for a domicilary care patient and edit it", () => {
patientPage.visitPatient(domicilaryPatient);
patientConsultationPage.clickEditConsultationButton();
patientConsultationPage.selectPatientSuggestion("Domiciliary Care");
Expand Down Expand Up @@ -118,7 +186,7 @@ describe("Patient Log Update in Normal, Critical and TeleIcu", () => {
]);
});

it("Create a new log normal update for a admission patient and verify its reflection in cards", () => {
it("Create a new Normal update for a admission patient and verify its reflection in cards", () => {
patientPage.visitPatient("Dummy Patient 13");
patientLogupdate.clickLogupdate();
cy.verifyNotification("Please assign a bed to the patient");
Expand Down Expand Up @@ -148,7 +216,7 @@ describe("Patient Log Update in Normal, Critical and TeleIcu", () => {
cy.verifyContentPresence("#encounter-symptoms", [additionalSymptoms]);
});

it("Create a normal log update to verify MEWS Score Functionality", () => {
it("Create a Normal Log update to verify MEWS Score Functionality", () => {
patientPage.visitPatient(domicilaryPatient);
patientConsultationPage.clickEditConsultationButton();
patientConsultationPage.selectPatientSuggestion("Domiciliary Care");
Expand Down
1 change: 0 additions & 1 deletion cypress/e2e/patient_spec/patient_manage.cy.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { afterEach, before, beforeEach, cy, describe, it } from "local-cypress";
import LoginPage from "../../pageobject/Login/LoginPage";
import { PatientConsultationPage } from "../../pageobject/Patient/PatientConsultation";
import { PatientPage } from "../../pageobject/Patient/PatientCreation";
Expand Down
1 change: 0 additions & 1 deletion cypress/e2e/patient_spec/patient_prescription.cy.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { afterEach, before, beforeEach, cy, describe, it } from "local-cypress";
import PatientPrescription from "../../pageobject/Patient/PatientPrescription";
import LoginPage from "../../pageobject/Login/LoginPage";
import { PatientPage } from "../../pageobject/Patient/PatientCreation";
Expand Down
1 change: 0 additions & 1 deletion cypress/e2e/patient_spec/patient_registration.cy.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { afterEach, before, beforeEach, cy, describe, it } from "local-cypress";
import LoginPage from "../../pageobject/Login/LoginPage";
import { PatientPage } from "../../pageobject/Patient/PatientCreation";
import FacilityPage from "../../pageobject/Facility/FacilityCreation";
Expand Down
2 changes: 0 additions & 2 deletions cypress/e2e/resource_spec/filter.cy.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import { afterEach, before, beforeEach, cy, describe, it } from "local-cypress";

describe("Resource filter", () => {
before(() => {
cy.loginByApi("devdistrictadmin", "Coronasafe@123");
Expand Down
1 change: 0 additions & 1 deletion cypress/e2e/resource_spec/resources.cy.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { afterEach, before, beforeEach, cy, describe, it } from "local-cypress";
import LoginPage from "../../pageobject/Login/LoginPage";
import ResourcePage from "../../pageobject/Resource/ResourcePage";
import FacilityPage from "../../pageobject/Facility/FacilityCreation";
Expand Down
2 changes: 0 additions & 2 deletions cypress/e2e/sample_test_spec/filter.cy.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import { cy, describe, before, beforeEach, it, afterEach } from "local-cypress";

describe("Sample Filter", () => {
before(() => {
cy.loginByApi("devdistrictadmin", "Coronasafe@123");
Expand Down
2 changes: 0 additions & 2 deletions cypress/e2e/sample_test_spec/sample_test.cy.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import { afterEach, before, beforeEach, cy, describe, it } from "local-cypress";

describe("Sample List", () => {
before(() => {
cy.loginByApi("devdistrictadmin", "Coronasafe@123");
Expand Down
1 change: 0 additions & 1 deletion cypress/e2e/shifting_spec/filter.cy.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { afterEach, before, beforeEach, cy, describe, it } from "local-cypress";
import ShiftingPage from "../../pageobject/Shift/ShiftFilters";

describe("Shifting section filter", () => {
Expand Down
2 changes: 0 additions & 2 deletions cypress/e2e/shifting_spec/shifting.cy.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import { afterEach, before, beforeEach, cy, describe, it } from "local-cypress";

describe("Shifting Page", () => {
before(() => {
cy.loginByApi("devdistrictadmin", "Coronasafe@123");
Expand Down
1 change: 0 additions & 1 deletion cypress/e2e/users_spec/user_creation.cy.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { cy, describe, before, beforeEach, it, afterEach } from "local-cypress";
import LoginPage from "../../pageobject/Login/LoginPage";
import { AssetSearchPage } from "../../pageobject/Asset/AssetSearch";
import FacilityPage from "../../pageobject/Facility/FacilityCreation";
Expand Down
3 changes: 0 additions & 3 deletions cypress/e2e/users_spec/user_homepage.cy.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
/// <reference types="cypress" />

import { cy, describe, before, beforeEach, it, afterEach } from "local-cypress";
import LoginPage from "../../pageobject/Login/LoginPage";
import { UserPage } from "../../pageobject/Users/UserSearch";

Expand Down
1 change: 0 additions & 1 deletion cypress/e2e/users_spec/user_manage.cy.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { cy, describe, before, beforeEach, it, afterEach } from "local-cypress";
import LoginPage from "../../pageobject/Login/LoginPage";
import { UserPage } from "../../pageobject/Users/UserSearch";
import ManageUserPage from "../../pageobject/Users/ManageUserPage";
Expand Down
1 change: 0 additions & 1 deletion cypress/e2e/users_spec/user_profile.cy.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { cy, describe, before, beforeEach, it, afterEach } from "local-cypress";
import LoginPage from "../../pageobject/Login/LoginPage";
import UserProfilePage from "../../pageobject/Users/UserProfilePage";
import ManageUserPage from "../../pageobject/Users/ManageUserPage";
Expand Down
1 change: 0 additions & 1 deletion cypress/pageobject/Asset/AssetCreation.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// assetPage.ts
import { cy, expect } from "local-cypress";

export class AssetPage {
createAsset() {
Expand Down
Loading
Loading