Skip to content

Commit

Permalink
Merge branch 'coronasafe:develop' into FIx-ohcnetwork#7244
Browse files Browse the repository at this point in the history
  • Loading branch information
AshrafMd-1 authored Mar 1, 2024
2 parents 537e0b8 + de5d7ce commit 9779729
Show file tree
Hide file tree
Showing 79 changed files with 1,913 additions and 1,349 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/thank-you.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
uses: actions/[email protected]
with:
script: |
const thankyouNote = 'We truly appreciate your efforts. Thank you for taking the time to contribute; this is a very valuable contribution to us :1st_place_medal:. We always welcome your contribution :slightly_smiling_face:, so feel free to contribute to anything anytime, and never lose that spirit of innovation :raised_hands:.'
const thankyouNote = 'Your efforts have helped advance digital healthcare and TeleICU systems. :rocket: Thank you for taking the time out to make CARE better. We hope you continue to innovate and contribute; your impact is immense! :raised_hands:'
const options = {
issue_number: context.issue.number,
owner: context.repo.owner,
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2020 Corona Safe
Copyright (c) 2024 Open Healthcare Network

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
32 changes: 32 additions & 0 deletions cypress/e2e/auth_spec/redirect.cy.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
import { cy, describe, it, beforeEach, Cypress } from "local-cypress";
import LoginPage from "../../pageobject/Login/LoginPage";

describe("redirect", () => {
const loginPage = new LoginPage();

beforeEach(() => {
cy.log("Logging in the user devdistrictadmin");
});

it("Check if login redirects to the right url", () => {
cy.awaitUrl("/resource/board", true);
loginPage.loginManuallyAsDistrictAdmin();
loginPage.ensureLoggedIn();
cy.url().should("include", "/resource/board");
});

it("Check if the redirect param works", () => {
const baseUrl = Cypress.config("baseUrl");
cy.awaitUrl(`login?redirect=${baseUrl}/resource/board`, true);
loginPage.loginManuallyAsDistrictAdmin();
loginPage.ensureLoggedIn();
cy.url().should("include", "/resource/board");
});

it("Check to ensure that redirect is the same origin", () => {
cy.awaitUrl("login?redirect=https://google.com", true);
loginPage.loginManuallyAsDistrictAdmin();
loginPage.ensureLoggedIn();
cy.url().should("include", "/facility");
});
});
80 changes: 0 additions & 80 deletions cypress/e2e/death_report_spec/death_report.cy.ts

This file was deleted.

11 changes: 11 additions & 0 deletions cypress/e2e/facility_spec/facility_creation.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -136,25 +136,30 @@ describe("Facility Creation", () => {
facilityPage.fillExpectedDTypeCylinderRequirement(oxygenExpected);
facilityPage.selectLocation("Kochi, Kerala");
facilityPage.submitForm();
cy.closeNotification();
// create multiple bed capacity and verify card reflection
facilityPage.selectBedType("Oxygen beds");
facilityPage.fillTotalCapacity(bedCapacity);
facilityPage.fillCurrentlyOccupied(bedOccupancy);
facilityPage.clickbedcapcityaddmore();
cy.closeNotification();
facilityPage.selectBedType("Ordinary Bed");
facilityPage.fillTotalCapacity(bedCapacity);
facilityPage.fillCurrentlyOccupied(bedOccupancy);
facilityPage.clickbedcapcityaddmore();
cy.closeNotification();
facilityPage.getTotalBedCapacity().contains(totalCapacity);
facilityPage.getTotalBedCapacity().contains(totalOccupancy);
facilityPage.clickcancelbutton();
// create multiple bed capacity and verify card reflection
facilityPage.selectAreaOfSpecialization("General Medicine");
facilityPage.fillDoctorCount(doctorCapacity);
facilityPage.clickdoctorcapacityaddmore();
cy.closeNotification();
facilityPage.selectAreaOfSpecialization("Pulmonology");
facilityPage.fillDoctorCount(doctorCapacity);
facilityPage.clickdoctorcapacityaddmore();
cy.closeNotification();
facilityPage.getTotalDoctorCapacity().contains(doctorCapacity);
facilityPage.clickcancelbutton();
facilityPage.verifyfacilitynewurl();
Expand Down Expand Up @@ -186,6 +191,12 @@ describe("Facility Creation", () => {
facilityPage.getFacilityTotalBedCapacity().contains(totalOccupancy);
facilityPage.getFacilityTotalDoctorCapacity().scrollIntoView();
facilityPage.getFacilityTotalDoctorCapacity().contains(totalDoctor);
// verify the delete functionality
cy.get("#manage-facility-dropdown button").scrollIntoView();
facilityPage.clickManageFacilityDropdown();
facilityPage.clickDeleteFacilityOption();
facilityPage.confirmDeleteFacility();
cy.verifyNotification("Facility deleted successfully");
});

it("Create a new facility with single bed and doctor capacity", () => {
Expand Down
5 changes: 5 additions & 0 deletions cypress/e2e/facility_spec/facility_homepage.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ describe("Facility Homepage Function", () => {

it("Verify the Facility card button redirection", () => {
// view cns button
manageUserPage.typeFacilitySearch(facilityName);
facilityPage.verifyFacilityBadgeContent(facilityName);
manageUserPage.assertFacilityInCard(facilityName);
facilityHome.clickViewCnsButton();
facilityHome.verifyCnsUrl();
facilityHome.navigateBack();
Expand Down Expand Up @@ -121,6 +124,8 @@ describe("Facility Homepage Function", () => {
facilityPage.selectLocalBody(localBody);
userPage.applyFilter();
// go to cns page in the facility details page
manageUserPage.typeFacilitySearch(facilityName);
facilityPage.verifyFacilityBadgeContent(facilityName);
manageUserPage.assertFacilityInCard(facilityName);
facilityHome.clickViewFacilityDetails();
facilityHome.clickFacilityCnsButton();
Expand Down
9 changes: 0 additions & 9 deletions cypress/e2e/facility_spec/facility_manage.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -161,15 +161,6 @@ describe("Facility Manage Functions", () => {
);
});

it("Delete a existing facility and verify the error message", () => {
facilityPage.clickManageFacilityDropdown();
facilityPage.clickDeleteFacilityOption();
facilityPage.confirmDeleteFacility();
facilityManage.verifySuccessMessageVisibilityAndContent(
"You do not have permission to perform this action."
);
});

afterEach(() => {
cy.saveLocalStorage();
});
Expand Down
Loading

0 comments on commit 9779729

Please sign in to comment.