From 2f0a824f45421609b8c9313dd6e3764549d935bd Mon Sep 17 00:00:00 2001 From: Mohammed Nihal <57055998+nihal467@users.noreply.github.com> Date: Tue, 10 Sep 2024 18:28:13 +0300 Subject: [PATCH 1/5] New Cypress Test | Verify the Functionality of Critical Care | (#8517) --- .../e2e/patient_spec/patient_logupdate.cy.ts | 105 +++++++++++++++++- .../pageobject/Patient/PatientLogupdate.ts | 57 +++++++++- .../DailyRounds/DefaultLogUpdateCard.tsx | 1 + .../Form/FormFields/RangeFormField.tsx | 2 +- .../LogUpdate/CriticalCareEditor.tsx | 1 + .../LogUpdate/CriticalCarePreview.tsx | 1 + 6 files changed, 161 insertions(+), 6 deletions(-) diff --git a/cypress/e2e/patient_spec/patient_logupdate.cy.ts b/cypress/e2e/patient_spec/patient_logupdate.cy.ts index 13e69e33211..773b0087d80 100644 --- a/cypress/e2e/patient_spec/patient_logupdate.cy.ts +++ b/cypress/e2e/patient_spec/patient_logupdate.cy.ts @@ -27,6 +27,12 @@ describe("Patient Log Update in Normal, Critical and TeleIcu", () => { const patientSpo2 = "15"; const patientRhythmType = "Regular"; const patientRhythm = "Normal Rhythm"; + const patientEtco2 = "50"; + const patientOxygenFlowRate = "40"; + const patientBloodSugar = "52"; + const patientInsulinDosage = "56"; + const patientFluidBalance = "500"; + const patientNetBalance = "1000"; before(() => { loginPage.loginAsDisctrictAdmin(); @@ -39,6 +45,88 @@ describe("Patient Log Update in Normal, Critical and TeleIcu", () => { cy.awaitUrl("/patients"); }); + it("Create a basic critical care log update for a admitted patient and edit it", () => { + patientPage.visitPatient("Dummy Patient 10"); + patientLogupdate.clickLogupdate(); + cy.verifyNotification("Please assign a bed to the patient"); + patientLogupdate.selectBed("Dummy Bed 2"); + cy.closeNotification(); + patientLogupdate.clickLogupdate(); + patientLogupdate.selectPatientCategory(patientCategory); + patientLogupdate.selectRoundType("Detailed Update"); + cy.submitButton("Save and Continue"); + cy.verifyNotification("Detailed Update log created successfully"); + cy.closeNotification(); + // Select two Section - First One is Respiratory Support + patientLogupdate.selectCriticalCareSection("Respiratory Support"); + patientLogupdate.selectNoBilateralAirFlow(); + patientLogupdate.typeEtco2(patientEtco2); + patientLogupdate.selectOxygenSupport(); + patientLogupdate.typeOxygenFlowRate(patientOxygenFlowRate); + patientLogupdate.typeVentilatorSpo2(patientSpo2); + cy.submitButton("Update Details"); + cy.verifyNotification("Respiratory Support details succesfully updated."); + cy.closeNotification(); + // Second Section will be Blood Sugar + patientLogupdate.selectCriticalCareSection("Blood Sugar"); + patientLogupdate.typeBloodSugar(patientBloodSugar); + patientLogupdate.typeInsulinDosage(patientInsulinDosage); + cy.get("#insulin_intake_frequency-option-BD").click(); + cy.submitButton("Update Details"); + cy.verifyNotification("Blood Sugar details succesfully updated."); + // Submit the form and verify the details + cy.submitButton("Complete"); + cy.verifyNotification("Detailed Log Update filed successfully"); + cy.closeNotification(); + cy.contains("button", "Daily Rounds").click(); + patientLogupdate.clickLogUpdateViewDetails( + "#dailyround-entry", + patientCategory, + ); + cy.verifyContentPresence("#respiratory-support", [ + patientEtco2, + patientOxygenFlowRate, + ]); + cy.verifyContentPresence("#blood-sugar", [ + patientBloodSugar, + patientInsulinDosage, + ]); + // Go back and edit the data on a third section + patientLogupdate.clickGoBackConsultation(); + cy.contains("button", "Daily Rounds").click(); + patientLogupdate.clickLogUpdateUpdateLog( + "#dailyround-entry", + patientCategory, + ); + patientLogupdate.selectCriticalCareSection("Dialysis"); + patientLogupdate.typeFluidBalance(patientFluidBalance); + patientLogupdate.typeNetBalance(patientNetBalance); + cy.submitButton("Update Details"); + cy.verifyNotification("Dialysis details succesfully updated."); + cy.closeNotification(); + cy.submitButton("Complete"); + cy.verifyNotification("Detailed Log Update filed successfully"); + cy.closeNotification(); + //Reverify the editted and newly added data + cy.contains("button", "Daily Rounds").click(); + patientLogupdate.clickLogUpdateViewDetails( + "#dailyround-entry", + patientCategory, + ); + cy.verifyContentPresence("#respiratory-support", [ + patientEtco2, + patientOxygenFlowRate, + ]); + cy.verifyContentPresence("#blood-sugar", [ + patientBloodSugar, + patientInsulinDosage, + ]); + cy.verifyContentPresence("#dialysis", [ + patientFluidBalance, + patientNetBalance, + ]); + }); + it("Create a new Progress log update for a admitted patient and edit it", () => { patientPage.visitPatient("Dummy Patient 12"); patientLogupdate.clickLogupdate(); @@ -77,7 +165,7 @@ describe("Patient Log Update in Normal, Critical and TeleIcu", () => { cy.verifyNotification("Progress Note log created successfully"); cy.closeNotification(); // modify the relevant critical care log update - cy.contains("button", "Neurological Monitoring").click(); + patientLogupdate.selectCriticalCareSection("Neurological Monitoring"); cy.get("#consciousness_level-option-RESPONDS_TO_PAIN").click(); cy.get("#left_pupil_light_reaction-option-FIXED").click(); cy.submitButton("Update Details"); @@ -91,7 +179,10 @@ describe("Patient Log Update in Normal, Critical and TeleIcu", () => { cy.closeNotification(); // Verify the data reflection cy.contains("button", "Daily Rounds").click(); - patientLogupdate.clickLogupdateCard("#dailyround-entry", patientCategory); + patientLogupdate.clickLogUpdateViewDetails( + "#dailyround-entry", + patientCategory, + ); cy.verifyContentPresence("#consultation-preview", [ patientCategory, patientTemperature, @@ -158,7 +249,10 @@ describe("Patient Log Update in Normal, Critical and TeleIcu", () => { cy.closeNotification(); // edit the card and verify the data. cy.contains("button", "Daily Rounds").click(); - patientLogupdate.clickLogupdateCard("#dailyround-entry", patientCategory); + patientLogupdate.clickLogUpdateViewDetails( + "#dailyround-entry", + patientCategory, + ); cy.verifyContentPresence("#consultation-preview", [ patientCategory, patientDiastolic, @@ -179,7 +273,10 @@ describe("Patient Log Update in Normal, Critical and TeleIcu", () => { cy.submitButton("Continue"); cy.verifyNotification("Brief Update log updated successfully"); cy.contains("button", "Daily Rounds").click(); - patientLogupdate.clickLogupdateCard("#dailyround-entry", patientCategory); + patientLogupdate.clickLogUpdateViewDetails( + "#dailyround-entry", + patientCategory, + ); cy.verifyContentPresence("#consultation-preview", [ patientModifiedDiastolic, patientModifiedSystolic, diff --git a/cypress/pageobject/Patient/PatientLogupdate.ts b/cypress/pageobject/Patient/PatientLogupdate.ts index ca238fe115c..8a4c11ab25b 100644 --- a/cypress/pageobject/Patient/PatientLogupdate.ts +++ b/cypress/pageobject/Patient/PatientLogupdate.ts @@ -70,13 +70,20 @@ class PatientLogupdate { cy.get("#rhythm_detail").click().type(rhythm); } - clickLogupdateCard(element, patientCategory) { + clickLogUpdateViewDetails(element, patientCategory) { cy.get(element).scrollIntoView(); cy.verifyContentPresence(element, [patientCategory]); cy.get(element).first().contains("View Details").click(); cy.wait(3000); } + clickLogUpdateUpdateLog(element, patientCategory) { + cy.get(element).scrollIntoView(); + cy.verifyContentPresence(element, [patientCategory]); + cy.get(element).first().contains("Update Log").click(); + cy.wait(3000); + } + clickUpdateDetail() { cy.verifyAndClickElement("#consultation-preview", "Update Details"); cy.wait(3000); @@ -90,5 +97,53 @@ class PatientLogupdate { cy.get("#consultation_tab_nav").scrollIntoView(); cy.verifyAndClickElement("#consultation_tab_nav", "Vitals"); } + + selectNoBilateralAirFlow() { + cy.get("#bilateral_air_entry-option-false").click(); + } + + typeEtco2(etco2: string) { + cy.get("#etco2-range-input").type(etco2); + } + + selectOxygenSupport() { + cy.get("#respiratory_support-option-OXYGEN_SUPPORT").click(); + } + + selectNonBreathingModality() { + cy.get("#ventilator_oxygen_modality-option-NON_REBREATHING_MASK").click(); + } + + typeOxygenFlowRate(flowRate: string) { + cy.get("#oxygen_flow_rate-range-input").type(flowRate); + } + + typeVentilatorSpo2(spo2: string) { + cy.get("#ventilator_spo2-range-input").type(spo2); + } + + selectCriticalCareSection(sectionName: string) { + cy.contains("button", sectionName).click(); + } + + typeBloodSugar(bloodSugar: string) { + cy.get("#blood_sugar_level-range-input").type(bloodSugar); + } + + typeInsulinDosage(insulinDosage: string) { + cy.get("#insulin_intake_dose-range-input").type(insulinDosage); + } + + clickGoBackConsultation() { + cy.get("#back-to-consultation").click(); + } + + typeFluidBalance(fluid: string) { + cy.get("#dialysis_fluid_balance-range-input").type(fluid); + } + + typeNetBalance(netBalance: string) { + cy.get("#dialysis_net_balance-range-input").type(netBalance); + } } export default PatientLogupdate; diff --git a/src/Components/Facility/Consultations/DailyRounds/DefaultLogUpdateCard.tsx b/src/Components/Facility/Consultations/DailyRounds/DefaultLogUpdateCard.tsx index ae18e85e0d8..9096e66b69b 100644 --- a/src/Components/Facility/Consultations/DailyRounds/DefaultLogUpdateCard.tsx +++ b/src/Components/Facility/Consultations/DailyRounds/DefaultLogUpdateCard.tsx @@ -48,6 +48,7 @@ const DefaultLogUpdateCard = ({ round, ...props }: Props) => { {t("view_details")}
{ if (current) { diff --git a/src/Components/LogUpdate/CriticalCarePreview.tsx b/src/Components/LogUpdate/CriticalCarePreview.tsx index 67ad693ff48..61f4f2a3567 100644 --- a/src/Components/LogUpdate/CriticalCarePreview.tsx +++ b/src/Components/LogUpdate/CriticalCarePreview.tsx @@ -46,6 +46,7 @@ export default function CriticalCarePreview(props: Props) {
From 541ca1743d41254dbee91111fc41108a086cb8ac Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 10 Sep 2024 21:27:29 +0530 Subject: [PATCH 2/5] Bump @fontsource/inter from 5.0.18 to 5.0.21 (#8508) --- package-lock.json | 8 ++++---- package.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index 4615e263405..d67bca71a47 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,7 +9,7 @@ "version": "2.5.4", "license": "MIT", "dependencies": { - "@fontsource/inter": "^5.0.18", + "@fontsource/inter": "^5.0.21", "@googlemaps/react-wrapper": "^1.1.35", "@googlemaps/typescript-guards": "^2.0.3", "@headlessui/react": "^2.1.2", @@ -2550,9 +2550,9 @@ "license": "MIT" }, "node_modules/@fontsource/inter": { - "version": "5.0.18", - "resolved": "https://registry.npmjs.org/@fontsource/inter/-/inter-5.0.18.tgz", - "integrity": "sha512-YCsoYPTcs713sI7tLtxaPrIhXAXvEetGg5Ry02ivA8qUOb3fQHojbK/X9HLD5OOKvFUNR2Ynkwb1kR1hVKQHpw==" + "version": "5.0.21", + "resolved": "https://registry.npmjs.org/@fontsource/inter/-/inter-5.0.21.tgz", + "integrity": "sha512-Y4Ph0bYD5IfW8r9PSeiNjLvM6D/Bh5+YT9jOKiBqW3YS+AEBlmy8v74TpTNeZAvL3zHmikHCnzaKw7ob8LZiKQ==" }, "node_modules/@googlemaps/js-api-loader": { "version": "1.16.6", diff --git a/package.json b/package.json index 95cea780b72..6374c444222 100644 --- a/package.json +++ b/package.json @@ -44,7 +44,7 @@ "supported-browsers": "echo \"export default $(browserslist-useragent-regexp --allowHigherVersions --ignorePatch --ignoreMinor);\" | sed 's/\\x1b\\[[0-9;]*m//g' > src/supportedBrowsers.ts" }, "dependencies": { - "@fontsource/inter": "^5.0.18", + "@fontsource/inter": "^5.0.21", "@googlemaps/react-wrapper": "^1.1.35", "@googlemaps/typescript-guards": "^2.0.3", "@headlessui/react": "^2.1.2", From 382a55a2019a488314199014bcd0b7f441fe2bd6 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 10 Sep 2024 21:47:18 +0530 Subject: [PATCH 3/5] Bump @sentry/browser from 8.12.0 to 8.29.0 (#8509) --- package-lock.json | 194 +++++++++++++++++++++++----------------------- package.json | 2 +- 2 files changed, 98 insertions(+), 98 deletions(-) diff --git a/package-lock.json b/package-lock.json index d67bca71a47..4cc50cbe999 100644 --- a/package-lock.json +++ b/package-lock.json @@ -15,7 +15,7 @@ "@headlessui/react": "^2.1.2", "@pnotify/core": "^5.2.0", "@pnotify/mobile": "^5.2.0", - "@sentry/browser": "^8.12.0", + "@sentry/browser": "^8.29.0", "@yudiel/react-qr-scanner": "^2.0.0-beta.3", "axios": "^1.6.8", "bowser": "^2.11.0", @@ -3765,178 +3765,178 @@ ] }, "node_modules/@sentry-internal/browser-utils": { - "version": "8.12.0", - "resolved": "https://registry.npmjs.org/@sentry-internal/browser-utils/-/browser-utils-8.12.0.tgz", - "integrity": "sha512-h7HRqED15Qa+DRt8iZGna24Z331nglgjPzdFn4+u+jvnZrehUjH0vjsfuj7qhwSUNZu8Rxi1ZlUYFURjLDTKCA==", + "version": "8.29.0", + "resolved": "https://registry.npmjs.org/@sentry-internal/browser-utils/-/browser-utils-8.29.0.tgz", + "integrity": "sha512-6HpyQkaqPvK6Lnigjlarq/LDYgXT2OBNf24RK7z0ipJSxSIpmtelfzHbnwWYnypNDXfTDdPm97fZEenQHryYJA==", "dependencies": { - "@sentry/core": "8.12.0", - "@sentry/types": "8.12.0", - "@sentry/utils": "8.12.0" + "@sentry/core": "8.29.0", + "@sentry/types": "8.29.0", + "@sentry/utils": "8.29.0" }, "engines": { "node": ">=14.18" } }, "node_modules/@sentry-internal/browser-utils/node_modules/@sentry/core": { - "version": "8.12.0", - "resolved": "https://registry.npmjs.org/@sentry/core/-/core-8.12.0.tgz", - "integrity": "sha512-y+5Hlf/E45nj2adJy4aUCNBefQbyWIX66Z9bOM6JjnVB0hxCm5H0sYqrFKldYqaeZx6/Q2cgAcGs61krUxNerQ==", + "version": "8.29.0", + "resolved": "https://registry.npmjs.org/@sentry/core/-/core-8.29.0.tgz", + "integrity": "sha512-scMbZaJ0Ov8NPgWn86EdjhyTLrhvRVbTxjg0imJAvhIvRbblH3xyqye/17Qnk2fOp8TNDOl7TBZHi0NCFQ5HUw==", "dependencies": { - "@sentry/types": "8.12.0", - "@sentry/utils": "8.12.0" + "@sentry/types": "8.29.0", + "@sentry/utils": "8.29.0" }, "engines": { "node": ">=14.18" } }, "node_modules/@sentry-internal/browser-utils/node_modules/@sentry/types": { - "version": "8.12.0", - "resolved": "https://registry.npmjs.org/@sentry/types/-/types-8.12.0.tgz", - "integrity": "sha512-pKuW64IjgcklWAOHzPJ02Ej480hyL25TLnYCAfl2TDMrYc+N0bbbH1N7ZxqJpTSVK9IxZPY/t2TRxpQBiyPEcg==", + "version": "8.29.0", + "resolved": "https://registry.npmjs.org/@sentry/types/-/types-8.29.0.tgz", + "integrity": "sha512-j4gX3ctzgD4xVWllXAhm6M+kHFEvrFoUPFq60X/pgkjsWCocGuhtNfB0rW43ICG8hCnlz8IYl7O7b8V8qY7SPg==", "engines": { "node": ">=14.18" } }, "node_modules/@sentry-internal/browser-utils/node_modules/@sentry/utils": { - "version": "8.12.0", - "resolved": "https://registry.npmjs.org/@sentry/utils/-/utils-8.12.0.tgz", - "integrity": "sha512-pwYMoOmexz3vsNSOJGPvD2qwp/fsPcr8mkFk67wMM37Y+30KQ8pF4Aq1cc+HBRIn1tKmenzFDPTczSdVPFxm3Q==", + "version": "8.29.0", + "resolved": "https://registry.npmjs.org/@sentry/utils/-/utils-8.29.0.tgz", + "integrity": "sha512-nb93/m3SjQChQJFqJj3oNW3Rz/12yrT7jypTCire3c2hpYWG2uR5n8VY9UUMTA6HLNvdom6tckK7p3bXGXlF0w==", "dependencies": { - "@sentry/types": "8.12.0" + "@sentry/types": "8.29.0" }, "engines": { "node": ">=14.18" } }, "node_modules/@sentry-internal/feedback": { - "version": "8.12.0", - "resolved": "https://registry.npmjs.org/@sentry-internal/feedback/-/feedback-8.12.0.tgz", - "integrity": "sha512-PvQ14wVOPmzRdYdmXD791CqERZZC4jZa5hnyBKBuF6ZpifIQ4Uk7spPu6ZO+Ympx3GtRlpYjk4dbjHyNSfYTwA==", + "version": "8.29.0", + "resolved": "https://registry.npmjs.org/@sentry-internal/feedback/-/feedback-8.29.0.tgz", + "integrity": "sha512-yAL5YMEFk4XaeVRUGEguydahRzaQrNPAaWRv6k+XRzCv9CGBhxb14KXQc9X/penlauMFcDfgelCPKcTqcf6wDw==", "dependencies": { - "@sentry/core": "8.12.0", - "@sentry/types": "8.12.0", - "@sentry/utils": "8.12.0" + "@sentry/core": "8.29.0", + "@sentry/types": "8.29.0", + "@sentry/utils": "8.29.0" }, "engines": { "node": ">=14.18" } }, "node_modules/@sentry-internal/feedback/node_modules/@sentry/core": { - "version": "8.12.0", - "resolved": "https://registry.npmjs.org/@sentry/core/-/core-8.12.0.tgz", - "integrity": "sha512-y+5Hlf/E45nj2adJy4aUCNBefQbyWIX66Z9bOM6JjnVB0hxCm5H0sYqrFKldYqaeZx6/Q2cgAcGs61krUxNerQ==", + "version": "8.29.0", + "resolved": "https://registry.npmjs.org/@sentry/core/-/core-8.29.0.tgz", + "integrity": "sha512-scMbZaJ0Ov8NPgWn86EdjhyTLrhvRVbTxjg0imJAvhIvRbblH3xyqye/17Qnk2fOp8TNDOl7TBZHi0NCFQ5HUw==", "dependencies": { - "@sentry/types": "8.12.0", - "@sentry/utils": "8.12.0" + "@sentry/types": "8.29.0", + "@sentry/utils": "8.29.0" }, "engines": { "node": ">=14.18" } }, "node_modules/@sentry-internal/feedback/node_modules/@sentry/types": { - "version": "8.12.0", - "resolved": "https://registry.npmjs.org/@sentry/types/-/types-8.12.0.tgz", - "integrity": "sha512-pKuW64IjgcklWAOHzPJ02Ej480hyL25TLnYCAfl2TDMrYc+N0bbbH1N7ZxqJpTSVK9IxZPY/t2TRxpQBiyPEcg==", + "version": "8.29.0", + "resolved": "https://registry.npmjs.org/@sentry/types/-/types-8.29.0.tgz", + "integrity": "sha512-j4gX3ctzgD4xVWllXAhm6M+kHFEvrFoUPFq60X/pgkjsWCocGuhtNfB0rW43ICG8hCnlz8IYl7O7b8V8qY7SPg==", "engines": { "node": ">=14.18" } }, "node_modules/@sentry-internal/feedback/node_modules/@sentry/utils": { - "version": "8.12.0", - "resolved": "https://registry.npmjs.org/@sentry/utils/-/utils-8.12.0.tgz", - "integrity": "sha512-pwYMoOmexz3vsNSOJGPvD2qwp/fsPcr8mkFk67wMM37Y+30KQ8pF4Aq1cc+HBRIn1tKmenzFDPTczSdVPFxm3Q==", + "version": "8.29.0", + "resolved": "https://registry.npmjs.org/@sentry/utils/-/utils-8.29.0.tgz", + "integrity": "sha512-nb93/m3SjQChQJFqJj3oNW3Rz/12yrT7jypTCire3c2hpYWG2uR5n8VY9UUMTA6HLNvdom6tckK7p3bXGXlF0w==", "dependencies": { - "@sentry/types": "8.12.0" + "@sentry/types": "8.29.0" }, "engines": { "node": ">=14.18" } }, "node_modules/@sentry-internal/replay": { - "version": "8.12.0", - "resolved": "https://registry.npmjs.org/@sentry-internal/replay/-/replay-8.12.0.tgz", - "integrity": "sha512-TJceMtzRnY3SCvt3nFDu9rlT00Le7SaV2RL3D7SyDuijvJbWvIw3DRk7yutpF8c9YKO9j6FMa4NlkCJ+YAnnKQ==", + "version": "8.29.0", + "resolved": "https://registry.npmjs.org/@sentry-internal/replay/-/replay-8.29.0.tgz", + "integrity": "sha512-Xgv/eYucsm7GaGKms2ClQ02NpD07MxjoTjp1/vYZm0H4Q08dVphVZrQp7hL1oX/VD9mb5SFyyKuuIRqIu7S8RA==", "dependencies": { - "@sentry-internal/browser-utils": "8.12.0", - "@sentry/core": "8.12.0", - "@sentry/types": "8.12.0", - "@sentry/utils": "8.12.0" + "@sentry-internal/browser-utils": "8.29.0", + "@sentry/core": "8.29.0", + "@sentry/types": "8.29.0", + "@sentry/utils": "8.29.0" }, "engines": { "node": ">=14.18" } }, "node_modules/@sentry-internal/replay-canvas": { - "version": "8.12.0", - "resolved": "https://registry.npmjs.org/@sentry-internal/replay-canvas/-/replay-canvas-8.12.0.tgz", - "integrity": "sha512-0slfHZ3TD3MKeBu5NEGuKuecxStX23gts5L3mGFJd/zwsd04A31fhVmo6agIkxnZbOU4GPX/7HPWIeevkvy3ig==", + "version": "8.29.0", + "resolved": "https://registry.npmjs.org/@sentry-internal/replay-canvas/-/replay-canvas-8.29.0.tgz", + "integrity": "sha512-W2YbZRvp2lYC50V51fNLcnoIiK1Km4vSc+v6SL7c//lv2qpyumoUAAIDKY+14s8Lgt1RsR6rfZhfheD4O/6WSQ==", "dependencies": { - "@sentry-internal/replay": "8.12.0", - "@sentry/core": "8.12.0", - "@sentry/types": "8.12.0", - "@sentry/utils": "8.12.0" + "@sentry-internal/replay": "8.29.0", + "@sentry/core": "8.29.0", + "@sentry/types": "8.29.0", + "@sentry/utils": "8.29.0" }, "engines": { "node": ">=14.18" } }, "node_modules/@sentry-internal/replay-canvas/node_modules/@sentry/core": { - "version": "8.12.0", - "resolved": "https://registry.npmjs.org/@sentry/core/-/core-8.12.0.tgz", - "integrity": "sha512-y+5Hlf/E45nj2adJy4aUCNBefQbyWIX66Z9bOM6JjnVB0hxCm5H0sYqrFKldYqaeZx6/Q2cgAcGs61krUxNerQ==", + "version": "8.29.0", + "resolved": "https://registry.npmjs.org/@sentry/core/-/core-8.29.0.tgz", + "integrity": "sha512-scMbZaJ0Ov8NPgWn86EdjhyTLrhvRVbTxjg0imJAvhIvRbblH3xyqye/17Qnk2fOp8TNDOl7TBZHi0NCFQ5HUw==", "dependencies": { - "@sentry/types": "8.12.0", - "@sentry/utils": "8.12.0" + "@sentry/types": "8.29.0", + "@sentry/utils": "8.29.0" }, "engines": { "node": ">=14.18" } }, "node_modules/@sentry-internal/replay-canvas/node_modules/@sentry/types": { - "version": "8.12.0", - "resolved": "https://registry.npmjs.org/@sentry/types/-/types-8.12.0.tgz", - "integrity": "sha512-pKuW64IjgcklWAOHzPJ02Ej480hyL25TLnYCAfl2TDMrYc+N0bbbH1N7ZxqJpTSVK9IxZPY/t2TRxpQBiyPEcg==", + "version": "8.29.0", + "resolved": "https://registry.npmjs.org/@sentry/types/-/types-8.29.0.tgz", + "integrity": "sha512-j4gX3ctzgD4xVWllXAhm6M+kHFEvrFoUPFq60X/pgkjsWCocGuhtNfB0rW43ICG8hCnlz8IYl7O7b8V8qY7SPg==", "engines": { "node": ">=14.18" } }, "node_modules/@sentry-internal/replay-canvas/node_modules/@sentry/utils": { - "version": "8.12.0", - "resolved": "https://registry.npmjs.org/@sentry/utils/-/utils-8.12.0.tgz", - "integrity": "sha512-pwYMoOmexz3vsNSOJGPvD2qwp/fsPcr8mkFk67wMM37Y+30KQ8pF4Aq1cc+HBRIn1tKmenzFDPTczSdVPFxm3Q==", + "version": "8.29.0", + "resolved": "https://registry.npmjs.org/@sentry/utils/-/utils-8.29.0.tgz", + "integrity": "sha512-nb93/m3SjQChQJFqJj3oNW3Rz/12yrT7jypTCire3c2hpYWG2uR5n8VY9UUMTA6HLNvdom6tckK7p3bXGXlF0w==", "dependencies": { - "@sentry/types": "8.12.0" + "@sentry/types": "8.29.0" }, "engines": { "node": ">=14.18" } }, "node_modules/@sentry-internal/replay/node_modules/@sentry/core": { - "version": "8.12.0", - "resolved": "https://registry.npmjs.org/@sentry/core/-/core-8.12.0.tgz", - "integrity": "sha512-y+5Hlf/E45nj2adJy4aUCNBefQbyWIX66Z9bOM6JjnVB0hxCm5H0sYqrFKldYqaeZx6/Q2cgAcGs61krUxNerQ==", + "version": "8.29.0", + "resolved": "https://registry.npmjs.org/@sentry/core/-/core-8.29.0.tgz", + "integrity": "sha512-scMbZaJ0Ov8NPgWn86EdjhyTLrhvRVbTxjg0imJAvhIvRbblH3xyqye/17Qnk2fOp8TNDOl7TBZHi0NCFQ5HUw==", "dependencies": { - "@sentry/types": "8.12.0", - "@sentry/utils": "8.12.0" + "@sentry/types": "8.29.0", + "@sentry/utils": "8.29.0" }, "engines": { "node": ">=14.18" } }, "node_modules/@sentry-internal/replay/node_modules/@sentry/types": { - "version": "8.12.0", - "resolved": "https://registry.npmjs.org/@sentry/types/-/types-8.12.0.tgz", - "integrity": "sha512-pKuW64IjgcklWAOHzPJ02Ej480hyL25TLnYCAfl2TDMrYc+N0bbbH1N7ZxqJpTSVK9IxZPY/t2TRxpQBiyPEcg==", + "version": "8.29.0", + "resolved": "https://registry.npmjs.org/@sentry/types/-/types-8.29.0.tgz", + "integrity": "sha512-j4gX3ctzgD4xVWllXAhm6M+kHFEvrFoUPFq60X/pgkjsWCocGuhtNfB0rW43ICG8hCnlz8IYl7O7b8V8qY7SPg==", "engines": { "node": ">=14.18" } }, "node_modules/@sentry-internal/replay/node_modules/@sentry/utils": { - "version": "8.12.0", - "resolved": "https://registry.npmjs.org/@sentry/utils/-/utils-8.12.0.tgz", - "integrity": "sha512-pwYMoOmexz3vsNSOJGPvD2qwp/fsPcr8mkFk67wMM37Y+30KQ8pF4Aq1cc+HBRIn1tKmenzFDPTczSdVPFxm3Q==", + "version": "8.29.0", + "resolved": "https://registry.npmjs.org/@sentry/utils/-/utils-8.29.0.tgz", + "integrity": "sha512-nb93/m3SjQChQJFqJj3oNW3Rz/12yrT7jypTCire3c2hpYWG2uR5n8VY9UUMTA6HLNvdom6tckK7p3bXGXlF0w==", "dependencies": { - "@sentry/types": "8.12.0" + "@sentry/types": "8.29.0" }, "engines": { "node": ">=14.18" @@ -3957,48 +3957,48 @@ } }, "node_modules/@sentry/browser": { - "version": "8.12.0", - "resolved": "https://registry.npmjs.org/@sentry/browser/-/browser-8.12.0.tgz", - "integrity": "sha512-H82dmr7KQWoS2DQc5dJko5wNepltcEro1EM4mBeL2YmVbNRtoZzD3HQTpbxJJuFsTvEMZevvez5HFlpUgxmIwQ==", + "version": "8.29.0", + "resolved": "https://registry.npmjs.org/@sentry/browser/-/browser-8.29.0.tgz", + "integrity": "sha512-aKTy4H/3RI0q9LIeepesjWGlGNeh4HGFfwQjzHME8gcWCQ5LSlzYX4U+hu2yp7r1Jfd9MUTFfOuuLih2HGLGsQ==", "dependencies": { - "@sentry-internal/browser-utils": "8.12.0", - "@sentry-internal/feedback": "8.12.0", - "@sentry-internal/replay": "8.12.0", - "@sentry-internal/replay-canvas": "8.12.0", - "@sentry/core": "8.12.0", - "@sentry/types": "8.12.0", - "@sentry/utils": "8.12.0" + "@sentry-internal/browser-utils": "8.29.0", + "@sentry-internal/feedback": "8.29.0", + "@sentry-internal/replay": "8.29.0", + "@sentry-internal/replay-canvas": "8.29.0", + "@sentry/core": "8.29.0", + "@sentry/types": "8.29.0", + "@sentry/utils": "8.29.0" }, "engines": { "node": ">=14.18" } }, "node_modules/@sentry/browser/node_modules/@sentry/core": { - "version": "8.12.0", - "resolved": "https://registry.npmjs.org/@sentry/core/-/core-8.12.0.tgz", - "integrity": "sha512-y+5Hlf/E45nj2adJy4aUCNBefQbyWIX66Z9bOM6JjnVB0hxCm5H0sYqrFKldYqaeZx6/Q2cgAcGs61krUxNerQ==", + "version": "8.29.0", + "resolved": "https://registry.npmjs.org/@sentry/core/-/core-8.29.0.tgz", + "integrity": "sha512-scMbZaJ0Ov8NPgWn86EdjhyTLrhvRVbTxjg0imJAvhIvRbblH3xyqye/17Qnk2fOp8TNDOl7TBZHi0NCFQ5HUw==", "dependencies": { - "@sentry/types": "8.12.0", - "@sentry/utils": "8.12.0" + "@sentry/types": "8.29.0", + "@sentry/utils": "8.29.0" }, "engines": { "node": ">=14.18" } }, "node_modules/@sentry/browser/node_modules/@sentry/types": { - "version": "8.12.0", - "resolved": "https://registry.npmjs.org/@sentry/types/-/types-8.12.0.tgz", - "integrity": "sha512-pKuW64IjgcklWAOHzPJ02Ej480hyL25TLnYCAfl2TDMrYc+N0bbbH1N7ZxqJpTSVK9IxZPY/t2TRxpQBiyPEcg==", + "version": "8.29.0", + "resolved": "https://registry.npmjs.org/@sentry/types/-/types-8.29.0.tgz", + "integrity": "sha512-j4gX3ctzgD4xVWllXAhm6M+kHFEvrFoUPFq60X/pgkjsWCocGuhtNfB0rW43ICG8hCnlz8IYl7O7b8V8qY7SPg==", "engines": { "node": ">=14.18" } }, "node_modules/@sentry/browser/node_modules/@sentry/utils": { - "version": "8.12.0", - "resolved": "https://registry.npmjs.org/@sentry/utils/-/utils-8.12.0.tgz", - "integrity": "sha512-pwYMoOmexz3vsNSOJGPvD2qwp/fsPcr8mkFk67wMM37Y+30KQ8pF4Aq1cc+HBRIn1tKmenzFDPTczSdVPFxm3Q==", + "version": "8.29.0", + "resolved": "https://registry.npmjs.org/@sentry/utils/-/utils-8.29.0.tgz", + "integrity": "sha512-nb93/m3SjQChQJFqJj3oNW3Rz/12yrT7jypTCire3c2hpYWG2uR5n8VY9UUMTA6HLNvdom6tckK7p3bXGXlF0w==", "dependencies": { - "@sentry/types": "8.12.0" + "@sentry/types": "8.29.0" }, "engines": { "node": ">=14.18" diff --git a/package.json b/package.json index 6374c444222..d00207b47c8 100644 --- a/package.json +++ b/package.json @@ -50,7 +50,7 @@ "@headlessui/react": "^2.1.2", "@pnotify/core": "^5.2.0", "@pnotify/mobile": "^5.2.0", - "@sentry/browser": "^8.12.0", + "@sentry/browser": "^8.29.0", "@yudiel/react-qr-scanner": "^2.0.0-beta.3", "axios": "^1.6.8", "bowser": "^2.11.0", From fc822b5acfa71ded7e8c1d71fe93e1968825655d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 10 Sep 2024 21:47:48 +0530 Subject: [PATCH 4/5] Bump axios from 1.6.8 to 1.7.7 (#8454) --- package-lock.json | 8 ++++---- package.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index 4cc50cbe999..dec462f006f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -17,7 +17,7 @@ "@pnotify/mobile": "^5.2.0", "@sentry/browser": "^8.29.0", "@yudiel/react-qr-scanner": "^2.0.0-beta.3", - "axios": "^1.6.8", + "axios": "^1.7.7", "bowser": "^2.11.0", "browser-image-compression": "^2.0.2", "browserslist-useragent-regexp": "^4.1.3", @@ -5798,9 +5798,9 @@ "dev": true }, "node_modules/axios": { - "version": "1.6.8", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.6.8.tgz", - "integrity": "sha512-v/ZHtJDU39mDpyBoFVkETcd/uNdxrWRrg3bKpOKzXFA6Bvqopts6ALSMU3y6ijYxbw2B+wPrIv46egTzJXCLGQ==", + "version": "1.7.7", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.7.7.tgz", + "integrity": "sha512-S4kL7XrjgBmvdGut0sN3yJxqYzrDOnivkBiN0OFs6hLiUam3UPvswUo0kqGyhqUZGEOytHyumEdXsAkgCOUf3Q==", "dependencies": { "follow-redirects": "^1.15.6", "form-data": "^4.0.0", diff --git a/package.json b/package.json index d00207b47c8..8dcd4e13954 100644 --- a/package.json +++ b/package.json @@ -52,7 +52,7 @@ "@pnotify/mobile": "^5.2.0", "@sentry/browser": "^8.29.0", "@yudiel/react-qr-scanner": "^2.0.0-beta.3", - "axios": "^1.6.8", + "axios": "^1.7.7", "bowser": "^2.11.0", "browser-image-compression": "^2.0.2", "browserslist-useragent-regexp": "^4.1.3", From d1bc4c89803e58f3f6ab0683ce4aa0571d36ff0a Mon Sep 17 00:00:00 2001 From: Mohammed Nihal <57055998+nihal467@users.noreply.github.com> Date: Tue, 10 Sep 2024 19:43:55 +0300 Subject: [PATCH 5/5] Fixed Cypress Flaky test in user advance filter (#8519) --- cypress/e2e/users_spec/user_homepage.cy.ts | 58 ++++++++++++---------- cypress/pageobject/Users/UserSearch.ts | 10 ---- 2 files changed, 32 insertions(+), 36 deletions(-) diff --git a/cypress/e2e/users_spec/user_homepage.cy.ts b/cypress/e2e/users_spec/user_homepage.cy.ts index b1ecd567d86..0cf25cacfc8 100644 --- a/cypress/e2e/users_spec/user_homepage.cy.ts +++ b/cypress/e2e/users_spec/user_homepage.cy.ts @@ -3,11 +3,18 @@ import { UserPage } from "../../pageobject/Users/UserSearch"; describe("User Homepage", () => { const userPage = new UserPage(); - const usernameToTest = "devdoctor"; - const currentuser = "devdistrictadmin"; const loginPage = new LoginPage(); - const phone_number = "9876543219"; - const alt_phone_number = "9876543219"; + const currentuser = "devdistrictadmin"; + const firstName = "Dummy"; + const lastName = "Nurse"; + const role = "Nurse"; + const state = "Kerala"; + const district = "Ernakulam"; + const phoneNumber = "8878825662"; + const altPhoneNumber = "8878825662"; + const homeFacility = "Dummy Facility 40"; + const nurseUserName = "dummynurse1"; + const doctorUserName = "devdoctor"; before(() => { loginPage.loginAsDisctrictAdmin(); @@ -22,33 +29,32 @@ describe("User Homepage", () => { it("User advance filter functionality", () => { userPage.clickAdvancedFilters(); - userPage.typeInFirstName("Dev"); - userPage.typeInLastName("Doctor"); - userPage.selectRole("Doctor"); - userPage.selectState("Kerala"); - userPage.selectDistrict("Ernakulam"); - userPage.typeInPhoneNumber(phone_number); - userPage.typeInAltPhoneNumber(alt_phone_number); - userPage.selectHomeFacility("Dummy Facility 40"); + userPage.typeInFirstName(firstName); + userPage.typeInLastName(lastName); + userPage.selectRole(role); + userPage.selectState(state); + userPage.selectDistrict(district); + userPage.typeInPhoneNumber(phoneNumber); + userPage.typeInAltPhoneNumber(altPhoneNumber); + userPage.selectHomeFacility(homeFacility); userPage.applyFilter(); - userPage.verifyUrlafteradvancefilter(); - userPage.checkUsernameText(usernameToTest); - userPage.verifyDataTestIdText("First Name", "First Name: Dev"); - userPage.verifyDataTestIdText("Last Name", "Last Name: Doctor"); + userPage.checkUsernameText(nurseUserName); + // Verify the badges related to the data + userPage.verifyDataTestIdText("First Name", `First Name: ${firstName}`); + userPage.verifyDataTestIdText("Last Name", `Last Name: ${lastName}`); userPage.verifyDataTestIdText( "Phone Number", - "Phone Number: +919876543219", + `Phone Number: +91${phoneNumber}`, ); userPage.verifyDataTestIdText( "WhatsApp no.", - "WhatsApp no.: +919876543219", + `WhatsApp no.: +91${altPhoneNumber}`, ); - userPage.verifyDataTestIdText("Role", "Role: Doctor"); + userPage.verifyDataTestIdText("Role", `Role: ${role}`); userPage.verifyDataTestIdText( "Home Facility", - "Home Facility: Dummy Facility 40", + `Home Facility: ${homeFacility}`, ); - userPage.verifyDataTestIdText("District", "District: Ernakulam"); userPage.clearFilters(); userPage.verifyDataTestIdNotVisible("First Name"); userPage.verifyDataTestIdNotVisible("Last Name"); @@ -61,14 +67,14 @@ describe("User Homepage", () => { it("Search by username", () => { userPage.checkSearchInputVisibility(); - userPage.typeInSearchInput(usernameToTest); - userPage.checkUrlForUsername(usernameToTest); - userPage.checkUsernameText(usernameToTest); + userPage.typeInSearchInput(doctorUserName); + userPage.checkUrlForUsername(doctorUserName); + userPage.checkUsernameText(doctorUserName); userPage.checkUsernameBadgeVisibility(true); userPage.clearSearchInput(); userPage.checkUsernameBadgeVisibility(false); - userPage.typeInSearchInput(usernameToTest); - userPage.checkUsernameText(usernameToTest); + userPage.typeInSearchInput(doctorUserName); + userPage.checkUsernameText(doctorUserName); userPage.clickRemoveIcon(); userPage.checkUsernameBadgeVisibility(false); userPage.checkUsernameText(currentuser); diff --git a/cypress/pageobject/Users/UserSearch.ts b/cypress/pageobject/Users/UserSearch.ts index 56d1a81395d..0c214e92706 100644 --- a/cypress/pageobject/Users/UserSearch.ts +++ b/cypress/pageobject/Users/UserSearch.ts @@ -22,16 +22,6 @@ export class UserPage { cy.url().should("include", `username=${username}`); } - verifyUrlafteradvancefilter() { - cy.url() - .should("include", "first_name=Dev") - .and("include", "last_name=Doctor") - .and("include", "phone_number=%2B919876543219") - .and("include", "alt_phone_number=%2B919876543219") - .and("include", "user_type=Doctor") - .and("include", "district=7"); - } - checkUsernameText(username: string) { cy.get(this.usernameText).should("have.text", username); }