Skip to content

Commit

Permalink
Revert "Staging release v24.11.0-beta (#7385)"
Browse files Browse the repository at this point in the history
This reverts commit a6293bb.
  • Loading branch information
gigincg committed Mar 11, 2024
1 parent a6293bb commit 6589a80
Show file tree
Hide file tree
Showing 24 changed files with 6,663 additions and 9,965 deletions.
10 changes: 4 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,13 +63,11 @@ Authenticate to staging API with any of the following credentials
role: Doctor
```
#### Contributing to CARE
#### 🏷️ Make use labels to update the PR/issue status
- Create a branch with branch name of the format `issues/{issue#}/{short-name}` (example `issues/7001/edit-prescriptions`) from the latest [`develop`](https://github.com/coronasafe/care_fe/tree/develop) branch when starting to work on an issue.
- Once the changes are pushed to the branch, make a pull request with a meaningful title (example: "💊 Adds support for editing prescriptions" #6369)
- Ensure the issue number is mentioned in the PR with a closing tag by following the PR body template. (Refer: [Linking a pull request to an issue](https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword))
- Once the code review is done, the PR will be marked with a "Needs Testing" label where it'll be queued for QA testing.
- Once tested, the PR would be marked with a "Tested" label and would be queued for merge.
- Mark your PRs as `work-in-progress` if it's still being worked on.
- Once you have solved the related issue, mark your PR with `need testing` and `need review` labels.
- When you’re making a PR with lots of code changes that affects multiple functionalities, or is likely to break, make sure you tag it with `Major Code Change` label.

#### 🧪 Run cypress tests

Expand Down
16 changes: 2 additions & 14 deletions cypress/e2e/facility_spec/facility_creation.cy.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,5 @@
// FacilityCreation
import {
cy,
describe,
before,
beforeEach,
it,
afterEach,
expect,
} from "local-cypress";
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 Expand Up @@ -46,7 +38,6 @@ describe("Facility Creation", () => {
const initialTriageValue = "60";
const modifiedTriageValue = "50";
const facilityErrorMessage = [
"Required",
"Required",
"Invalid Pincode",
"Required",
Expand Down Expand Up @@ -124,7 +115,6 @@ describe("Facility Creation", () => {
facilityPage.submitForm();
userCreationPage.verifyErrorMessages(facilityErrorMessage);
facilityPage.fillFacilityName(facilityName);
facilityPage.clickUpdateFacilityType("Primary Health Centres");
facilityPage.clickfacilityfeatureoption();
facilityFeature.forEach((featureText) => {
cy.get("[role='option']").contains(featureText).click();
Expand Down Expand Up @@ -212,7 +202,6 @@ describe("Facility Creation", () => {
it("Create a new facility with single bed and doctor capacity", () => {
facilityPage.visitCreateFacilityPage();
facilityPage.fillFacilityName(facilityName);
facilityPage.clickUpdateFacilityType("Primary Health Centres");
facilityPage.fillPincode("682001");
facilityPage.selectStateOnPincode("Kerala");
facilityPage.selectDistrictOnPincode("Ernakulam");
Expand Down Expand Up @@ -252,7 +241,6 @@ describe("Facility Creation", () => {
it("Create a new facility with no bed and doctor capacity", () => {
facilityPage.visitCreateFacilityPage();
facilityPage.fillFacilityName(facilityName);
facilityPage.clickUpdateFacilityType("Primary Health Centres");
facilityPage.fillPincode("682001");
facilityPage.selectStateOnPincode("Kerala");
facilityPage.selectDistrictOnPincode("Ernakulam");
Expand Down Expand Up @@ -291,7 +279,7 @@ describe("Facility Creation", () => {
facilityPage.visitUpdateFacilityPage(facilityUrl1);
facilityPage.clickManageFacilityDropdown();
facilityPage.clickUpdateFacilityOption();
facilityPage.clickUpdateFacilityType("Primary Health Centres");
facilityPage.clickUpdateFacilityType("Govt Hospital");
facilityPage.fillAddress(facilityUpdateAddress);
facilityPage.fillOxygenCapacity(oxygenCapacity);
facilityPage.fillExpectedOxygenRequirement(oxygenExpected);
Expand Down
8 changes: 4 additions & 4 deletions cypress/e2e/patient_spec/patient_consultation.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ describe("Patient Consultation in multiple combination", () => {
const patientWeight = "70";
const patientHeight = "170";
const medicineOne = "DOLO";
const patientIpNumber = Math.random().toString(36).substring(7);
const patientIpNumber = "192.168";

before(() => {
loginPage.loginAsDisctrictAdmin();
Expand All @@ -59,7 +59,7 @@ describe("Patient Consultation in multiple combination", () => {
patientConsultationPage.selectConsultationStatus(
"Outpatient/Emergency Room"
);
cy.clickAndSelectOption("#symptoms", "ASYMPTOMATIC");
patientConsultationPage.selectSymptoms("ASYMPTOMATIC");
patientConsultationPage.typePatientIllnessHistory(patientIllnessHistory);
patientConsultationPage.typePatientExaminationHistory(
patientExaminationHistory
Expand Down Expand Up @@ -175,7 +175,7 @@ describe("Patient Consultation in multiple combination", () => {
"Outpatient/Emergency Room"
);
// Asymptomatic
cy.clickAndSelectOption("#symptoms", "ASYMPTOMATIC");
patientConsultationPage.selectSymptoms("ASYMPTOMATIC");
// CRITICAL category
patientConsultationPage.selectPatientCategory("Critical");
patientConsultationPage.selectPatientSuggestion("Declare Death");
Expand Down Expand Up @@ -233,7 +233,7 @@ describe("Patient Consultation in multiple combination", () => {
);
patientConsultationPage.selectPatientWard("Dummy Location 1");
// Asymptomatic
cy.clickAndSelectOption("#symptoms", "ASYMPTOMATIC");
patientConsultationPage.selectSymptoms("ASYMPTOMATIC");
// Abnormal category
patientConsultationPage.selectPatientCategory("Abnormal");
patientConsultationPage.selectPatientSuggestion("Domiciliary Care");
Expand Down
12 changes: 9 additions & 3 deletions cypress/e2e/users_spec/user_manage.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ describe("Manage User", () => {
userPage.typeInSearchInput(usernameforworkinghour);
userPage.checkUsernameText(usernameforworkinghour);
manageUserPage.clicklinkedskillbutton();
manageUserPage.selectSkillFromDropdown(linkedskill);
manageUserPage.typeSkill(linkedskill);
manageUserPage.selectFacilityFromDropdown(linkedskill);
manageUserPage.clickAddSkillButton();
manageUserPage.clickCloseSlideOver();
cy.wait(5000);
Expand All @@ -59,15 +60,17 @@ describe("Manage User", () => {
userPage.typeInSearchInput(usernametolinkskill);
userPage.checkUsernameText(usernametolinkskill);
manageUserPage.clicklinkedskillbutton();
manageUserPage.selectSkillFromDropdown(linkedskill);
manageUserPage.typeSkill(linkedskill);
manageUserPage.selectFacilityFromDropdown(linkedskill);
manageUserPage.clickAddSkillButton();
manageUserPage.clickCloseSlideOver();
cy.wait(5000); // temporary hack to fix the failure
manageUserPage.clicklinkedskillbutton();
manageUserPage.assertSkillInAddedUserSkills(linkedskill);
manageUserPage.clickUnlinkSkill();
manageUserPage.clickSubmit();
manageUserPage.selectSkillFromDropdown(linkedskill);
manageUserPage.typeSkill(linkedskill);
manageUserPage.selectFacilityFromDropdown(linkedskill);
manageUserPage.clickAddSkillButton();
manageUserPage.clickCloseSlideOver();
// verifying the doctor connect
Expand Down Expand Up @@ -102,6 +105,7 @@ describe("Manage User", () => {
manageUserPage.assertHomeFacility("No Home Facility");
// Link a new facility and ensure it is under linked facility - doctor username (1)
manageUserPage.clickFacilitiesTab();
manageUserPage.typeFacilityName(facilitytolinkusername);
manageUserPage.selectFacilityFromDropdown(facilitytolinkusername);
manageUserPage.clickLinkFacility();
manageUserPage.assertLinkedFacility(facilitytolinkusername);
Expand All @@ -113,6 +117,7 @@ describe("Manage User", () => {
userPage.typeInSearchInput(usernametolinkfacilitydoc2);
userPage.checkUsernameText(usernametolinkfacilitydoc2);
manageUserPage.clickFacilitiesTab();
manageUserPage.typeFacilityName(facilitytolinkusername);
manageUserPage.selectFacilityFromDropdown(facilitytolinkusername);
manageUserPage.clickLinkFacility();
manageUserPage.clickHomeFacilityIcon();
Expand All @@ -129,6 +134,7 @@ describe("Manage User", () => {
userPage.typeInSearchInput(usernametolinkfacilitydoc3);
userPage.checkUsernameText(usernametolinkfacilitydoc3);
manageUserPage.clickFacilitiesTab();
manageUserPage.typeFacilityName(facilitytolinkusername);
manageUserPage.selectFacilityFromDropdown(facilitytolinkusername);
manageUserPage.clickLinkFacility();
manageUserPage.clickUnlinkFacilityButton();
Expand Down
3 changes: 2 additions & 1 deletion cypress/pageobject/Facility/FacilityCreation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,8 @@ class FacilityPage {
}

selectBedType(bedType: string) {
cy.clickAndSelectOption("div#bed-type button", bedType);
cy.get("div#bed-type button").click();
cy.get("[role='option']").contains(bedType).click();
}

isVisibleselectBedType() {
Expand Down
14 changes: 9 additions & 5 deletions cypress/pageobject/Users/ManageUserPage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ export class ManageUserPage {
cy.get("#facilities").click();
}

selectFacilityFromDropdown(facilityName) {
cy.searchAndSelectOption("input[name='facility']", facilityName);
typeFacilityName(facilityName) {
cy.get("input[name='facility']").click().type(facilityName);
}

selectSkillFromDropdown(skill) {
cy.searchAndSelectOption("input[name='skill']", skill);
selectFacilityFromDropdown(facilityName) {
cy.get("[role='option']").contains(facilityName).click();
}

clickLinkFacility() {
Expand All @@ -36,7 +36,7 @@ export class ManageUserPage {
}

assertFacilityNotInDropdown(facilityName) {
cy.get("input[name='facility']").click().type(facilityName);
this.typeFacilityName(facilityName);
cy.get("[role='option']").should("not.exist");
}

Expand Down Expand Up @@ -129,6 +129,10 @@ export class ManageUserPage {
.should("have.length", 1);
}

typeSkill(skillName) {
cy.get("#select-skill").click().type(skillName);
}

clickDoctorConnectButton() {
cy.get("#doctor-connect-patient-button").click();
}
Expand Down
Loading

0 comments on commit 6589a80

Please sign in to comment.