Skip to content

Commit

Permalink
Merge branch 'develop' into rithviknishad/feat/migrate-configure-camera
Browse files Browse the repository at this point in the history
  • Loading branch information
rithviknishad committed Oct 18, 2024
2 parents 5cd8a14 + d14ca0c commit 034f9b5
Show file tree
Hide file tree
Showing 56 changed files with 5,695 additions and 4,636 deletions.
2 changes: 1 addition & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"cpus": 4
},
"waitFor": "onCreateCommand",
"postCreateCommand": "npm install",
"postCreateCommand": "npm run install-all",
"postAttachCommand": {
"server": "npm run dev"
},
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/cypress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ jobs:
node-version: "20"

- name: Install dependencies 📦
run: npm install
run: npm run install-all

- name: Build ⚙️
run: npm run build
Expand Down
2 changes: 2 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ RUN npm install

COPY . .

RUN npm run setup

RUN npm run build


Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<a href="https://ohc.network/">
<p align="center">
<picture>
<source media="(prefers-color-scheme: dark)" srcset="https://cdn.ohc.network/light-logo.svg">
<img alt="CARE Logo" src="https://user-images.githubusercontent.com/25143503/193396107-27e0d587-b195-4e95-a795-5d0663d5cd81.svg">
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/ohcnetwork/branding/refs/heads/main/Care/SVG/Logo/Care-Logo_gradient_mark_with_white_wordmark.svg">
<img alt="CARE Logo" src="https://raw.githubusercontent.com/ohcnetwork/branding/refs/heads/main/Care/SVG/Logo/Care-Logo_gradient_mark_with_dark_wordmark.svg" width="400">
</picture>
</p>
</a>
Expand Down
1 change: 1 addition & 0 deletions cypress/e2e/auth_spec/auth.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ describe("Authorisation/Authentication", () => {
it("Try login as admin with correct password", () => {
cy.loginByApi("devdistrictadmin", "Coronasafe@123");
cy.awaitUrl("/facility");
cy.get("#user-profile-name").click();
cy.get("#sign-out-button").contains("Sign Out").click();
cy.url().should("include", "/");
});
Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/patient_spec/PatientBedManagement.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ describe("Patient swtich bed functionality", () => {
const patientConsultationPage = new PatientConsultationPage();
const switchBedOne = "Dummy Bed 4";
const switchBedTwo = "Dummy Bed 1";
const switchBedThree = "Dummy Bed 3";
const switchBedThree = "Dummy Bed 7";
const switchPatientOne = "Dummy Patient 6";
const switchPatientTwo = "Dummy Patient 7";

Expand Down
3 changes: 1 addition & 2 deletions cypress/e2e/patient_spec/PatientDoctorConnect.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ describe("Patient Doctor Connect in consultation page", () => {
const doctorconnect = new DoctorConnect();
const patientName = "Dummy Patient 11";
const doctorUser = "Dev Doctor";
const doctorUserNumber = "+919876543219";
const nurseUser = "Dev Staff";
const teleIcuUser = "Dev Doctor Two";

Expand Down Expand Up @@ -37,7 +36,7 @@ describe("Patient Doctor Connect in consultation page", () => {
"#doctor-connect-home-doctor",
doctorUser,
);
doctorconnect.verifyCopiedContent(doctorUserNumber);
doctorconnect.verifyCopiedContent();
// verify the whatsapp and phone number icon presence
doctorconnect.verifyIconVisible("#whatsapp-icon");
doctorconnect.verifyIconVisible("#phone-icon");
Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/patient_spec/PatientDoctorNotes.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ describe("Patient Discussion notes in the consultation page", () => {
cy.verifyNotification(discussionNotesSuccessMessage);
cy.closeNotification();
// verify the auto-switching of tab to nurse notes if the user is a nurse
cy.get("#sign-out-button").contains("Sign Out").click();
patientDoctorNotes.signout();
loginPage.loginManuallyAsNurse();
loginPage.ensureLoggedIn();
cy.visit("/patients");
Expand Down
4 changes: 2 additions & 2 deletions cypress/e2e/patient_spec/PatientLogUpdate.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -302,9 +302,9 @@ describe("Patient Log Update in Normal, Critical and TeleIcu", () => {
patientRhythm,
]);
patientLogupdate.clickUpdateDetail();
patientLogupdate.clickClearButtonInElement("#systolic");
patientLogupdate.clearIntoElementById("#systolic");
patientLogupdate.typeSystolic(patientModifiedSystolic);
patientLogupdate.clickClearButtonInElement("#diastolic");
patientLogupdate.clearIntoElementById("#diastolic");
patientLogupdate.typeDiastolic(patientModifiedDiastolic);
cy.submitButton("Continue");
cy.verifyNotification("Brief Update updated successfully");
Expand Down
2 changes: 2 additions & 0 deletions cypress/e2e/users_spec/UsersCreation.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ describe("User Creation", () => {

it("Update the existing user profile and verify its reflection", () => {
userCreationPage.clickElementById("user-profile-name");
userCreationPage.clickElementById("profile-button");
userCreationPage.verifyElementContainsText(
"username-profile-details",
"devdistrictadmin",
Expand Down Expand Up @@ -129,6 +130,7 @@ describe("User Creation", () => {

it("Update the existing user profile Form Mandatory File Error", () => {
userCreationPage.clickElementById("user-profile-name");
userCreationPage.clickElementById("profile-button");
userCreationPage.clickElementById("edit-cancel-profile-button");
userCreationPage.clearIntoElementById("firstName");
userCreationPage.clearIntoElementById("lastName");
Expand Down
2 changes: 1 addition & 1 deletion cypress/pageobject/Facility/FacilityHome.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ class FacilityHome {
}

verifyOccupancyBadgeVisibility() {
cy.get("#occupany-badge").should("be.visible");
cy.get('[data-test-id="occupancy-badge"]').should("be.visible");
}

verifyAndCloseNotifyModal() {
Expand Down
2 changes: 2 additions & 0 deletions cypress/pageobject/Login/LoginPage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ class LoginPage {
}

ensureLoggedIn(): void {
cy.get("#user-profile-name").click();
cy.get("#sign-out-button").scrollIntoView();
cy.get("#sign-out-button").contains("Sign Out").should("exist");
}
}
Expand Down
4 changes: 2 additions & 2 deletions cypress/pageobject/Patient/PatientDoctorConnect.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ export class DoctorConnect {
});
}

verifyCopiedContent(text: string) {
cy.get("@clipboardStub").should("be.calledWith", text);
verifyCopiedContent() {
cy.get("@clipboardStub").should("be.calledWithMatch", /^\+91\d{10}$/);
}

verifyIconVisible(selector: string) {
Expand Down
6 changes: 6 additions & 0 deletions cypress/pageobject/Patient/PatientDoctorNotes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,10 @@ export class PatientDoctorNotes {
.its("response.statusCode")
.should("eq", 201);
}

signout() {
cy.get("#user-profile-name").click();
cy.get("#sign-out-button").scrollIntoView();
cy.get("#sign-out-button").contains("Sign Out").click();
}
}
10 changes: 5 additions & 5 deletions cypress/pageobject/Patient/PatientLogupdate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,19 +43,19 @@ class PatientLogupdate {
}

typeSystolic(systolic: string) {
cy.typeAndSelectOption("#systolic", systolic);
cy.get("#systolic").click().type(systolic);
}

typeDiastolic(diastolic: string) {
cy.typeAndSelectOption("#diastolic", diastolic);
cy.get("#diastolic").click().type(diastolic);
}

typePulse(pulse: string) {
cy.typeAndSelectOption("#pulse", pulse);
}

typeTemperature(temperature: string) {
cy.typeAndSelectOption("#temperature", temperature);
cy.get("#temperature").click().type(temperature);
}

typeRespiratory(respiratory: string) {
Expand Down Expand Up @@ -93,8 +93,8 @@ class PatientLogupdate {
cy.wait(3000);
}

clickClearButtonInElement(elementId: string) {
cy.get(elementId).find("#clear-button").click();
clearIntoElementById(elementId) {
cy.get(elementId).click().clear();
}

clickVitals() {
Expand Down
1 change: 1 addition & 0 deletions cypress/pageobject/Users/ManageUserPage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ export class ManageUserPage {
navigateToProfile() {
cy.intercept("GET", "**/api/v1/users/**").as("getUsers");
cy.get("#user-profile-name").click();
cy.get("#profile-button").click();
cy.wait("@getUsers").its("response.statusCode").should("eq", 200);
}

Expand Down
Loading

0 comments on commit 034f9b5

Please sign in to comment.