Skip to content

Commit

Permalink
Merge pull request #8426 from ohcnetwork/staging
Browse files Browse the repository at this point in the history
Production release v24.35.0
  • Loading branch information
gigincg authored Aug 26, 2024
2 parents 02d184e + 7090b02 commit 41f7e7e
Show file tree
Hide file tree
Showing 71 changed files with 862 additions and 842 deletions.
10 changes: 10 additions & 0 deletions .github/workflows/cypress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,21 @@ jobs:
- name: Checkout 📥
uses: actions/checkout@v3

- name: Set backend branch
id: backend-branch
run: |
if [[ '${{ github.event.pull_request.base.ref }}' == 'staging' ]]; then
echo "branch=staging" >> $GITHUB_OUTPUT
else
echo "branch=develop" >> $GITHUB_OUTPUT
fi
- name: Checkout care 📥
uses: actions/checkout@v3
with:
repository: coronasafe/care
path: care
ref: ${{ steps.backend-branch.outputs.branch }}

- name: Start care docker containers 🐳
run: |
Expand Down
7 changes: 2 additions & 5 deletions cypress/e2e/external_results_spec/filter.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,10 @@ describe("External Results Filters", () => {
});

it("Advance Filter", () => {
cy.clickAndSelectOption("#local_bodies", "Aluva");
cy.get("#local_bodies").click();
cy.get("[role='option']").should("be.visible");
cy.contains("[role='option']", "Aluva").click();
cy.get("#local_bodies").click();
cy.clickAndSelectOption("#wards", "4");
cy.get("#wards").click();
cy.get("[role='option']").should("be.visible");
cy.contains("[role='option']", "4").click();
cy.contains("Apply").click();
});

Expand Down
1 change: 1 addition & 0 deletions cypress/e2e/facility_spec/facility_creation.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ describe("Facility Creation", () => {
facilityFeature.forEach((featureText) => {
cy.get("[role='option']").contains(featureText).click();
});
facilityPage.clickfacilityfeatureoption();
facilityPage.fillPincode("682001");
facilityPage.selectStateOnPincode("Kerala");
facilityPage.selectDistrictOnPincode("Ernakulam");
Expand Down
1 change: 1 addition & 0 deletions cypress/e2e/patient_spec/patient_consultation.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ describe("Patient Consultation in multiple combination", () => {
cy.submitButton("Create Consultation");
// the above submit should fail as IP number is missing
patientConsultationPage.typePatientNumber(patientIpNumber);
patientConsultationPage.selectBed("Dummy Bed 1");
cy.submitButton("Create Consultation");
cy.verifyNotification("Consultation created successfully");
// Below code for the prescription module only present while creating a new consultation
Expand Down
6 changes: 4 additions & 2 deletions cypress/e2e/patient_spec/patient_logupdate.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@ describe("Patient Log Update in Normal, Critical and TeleIcu", () => {
patientLogupdate.typePhysicalExamination(physicalExamination);
patientLogupdate.selectRoundType("Telemedicine");
patientLogupdate.typeOtherDetails(otherExamination);
patientLogupdate.typeAdditionalSymptoms(additionalSymptoms);
patientLogupdate.selectSymptomsDate("01012024");
patientLogupdate.typeAndMultiSelectSymptoms("fe", ["Fever"]);
patientLogupdate.selectPatientCategory(patientCategory);
patientLogupdate.typeSystolic(patientSystolic);
patientLogupdate.typeDiastolic(patientDiastolic);
Expand All @@ -72,7 +73,8 @@ describe("Patient Log Update in Normal, Critical and TeleIcu", () => {
patientLogupdate.clickLogupdate();
patientLogupdate.typePhysicalExamination(physicalExamination);
patientLogupdate.typeOtherDetails(otherExamination);
patientLogupdate.typeAdditionalSymptoms(additionalSymptoms);
patientLogupdate.selectSymptomsDate("01012024");
patientLogupdate.typeAndMultiSelectSymptoms("fe", ["Fever"]);
patientLogupdate.selectPatientCategory(patientCategory);
patientLogupdate.typeSystolic(patientSystolic);
patientLogupdate.typeDiastolic(patientDiastolic);
Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/patient_spec/patient_prescription.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ describe("Patient Medicine Administration", () => {
cy.verifyAndClickElement("#0", medicineNameOne);
cy.submitButton("Discontinue");
patientPrescription.enterDiscontinueReason("Medicine is been discontinued");
cy.submitButton("Discontinue");
cy.submitButton("Confirm Discontinue");
cy.verifyNotification("Prescription discontinued");
cy.closeNotification();
// verify the discontinue medicine view
Expand Down
4 changes: 4 additions & 0 deletions cypress/pageobject/Patient/PatientConsultation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ export class PatientConsultationPage {
cy.searchAndSelectOption("#referred_to", referance);
}

selectBed(bedNo: string) {
cy.searchAndSelectOption("#bed", bedNo);
}

selectPatientWard(ward: string) {
cy.searchAndSelectOption("#transferred_from_location", ward);
}
Expand Down
4 changes: 0 additions & 4 deletions cypress/pageobject/Patient/PatientLogupdate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,6 @@ class PatientLogupdate {
cy.get("#other_details").click().type(details);
}

typeAdditionalSymptoms(symptoms: string) {
cy.searchAndSelectOption("#additional_symptoms", symptoms);
}

typeAndMultiSelectSymptoms(input, symptoms) {
cy.typeAndMultiSelectOption("#additional_symptoms", input, symptoms);
}
Expand Down
2 changes: 1 addition & 1 deletion cypress/pageobject/Users/ManageUserPage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export class ManageUserPage {
}

clickCloseSlideOver() {
cy.get("#close-slide-over").click();
cy.get("#close-slide-over").click({ force: true });
}

clickHomeFacilityIcon() {
Expand Down
3 changes: 3 additions & 0 deletions cypress/pageobject/Users/UserCreation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ export class UserCreationPage {
selectFacility(name: string) {
this.typeIntoInputByName("facilities", name);
this.selectOptionContainingText(name);
cy.get("input[name='facilities'] + button")
.find("#dropdown-toggle")
.click();
}

selectHomeFacility(name: string) {
Expand Down
4 changes: 2 additions & 2 deletions cypress/support/commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ Cypress.Commands.add(
optionArray.forEach((options) => {
cy.get("[role='option']").contains(options).click();
});
cy.get(selector).click();
cy.get(selector).find("#dropdown-toggle").click();
});
},
);
Expand All @@ -153,7 +153,7 @@ Cypress.Commands.add(
optionArray.forEach((options) => {
cy.get("[role='option']").contains(options).click();
});
cy.get(selector).click();
cy.get(selector).find("#dropdown-toggle").click();
});
},
);
Expand Down
Loading

0 comments on commit 41f7e7e

Please sign in to comment.