Skip to content

Commit

Permalink
Merge branch 'develop' into doctors-and-nurses-discussions
Browse files Browse the repository at this point in the history
  • Loading branch information
rithviknishad authored May 12, 2024
2 parents 93bf621 + 0b042f2 commit 358d3f6
Show file tree
Hide file tree
Showing 40 changed files with 4,920 additions and 6,190 deletions.
15 changes: 10 additions & 5 deletions .storybook/main.ts
Original file line number Diff line number Diff line change
@@ -1,19 +1,24 @@
import type { StorybookConfig } from "@storybook/react-vite";

const config: StorybookConfig = {
stories: ["../src/**/*.mdx", "../src/**/*.stories.@(js|jsx|ts|tsx)"],
stories: ["../src/**/*.mdx", "../src/**/*.stories.@(js|jsx|mjs|ts|tsx)"],
addons: [
"@storybook/addon-links",
"@storybook/addon-essentials",
"@storybook/addon-interactions",
],
framework: {
name: "@storybook/react-vite",
options: {
builder: {
core: {
builder: {
name: "@storybook/builder-vite",
options: {
viteConfigPath: "./.storybook/vite.config.mts",
},
},
},
framework: {
name: "@storybook/react-vite",
options: {},
},
docs: {
autodocs: "tag",
},
Expand Down
12 changes: 3 additions & 9 deletions .storybook/preview-head.html
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
<script>
window.global = window;
</script>
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link
href="https://fonts.googleapis.com/css2?family=Inter:wght@100;200;300;400;500;600;700;800;900&display=swap"
rel="stylesheet"
/>
<script>
window.global = window;
</script>
3 changes: 1 addition & 2 deletions .storybook/preview.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,10 @@ import "../src/style/index.css";

const preview: Preview = {
parameters: {
actions: { argTypesRegex: "^on[A-Z].*" },
controls: {
matchers: {
color: /(background|color)$/i,
date: /Date$/,
date: /Date$/i,
},
},
},
Expand Down
10 changes: 5 additions & 5 deletions cypress/e2e/assets_spec/assets_creation.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ describe("Asset", () => {
"Vendor's Name",
serialNumber,
"25122021",
"Test note for asset creation!"
"Test note for asset creation!",
);

assetPage.clickCreateAddMore();
Expand All @@ -80,7 +80,7 @@ describe("Asset", () => {
"Vendor's Name",
serialNumber,
"25122021",
"Test note for asset creation!"
"Test note for asset creation!",
);

assetPage.interceptAssetCreation();
Expand All @@ -106,7 +106,7 @@ describe("Asset", () => {
"Customer Support's Name Edited",
"Vendor's Name Edited",
"Test note for asset creation edited!",
"25122021"
"25122021",
);

assetPage.clickUpdateAsset();
Expand All @@ -128,7 +128,7 @@ describe("Asset", () => {
"192.168.1.64",
"remote_user",
"2jCkrCRSeahzKEU",
"d5694af2-21e2-4a39-9bad-2fb98d9818bd"
"d5694af2-21e2-4a39-9bad-2fb98d9818bd",
);
assetPage.clickConfigureAsset();
assetPage.verifyAssetConfiguration(200);
Expand All @@ -155,7 +155,7 @@ describe("Asset", () => {
"Vendor's Name",
serialNumber,
"25122021",
"Test note for asset creation!"
"Test note for asset creation!",
);
assetPage.interceptAssetCreation();
assetPage.clickCreateAsset();
Expand Down
6 changes: 3 additions & 3 deletions cypress/e2e/facility_spec/facility_creation.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ describe("Facility Creation", () => {
initialTriageValue,
initialTriageValue,
initialTriageValue,
initialTriageValue
initialTriageValue,
);
manageUserPage.clickSubmit();
// edit the entry and verify reflection
Expand All @@ -106,7 +106,7 @@ describe("Facility Creation", () => {
modifiedTriageValue,
modifiedTriageValue,
modifiedTriageValue,
modifiedTriageValue
modifiedTriageValue,
);
manageUserPage.clickSubmit();
facilityPage.scrollToFacilityTriage();
Expand Down Expand Up @@ -318,7 +318,7 @@ describe("Facility Creation", () => {
facilityPage.fillMiddleWareAddress("dev_middleware.coronasafe.live");
facilityPage.clickupdateMiddleWare();
facilityPage.verifySuccessNotification(
"Facility middleware updated successfully"
"Facility middleware updated successfully",
);
});

Expand Down
24 changes: 12 additions & 12 deletions cypress/e2e/facility_spec/facility_manage.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,13 @@ describe("Facility Manage Functions", () => {
// verify mandatory field error message
facilityManage.clickButtonWithText(facilityMiddlewareUpdateButton);
facilityManage.checkErrorMessageVisibility(
"Middleware Address is required"
"Middleware Address is required",
);
// add middleware and verify the notification
facilityManage.typeMiddlewareAddress(facilityMiddleware);
facilityManage.clickButtonWithText(facilityMiddlewareUpdateButton);
facilityManage.verifySuccessMessageVisibilityAndContent(
facilityMiddlewareSuccessfullNotification
facilityMiddlewareSuccessfullNotification,
);
// update the existing middleware
facilityPage.clickManageFacilityDropdown();
Expand All @@ -68,7 +68,7 @@ describe("Facility Manage Functions", () => {
facilityManage.typeMiddlewareAddress(facilityUpdatedMiddleware);
facilityManage.clickButtonWithText(facilityMiddlewareUpdateButton);
facilityManage.verifySuccessMessageVisibilityAndContent(
facilityMiddlewareSuccessfullNotification
facilityMiddlewareSuccessfullNotification,
);
// verify the updated middleware
facilityPage.clickManageFacilityDropdown();
Expand All @@ -83,21 +83,21 @@ describe("Facility Manage Functions", () => {
facilityManage.clearHfrId();
facilityManage.clickButtonWithText(facilityHfridUpdateButton);
facilityManage.checkErrorMessageVisibility(
"Health Facility Id is required"
"Health Facility Id is required",
);
// add facility health ID and verify notification
facilityManage.typeHfrId(facilityHfrId);
facilityManage.clickButtonWithText(facilityHfridUpdateButton);
facilityManage.verifySuccessMessageVisibilityAndContent(
facilityHfridToastNotificationText
facilityHfridToastNotificationText,
);
// update the existing middleware
facilityPage.clickManageFacilityDropdown();
facilityManage.clickFacilityConfigureButton();
facilityManage.typeHfrId(facilityUpdatedHfrId);
facilityManage.clickButtonWithText(facilityHfridUpdateButton);
facilityManage.verifySuccessMessageVisibilityAndContent(
facilityHfridToastNotificationText
facilityHfridToastNotificationText,
);
// verify its reflection
facilityPage.clickManageFacilityDropdown();
Expand All @@ -112,22 +112,22 @@ describe("Facility Manage Functions", () => {
facilityPage.fillDoctorCount(doctorCapacity);
facilityPage.saveAndExitDoctorForm();
facilityManage.verifySuccessMessageVisibilityAndContent(
"Doctor count added successfully"
"Doctor count added successfully",
);
facilityManage.verifyTotalDoctorCapacity(doctorCapacity);
// edit a existing doctor
facilityManage.clickEditFacilityDoctorCapacity();
facilityPage.fillDoctorCount(doctorModifiedCapacity);
facilityPage.clickdoctorcapacityaddmore();
facilityManage.verifySuccessMessageVisibilityAndContent(
"Doctor count updated successfully"
"Doctor count updated successfully",
);
facilityManage.verifyTotalDoctorCapacity(doctorModifiedCapacity);
// delete a bed
facilityManage.clickDeleteFacilityDoctorCapacity();
facilityManage.clickButtonWithText("Delete");
facilityManage.verifySuccessMessageVisibilityAndContent(
"Doctor specialization type deleted successfully"
"Doctor specialization type deleted successfully",
);
});

Expand All @@ -139,7 +139,7 @@ describe("Facility Manage Functions", () => {
facilityPage.fillCurrentlyOccupied(currentOccupied);
facilityPage.saveAndExitBedCapacityForm();
facilityManage.verifySuccessMessageVisibilityAndContent(
"Bed capacity added successfully"
"Bed capacity added successfully",
);
cy.closeNotification();
facilityManage.verifyFacilityBedCapacity(totalCapacity);
Expand All @@ -150,7 +150,7 @@ describe("Facility Manage Functions", () => {
facilityPage.fillCurrentlyOccupied(currentUpdatedOccupied);
facilityPage.clickbedcapcityaddmore();
facilityManage.verifySuccessMessageVisibilityAndContent(
"Bed capacity updated successfully"
"Bed capacity updated successfully",
);
cy.closeNotification();
facilityManage.verifyFacilityBedCapacity(totalUpdatedCapacity);
Expand All @@ -159,7 +159,7 @@ describe("Facility Manage Functions", () => {
facilityManage.clickDeleteFacilityBedCapacity();
facilityManage.clickButtonWithText("Delete");
facilityManage.verifySuccessMessageVisibilityAndContent(
"Bed type deleted successfully"
"Bed type deleted successfully",
);
});

Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/facility_spec/inventory.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ describe("Inventory Management Section", () => {
facilityPage.fillInventoryMinimumDetails(inventoryName, "1");
facilityPage.clickSetButton();
facilityPage.verifySuccessNotification(
"Minimum quantiy updated successfully"
"Minimum quantiy updated successfully",
);
}
});
Expand Down
Loading

0 comments on commit 358d3f6

Please sign in to comment.