diff --git a/app/patient/common.ts b/app/patient/common.ts new file mode 100644 index 0000000..c24268b --- /dev/null +++ b/app/patient/common.ts @@ -0,0 +1,13 @@ +/** + * When either of the following conditions is met, the system shall issue a warning notification to the user through an appropriate user interface: + * a) The recommended insulin dose exceeds the predefined upper or lower limits. + * b) The latest entered glucose reading is outdated according to the defined maximum allowable time interval. + * + * @itemId:spec-dose-reading-warning + * @itemHasParent:MR-97 + * @itemTitle:"Check warning threshold" + * + */ +function checkWarningThreshold() { + return false; +} diff --git a/app/patient/page.test.tsx b/app/patient/page.test.tsx new file mode 100644 index 0000000..d4dfdba --- /dev/null +++ b/app/patient/page.test.tsx @@ -0,0 +1,10 @@ +/** + * @jest-environment jsdom + */ +import { render, screen } from "@testing-library/react"; +import Page from "./page"; + +it("Test warning message @tests:KXITM09D4Q0FGST9BVA61D5HYS9TSP2", () => { + render(); + expect(screen.getByRole("heading")).toHaveTextContent("Patient App"); +}); diff --git a/app/patient/page.tsx b/app/patient/page.tsx new file mode 100644 index 0000000..a69e605 --- /dev/null +++ b/app/patient/page.tsx @@ -0,0 +1,3 @@ +export default function Page() { + return

Patient App

; +} \ No newline at end of file diff --git a/app/patient/test-warning-message.md b/app/patient/test-warning-message.md new file mode 100644 index 0000000..932adc6 --- /dev/null +++ b/app/patient/test-warning-message.md @@ -0,0 +1,20 @@ +--- +itemId: tc-3 +itemType: Test Case +itemTests: spec-dose-reading-warning +--- + +# Test warning message + +When the recommended insulin dose is based on the glucose readings that are outdated, warn the user. + +## Steps + +1. Open application +2. Disconnect glucose monitor (via Bluetooth) and wait 5 min +3. Add insulin dosage +4. Click submit + +## Expected behavior + +Warning message should appear letting user know that glucose reading is not updated.