Skip to content

Commit

Permalink
Merge branch 'develop' into add-tooltip-expand-signout-profile
Browse files Browse the repository at this point in the history
  • Loading branch information
anandaashish74711 authored Oct 9, 2024
2 parents 203782a + 207365a commit 81558ff
Show file tree
Hide file tree
Showing 90 changed files with 377 additions and 3,509 deletions.
1 change: 0 additions & 1 deletion .example.env
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ REACT_KASP_FULL_STRING=Karunya Arogya Suraksha Padhathi

# Sample format file paths
REACT_SAMPLE_FORMAT_ASSET_IMPORT=/asset-import-template.xlsx
REACT_SAMPLE_FORMAT_EXTERNAL_RESULT_IMPORT=/External-Results-Template.csv

# Camera feed, still watching idle timeout (in seconds; default: 180)
REACT_STILL_WATCHING_IDLE_TIMEOUT=
Expand Down
3 changes: 0 additions & 3 deletions care.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,6 @@ const careConfig = {
sampleFormats: {
assetImport:
env.REACT_SAMPLE_FORMAT_ASSET_IMPORT || "/asset-import-template.xlsx",
externalResultImport:
env.REACT_SAMPLE_FORMAT_EXTERNAL_RESULT_IMPORT ||
"/External-Results-Template.csv",
},

wartimeShifting: env.REACT_WARTIME_SHIFTING === "true",
Expand Down
41 changes: 0 additions & 41 deletions cypress/e2e/external_results_spec/ExternalResultsAdvanceFilters.ts

This file was deleted.

68 changes: 0 additions & 68 deletions cypress/e2e/external_results_spec/ExternalResultsHomepage.cy.ts

This file was deleted.

12 changes: 12 additions & 0 deletions cypress/e2e/patient_spec/PatientHomepage.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,18 @@ describe("Patient Homepage present functionalities", () => {
cy.awaitUrl("/patients");
});

it("Export the live patient list based on a date range", () => {
patientHome.clickPatientExport();
cy.verifyNotification("Please select a seven day period");
cy.closeNotification();
patientHome.typePatientModifiedBeforeDate("01122023");
patientHome.typePatientModifiedAfterDate("07122023");
patientHome.clickPatientFilterApply();
patientHome.interceptPatientExportRequest();
patientHome.clickPatientExport();
patientHome.verifyPatientExportRequest();
});

it("Verify the functionality of the patient tab pagination", () => {
let firstPatientPageOne: string;
cy.get('[data-cy="patient"]')
Expand Down
3 changes: 0 additions & 3 deletions cypress/e2e/patient_spec/PatientRegistration.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import { PatientPage } from "../../pageobject/Patient/PatientCreation";
import FacilityPage from "../../pageobject/Facility/FacilityCreation";
import { generatePhoneNumber } from "../../pageobject/utils/constants";
import PatientTransfer from "../../pageobject/Patient/PatientTransfer";
import PatientExternal from "../../pageobject/Patient/PatientExternal";
import PatientInsurance from "../../pageobject/Patient/PatientInsurance";
import PatientMedicalHistory from "../../pageobject/Patient/PatientMedicalHistory";

Expand Down Expand Up @@ -34,7 +33,6 @@ describe("Patient Creation with consultation", () => {
const patientPage = new PatientPage();
const facilityPage = new FacilityPage();
const patientTransfer = new PatientTransfer();
const patientExternal = new PatientExternal();
const patientInsurance = new PatientInsurance();
const patientMedicalHistory = new PatientMedicalHistory();
const phone_number = generatePhoneNumber();
Expand Down Expand Up @@ -70,7 +68,6 @@ describe("Patient Creation with consultation", () => {
const patientTransferPhoneNumber = "9849511866";
const patientTransferFacility = "Dummy Shifting Center";
const patientTransferName = "Dummy Patient 10";
const patientExternalName = "Patient 20";
const patientOccupation = "Student";

before(() => {
Expand Down
31 changes: 31 additions & 0 deletions cypress/pageobject/Patient/PatientHome.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,36 @@ class PatientHome {
clickPreviousPage() {
cy.get("#prev-pages").click();
}

clickPatientExport() {
cy.get("#patient-export").click();
}

clickPatientFilterApply() {
cy.get("#apply-filter").click();
}

interceptPatientExportRequest() {
cy.intercept({
method: "GET",
url: "/api/v1/patient/*",
}).as("getPatients");
}

verifyPatientExportRequest() {
cy.wait("@getPatients").then((interception) => {
expect(interception.request.url).to.include("/api/v1/patient/");
expect(interception.request.url).to.include("&csv");
expect(interception.response.statusCode).to.eq(200);
});
}

typePatientModifiedBeforeDate(startDate: string) {
cy.clickAndTypeDate("input[name='modified_date_start']", startDate);
}

typePatientModifiedAfterDate(endDate: string) {
cy.clickAndTypeDate("input[name='modified_date_end']", endDate);
}
}
export default PatientHome;
Loading

0 comments on commit 81558ff

Please sign in to comment.