Skip to content

Commit

Permalink
removed the external result patient creation cypress test
Browse files Browse the repository at this point in the history
  • Loading branch information
nihal467 committed Sep 3, 2024
1 parent b75f70b commit dab6dab
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 56 deletions.
28 changes: 0 additions & 28 deletions cypress/e2e/patient_spec/patient_registration.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,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 Expand Up @@ -286,31 +283,6 @@ describe("Patient Creation with consultation", () => {
);
});

it("Patient Registration using External Result Import", () => {
// copy the patient external ID from external results
cy.awaitUrl("/external_results");
patientExternal.verifyExternalListPatientName(patientExternalName);
patientExternal.verifyExternalIdVisible();
// cypress have a limitation to work only asynchronously
// import the result and create a new patient
let extractedId = "";
cy.get("#patient-external-id")
.invoke("text")
.then((text) => {
extractedId = text.split("Care external results ID: ")[1];
cy.log(`Extracted Care external results ID: ${extractedId}`);
cy.awaitUrl("/patients");
patientPage.createPatient();
patientPage.selectFacility(patientFacility);
patientPage.patientformvisibility();
patientExternal.clickImportFromExternalResultsButton();
patientExternal.typeCareExternalResultId(extractedId);
patientExternal.clickImportPatientData();
});
// verify the patient is successfully created
patientExternal.verifyExternalPatientName(patientExternalName);
});

afterEach(() => {
cy.saveLocalStorage();
});
Expand Down
28 changes: 0 additions & 28 deletions cypress/pageobject/Patient/PatientExternal.ts

This file was deleted.

0 comments on commit dab6dab

Please sign in to comment.