diff --git a/cypress/e2e/assets_spec/asset_homepage.cy.ts b/cypress/e2e/assets_spec/asset_homepage.cy.ts
index a2c1c7734d2..388f19424a4 100644
--- a/cypress/e2e/assets_spec/asset_homepage.cy.ts
+++ b/cypress/e2e/assets_spec/asset_homepage.cy.ts
@@ -62,7 +62,7 @@ describe("Asset Tab", () => {
it("Filter Asset", () => {
assetFilters.filterAssets(
- "Dummy Facility 1",
+ "Dummy Facility 40",
"INTERNAL",
"ACTIVE",
"ONVIF Camera",
@@ -70,7 +70,7 @@ describe("Asset Tab", () => {
);
assetFilters.clickadvancefilter();
assetFilters.clickslideoverbackbutton(); // to verify the back button doesn't clear applied filters
- assetFilters.assertFacilityText("Dummy Facility 1");
+ assetFilters.assertFacilityText("Dummy Facility 40");
assetFilters.assertAssetTypeText("INTERNAL");
assetFilters.assertAssetClassText("ONVIF");
assetFilters.assertStatusText("ACTIVE");
@@ -89,7 +89,7 @@ describe("Asset Tab", () => {
it("Import new asset", () => {
assetPage.selectassetimportbutton();
assetPage.selectImportOption();
- assetPage.selectImportFacility("Dummy Facility 1");
+ assetPage.selectImportFacility("Dummy Facility 40");
assetPage.importAssetFile();
assetPage.selectImportLocation("Camera Loc");
assetPage.clickImportAsset();
diff --git a/cypress/e2e/assets_spec/assets_creation.cy.ts b/cypress/e2e/assets_spec/assets_creation.cy.ts
index dde4e0d0e8b..63f8bee50c8 100644
--- a/cypress/e2e/assets_spec/assets_creation.cy.ts
+++ b/cypress/e2e/assets_spec/assets_creation.cy.ts
@@ -25,7 +25,7 @@ describe("Asset", () => {
it("Verify asset creation fields throws error if empty", () => {
assetPage.createAsset();
- assetPage.selectFacility("Dummy Facility 1");
+ assetPage.selectFacility("Dummy Facility 40");
assetPage.clickCreateAsset();
assetPage.verifyEmptyAssetNameError();
@@ -39,7 +39,7 @@ describe("Asset", () => {
it("Create an Asset", () => {
assetPage.createAsset();
- assetPage.selectFacility("Dummy Facility 1");
+ assetPage.selectFacility("Dummy Facility 40");
assetPage.selectLocation("Camera Loc");
assetPage.selectAssetType("Internal");
assetPage.selectAssetClass("ONVIF Camera");
@@ -139,7 +139,7 @@ describe("Asset", () => {
it("Add an vital monitor asset and configure it", () => {
assetPage.createAsset();
- assetPage.selectFacility("Dummy Facility 1");
+ assetPage.selectFacility("Dummy Facility 40");
assetPage.selectLocation("Camera Loc");
assetPage.selectAssetType("Internal");
assetPage.selectAssetClass("HL7 Vitals Monitor");
diff --git a/cypress/e2e/assets_spec/assets_manage.cy.ts b/cypress/e2e/assets_spec/assets_manage.cy.ts
index 92a4f5be9b8..3a47ebec8df 100644
--- a/cypress/e2e/assets_spec/assets_manage.cy.ts
+++ b/cypress/e2e/assets_spec/assets_manage.cy.ts
@@ -17,7 +17,7 @@ describe("Asset", () => {
const facilityPage = new FacilityPage();
const assetSearchPage = new AssetSearchPage();
const assetFilters = new AssetFilters();
- const fillFacilityName = "Dummy Facility 1";
+ const fillFacilityName = "Dummy Facility 40";
const assetname = "Dummy Camera";
const locationName = "Dummy Location 1";
const initiallocationName = "Camera Location";
diff --git a/cypress/e2e/facility_spec/facility_creation.cy.ts b/cypress/e2e/facility_spec/facility_creation.cy.ts
index ab9d72f430f..ea27938c7e9 100644
--- a/cypress/e2e/facility_spec/facility_creation.cy.ts
+++ b/cypress/e2e/facility_spec/facility_creation.cy.ts
@@ -30,7 +30,7 @@ describe("Facility Creation", () => {
const doctorCapacity = "5";
const totalDoctor = "10";
const facilityName = "cypress facility";
- const facilityName2 = "Dummy Facility 1";
+ const facilityName2 = "Dummy Facility 40";
const facilityAddress = "cypress address";
const facilityUpdateAddress = "cypress updated address";
const facilityNumber = "9898469865";
diff --git a/cypress/e2e/facility_spec/facility_homepage.cy.ts b/cypress/e2e/facility_spec/facility_homepage.cy.ts
index 5d1cef4efcf..2ed666ac842 100644
--- a/cypress/e2e/facility_spec/facility_homepage.cy.ts
+++ b/cypress/e2e/facility_spec/facility_homepage.cy.ts
@@ -18,7 +18,7 @@ describe("Facility Homepage Function", () => {
const capacitiesAlias = "downloadCapacitiesCSV";
const doctorsAlias = "downloadDoctorsCSV";
const triagesAlias = "downloadTriagesCSV";
- const facilityName = "Dummy Facility 1";
+ const facilityName = "Dummy Facility 40";
const facilityLocaion = "Dummy Location";
const stateName = "Kerala";
const district = "Ernakulam";
diff --git a/cypress/e2e/facility_spec/locations.cy.ts b/cypress/e2e/facility_spec/locations.cy.ts
index 1f2726c79ab..97727e05ca0 100644
--- a/cypress/e2e/facility_spec/locations.cy.ts
+++ b/cypress/e2e/facility_spec/locations.cy.ts
@@ -23,6 +23,7 @@ describe("Location Management Section", () => {
"Please select a bed type",
];
const locationName = "Test-location";
+ const locationNameTwo = "Test-location-2";
const locationDescription = "Test Description";
const locationType = "WARD";
const locationMiddleware = "dev_middleware.coronasafe.live";
@@ -57,7 +58,20 @@ describe("Location Management Section", () => {
it("Add a Bed to facility location along with duplication and deleting a bed", () => {
// mandatory field verification in bed creation
- facilityLocation.clickManageBedButton();
+ cy.get("body").then(($body) => {
+ if ($body.find("#manage-bed-button:visible").length) {
+ // If the '#manage-bed-button' is visible
+ facilityLocation.clickManageBedButton();
+ } else {
+ // If the '#manage-bed-button' is not visible
+ facilityLocation.clickAddNewLocationButton();
+ facilityPage.fillFacilityName(locationName);
+ facilityLocation.selectLocationType(locationType);
+ assetPage.clickassetupdatebutton();
+ facilityLocation.clickNotification();
+ facilityLocation.clickManageBedButton();
+ }
+ });
facilityLocation.clickAddBedButton();
assetPage.clickassetupdatebutton();
userCreationPage.verifyErrorMessages(EXPECTED_BED_ERROR_MESSAGES);
@@ -97,13 +111,14 @@ describe("Location Management Section", () => {
assetPage.clickassetupdatebutton();
userCreationPage.verifyErrorMessages(EXPECTED_LOCATION_ERROR_MESSAGES);
// create a new location
- facilityPage.fillFacilityName(locationName);
+ facilityPage.fillFacilityName(locationNameTwo);
facilityLocation.fillDescription(locationDescription);
facilityLocation.selectLocationType(locationType);
facilityLocation.fillMiddlewareAddress(locationMiddleware);
assetPage.clickassetupdatebutton();
+ facilityLocation.clickNotification();
// verify the reflection
- facilityLocation.verifyLocationName(locationName);
+ facilityLocation.verifyLocationName(locationNameTwo);
facilityLocation.verifyLocationType(locationType);
facilityLocation.verifyLocationDescription(locationDescription);
facilityLocation.verifyLocationMiddleware(locationMiddleware);
@@ -130,6 +145,7 @@ describe("Location Management Section", () => {
facilityLocation.selectBedType(bedType);
facilityLocation.setMultipleBeds(numberOfBeds);
assetPage.clickassetupdatebutton();
+ facilityLocation.clickNotification();
// verify the bed creation
facilityLocation.verifyBedBadge(bedType);
facilityLocation.verifyBedBadge(bedStatus);
diff --git a/cypress/e2e/patient_spec/patient_crud.cy.ts b/cypress/e2e/patient_spec/patient_crud.cy.ts
index 66c8b35e236..38eec604758 100644
--- a/cypress/e2e/patient_spec/patient_crud.cy.ts
+++ b/cypress/e2e/patient_spec/patient_crud.cy.ts
@@ -35,7 +35,7 @@ describe("Patient Creation with consultation", () => {
it("Create a new patient with no consultation", () => {
patientPage.createPatient();
- patientPage.selectFacility("dummy facility");
+ patientPage.selectFacility("dummy facility 40");
patientPage.patientformvisibility();
patientPage.enterPatientDetails(
phone_number,
diff --git a/cypress/e2e/resource_spec/filter.cy.ts b/cypress/e2e/resource_spec/filter.cy.ts
index c457f867ed4..d9f5f50c16f 100644
--- a/cypress/e2e/resource_spec/filter.cy.ts
+++ b/cypress/e2e/resource_spec/filter.cy.ts
@@ -16,7 +16,7 @@ describe("Resource filter", () => {
cy.intercept(/\/api\/v1\/getallfacilities/).as("facilities_filter");
cy.contains("Filters").click();
cy.get("[name='origin_facility']")
- .type("Dummy Facility 1")
+ .type("Dummy Facility 40")
.wait("@facilities_filter");
cy.get("[role='option']").first().click();
cy.contains("Apply").click();
diff --git a/cypress/e2e/resource_spec/resources.cy.ts b/cypress/e2e/resource_spec/resources.cy.ts
index a774023059f..7077f4082a2 100644
--- a/cypress/e2e/resource_spec/resources.cy.ts
+++ b/cypress/e2e/resource_spec/resources.cy.ts
@@ -41,7 +41,7 @@ describe("Resource Page", () => {
it("Create a resource request", () => {
cy.visit("/facility");
- cy.get("#search").click().type("dummy facility 1");
+ cy.get("#search").click().type("dummy facility 40");
cy.intercept("GET", "**/api/v1/facility/**").as("loadFacilities");
cy.get("#facility-details").click();
cy.wait("@loadFacilities").its("response.statusCode").should("eq", 200);
diff --git a/cypress/e2e/users_spec/user_creation.cy.ts b/cypress/e2e/users_spec/user_creation.cy.ts
index 55d4b3bef1a..72d2e7f15f4 100644
--- a/cypress/e2e/users_spec/user_creation.cy.ts
+++ b/cypress/e2e/users_spec/user_creation.cy.ts
@@ -15,7 +15,7 @@ describe("User Creation", () => {
const userCreationPage = new UserCreationPage();
const facilityPage = new FacilityPage();
const assetSearchPage = new AssetSearchPage();
- const fillFacilityName = "Dummy Facility 1";
+ const fillFacilityName = "Dummy Facility 40";
const makeid = (length: number) => {
let result = "";
const characters = "abcdefghijklmnopqrstuvwxyz0123456789";
diff --git a/cypress/e2e/users_spec/user_manage.cy.ts b/cypress/e2e/users_spec/user_manage.cy.ts
index 35818751526..05e84715be1 100644
--- a/cypress/e2e/users_spec/user_manage.cy.ts
+++ b/cypress/e2e/users_spec/user_manage.cy.ts
@@ -16,7 +16,7 @@ describe("Manage User", () => {
const usernameforworkinghour = "devdistrictadmin";
const usernamerealname = "Dummy Doctor";
const facilitytolinkusername = "Dummy Shifting Center";
- const facilitytolinkskill = "Dummy Facility 1";
+ const facilitytolinkskill = "Dummy Facility 40";
const workinghour = "23";
const linkedskill = "General Medicine";
diff --git a/cypress/e2e/users_spec/user_profile.cy.ts b/cypress/e2e/users_spec/user_profile.cy.ts
index b6fe64b2455..3f3202eb423 100644
--- a/cypress/e2e/users_spec/user_profile.cy.ts
+++ b/cypress/e2e/users_spec/user_profile.cy.ts
@@ -17,7 +17,7 @@ describe("Manage User Profile", () => {
const doctorYoE = "10";
const medicalCouncilRegistration = "1234567890";
- const facilitySearch = "Dummy Facility 1";
+ const facilitySearch = "Dummy Facility 40";
before(() => {
loginPage.loginAsDevDoctor();
diff --git a/cypress/pageobject/Asset/AssetFilters.ts b/cypress/pageobject/Asset/AssetFilters.ts
index 9a8d9781786..5ded59f4f63 100644
--- a/cypress/pageobject/Asset/AssetFilters.ts
+++ b/cypress/pageobject/Asset/AssetFilters.ts
@@ -56,9 +56,7 @@ export class AssetFilters {
});
}
clickadvancefilter() {
- cy.intercept("GET", "**/api/v1/getallfacilities/**").as("advancefilter");
cy.get("#advanced-filter").click();
- cy.wait("@advancefilter").its("response.statusCode").should("eq", 200);
}
clickslideoverbackbutton() {
cy.get("#close-slide-over").click();
diff --git a/cypress/pageobject/Facility/FacilityCreation.ts b/cypress/pageobject/Facility/FacilityCreation.ts
index e6569799eaa..6be99cf5758 100644
--- a/cypress/pageobject/Facility/FacilityCreation.ts
+++ b/cypress/pageobject/Facility/FacilityCreation.ts
@@ -26,7 +26,7 @@ class FacilityPage {
}
fillFacilityName(name: string) {
- cy.get("#name").clear().type(name);
+ cy.get("#name").click().clear().click().type(name);
}
fillPincode(pincode: string) {
diff --git a/cypress/pageobject/Facility/FacilityLocation.ts b/cypress/pageobject/Facility/FacilityLocation.ts
index f836b0773f6..b332d06ebf0 100644
--- a/cypress/pageobject/Facility/FacilityLocation.ts
+++ b/cypress/pageobject/Facility/FacilityLocation.ts
@@ -56,6 +56,10 @@ class FacilityLocation {
cy.get("#add-new-bed").click();
}
+ clickNotification() {
+ cy.get(".pnotify").click();
+ }
+
enterBedName(name: string) {
cy.get("#bed-name").click().clear().click().type(name);
}
diff --git a/public/config.json b/public/config.json
index 74e509fee59..9398e28c410 100644
--- a/public/config.json
+++ b/public/config.json
@@ -1,5 +1,4 @@
{
- "dashboard_url": "https://dashboard.coronasafe.in",
"github_url": "https://github.com/coronasafe",
"coronasafe_url": "https://coronasafe.network?ref=care",
"site_url": "care.coronasafe.in",
@@ -23,4 +22,4 @@
"sample_format_asset_import": "https://spreadsheets.google.com/feeds/download/spreadsheets/Export?key=11JaEhNHdyCHth4YQs_44YaRlP77Rrqe81VSEfg1glko&exportFormat=xlsx",
"sample_format_external_result_import": "/External-Results-Template.csv",
"enable_abdm": true
-}
\ No newline at end of file
+}
diff --git a/src/Common/hooks/useConfig.ts b/src/Common/hooks/useConfig.ts
index 15e456ea571..79addd71c8b 100644
--- a/src/Common/hooks/useConfig.ts
+++ b/src/Common/hooks/useConfig.ts
@@ -8,7 +8,7 @@ interface ILogo {
}
export interface IConfig {
- dashboard_url: string;
+ dashboard_url?: string;
github_url: string;
coronasafe_url: string;
site_url: string;
diff --git a/src/Components/Common/Sidebar/Sidebar.tsx b/src/Components/Common/Sidebar/Sidebar.tsx
index 9d378df4267..af450d9583d 100644
--- a/src/Components/Common/Sidebar/Sidebar.tsx
+++ b/src/Components/Common/Sidebar/Sidebar.tsx
@@ -147,13 +147,15 @@ const StatelessSidebar = ({
handleOverflow={handleOverflow}
onClickCB={() => onItemClick && onItemClick(false)}
/>
-