Skip to content

Commit

Permalink
Merge pull request #6208 from coronasafe/develop
Browse files Browse the repository at this point in the history
Production Release; Sep Week 1
  • Loading branch information
mathew-alex authored Sep 1, 2023
2 parents b91e9cb + e21652b commit ba110a2
Show file tree
Hide file tree
Showing 34 changed files with 1,074 additions and 349 deletions.
4 changes: 2 additions & 2 deletions cypress/e2e/assets_spec/assets_manage.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ describe("Asset", () => {
"[email protected]",
"Vendor's Name",
serialNumber,
"2021-12-25",
"25122021",
"Test note for asset creation!"
);

Expand All @@ -80,7 +80,7 @@ describe("Asset", () => {
"[email protected]",
"Vendor's Name",
serialNumber,
"2021-12-25",
"25122021",
"Test note for asset creation!"
);

Expand Down
15 changes: 8 additions & 7 deletions cypress/e2e/patient_spec/patient_crud.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ import { afterEach, before, beforeEach, cy, describe, it } from "local-cypress";
const username = "devdistrictadmin";
const password = "Coronasafe@123";
const phone_number = "9" + Math.floor(100000000 + Math.random() * 900000000);
const emergency_phone_number = "9430123487";
const emergency_phone_number =
"9" + Math.floor(100000000 + Math.random() * 900000000);
const yearOfBirth = "2023";
let patient_url = "";

Expand Down Expand Up @@ -104,9 +105,11 @@ describe("Patient Creation with consultation", () => {
cy.get("[data-testid=name] input").clear();
cy.get("[data-testid=name] input").type("Test E2E User Edited");
cy.get("#phone_number-div").clear();
cy.get("#phone_number-div").type("+919846856666");
cy.get("#phone_number-div").type("+91").type(phone_number);
cy.get("#emergency_phone_number-div").clear();
cy.get("#emergency_phone_number-div").type("+919120330220");
cy.get("#emergency_phone_number-div")
.type("+91")
.type(emergency_phone_number);
cy.get("#present_health").type("Severe Cough");
cy.get("#ongoing_medication").type("Paracetamol");
cy.get("#allergies").type("Dust");
Expand Down Expand Up @@ -142,10 +145,7 @@ describe("Patient Creation with consultation", () => {
"contain",
"Test E2E User Edited"
);
cy.get("[data-testid=patient-dashboard]").should(
"contain",
"+919120330220"
);
cy.get("[data-testid=patient-dashboard]").should("contain", phone_number);
const patientDetails_values: string[] = [
"Severe Cough",
"Paracetamol",
Expand All @@ -165,6 +165,7 @@ describe("Patient Creation with consultation", () => {
cy.intercept("GET", "**/api/v1/patient/**").as("getFacilities");
cy.visit(patient_url + "/consultation");
cy.wait("@getFacilities").its("response.statusCode").should("eq", 200);
cy.get("#history_of_present_illness").scrollIntoView;
cy.get("#history_of_present_illness").should("be.visible");
cy.get("#history_of_present_illness").click().type("histroy");
cy.get("#consultation_status")
Expand Down
6 changes: 3 additions & 3 deletions cypress/e2e/users_spec/user_crud.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ describe("User management", () => {
cy.intercept(/\/api\/v1\/facility/).as("facility");
cy.get("[name='facilities']")
.click()
.type("cypress facility")
.type("Dummy Facility 1")
.wait("@facility");
cy.get("li[role='option']").first().click();
cy.get("input[type='checkbox']").click();
Expand Down Expand Up @@ -93,7 +93,7 @@ describe("User management", () => {
cy.get("button[id='facilities']").click();
cy.wait("@userFacility")
.getAttached("div[id=facility_0] > div > span")
.contains("cypress facility");
.contains("Dummy Facility 1");
});
});

Expand All @@ -102,7 +102,7 @@ describe("User management", () => {
cy.intercept(/\/api\/v1\/facility/).as("getFacilities");
cy.get("[name='facility']")
.click()
.type("cypress facility")
.type("Dummy Facility 1")
.wait("@getFacilities");
cy.get("li[role='option']").first().click();
cy.intercept(/\/api\/v1\/users\/\w+\/add_facility\//).as("addFacility");
Expand Down
7 changes: 4 additions & 3 deletions cypress/pageobject/Asset/AssetCreation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,10 @@ export class AssetPage {
cy.get("[data-testid=asset-support-email-input] input").type(supportEmail);
cy.get("[data-testid=asset-vendor-name-input] input").type(vendorName);
cy.get("[data-testid=asset-serial-number-input] input").type(serialNumber);
cy.get("[data-testid=asset-last-serviced-on-input] input").type(
lastServicedOn
);
cy.get(
"[data-testid=asset-last-serviced-on-input] input[type='text']"
).click();
cy.get("#date-input").click().type(lastServicedOn);
cy.get("[data-testid=asset-notes-input] textarea").type(notes);
}

Expand Down
Loading

1 comment on commit ba110a2

@vercel
Copy link

@vercel vercel bot commented on ba110a2 Sep 1, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

care-storybook – ./

care-storybook-git-master-ohcnetwork.vercel.app
care-storybook-ohcnetwork.vercel.app

Please sign in to comment.