diff --git a/artifacts/tc-reference/src/components/library/start-here-shelf.tsx b/artifacts/tc-reference/src/components/library/start-here-shelf.tsx
index 2cdc657..9b97015 100644
--- a/artifacts/tc-reference/src/components/library/start-here-shelf.tsx
+++ b/artifacts/tc-reference/src/components/library/start-here-shelf.tsx
@@ -54,6 +54,15 @@ export function StartHereShelf() {
practise. New here? Begin with the {TOTAL} that cover most
conversations.
+
+ {/* CLINICAL REVIEW NEEDED */}
+ This app helps with words, not clinical risk decisions. Follow your
+ local protocol.
+
= new Map(
diff --git a/artifacts/tc-reference/src/pages/help.tsx b/artifacts/tc-reference/src/pages/help.tsx
index 15c2901..37c5673 100644
--- a/artifacts/tc-reference/src/pages/help.tsx
+++ b/artifacts/tc-reference/src/pages/help.tsx
@@ -91,6 +91,15 @@ function HelpPicker() {
>
What's happening?
+
+ {/* CLINICAL REVIEW NEEDED */}
+ This app helps with words, not clinical risk decisions. Follow your
+ local protocol.
+
{
}
});
+ it("shows the scope note on the picker", () => {
+ renderAt("/help");
+ expect(screen.getByTestId("help-scope-note")).toHaveTextContent(
+ "This app helps with words, not clinical risk decisions.",
+ );
+ });
+
+ it("leads the safety situation with the protocol and 000 note", () => {
+ renderAt("/help/distressed-or-unsafe");
+ const note = screen.getByTestId("help-safety");
+ expect(note).toHaveTextContent("follow your organisation's safety");
+ expect(note).toHaveTextContent("call 000");
+ // The note comes before the first move in reading order.
+ expect(
+ note.compareDocumentPosition(screen.getByTestId("help-first")) &
+ Node.DOCUMENT_POSITION_FOLLOWING,
+ ).toBeTruthy();
+ });
+
+ it("shows no safety note on everyday situations", () => {
+ renderAt("/help/say-no");
+ expect(screen.queryByTestId("help-safety")).not.toBeInTheDocument();
+ });
+
it("reaches a line to say in two taps from the picker", async () => {
const location = renderAt("/help");
fireEvent.click(screen.getByTestId("help-situation-say-no"));
diff --git a/artifacts/tc-reference/src/test/situations.test.ts b/artifacts/tc-reference/src/test/situations.test.ts
index bbefa87..c662dc8 100644
--- a/artifacts/tc-reference/src/test/situations.test.ts
+++ b/artifacts/tc-reference/src/test/situations.test.ts
@@ -28,10 +28,10 @@ const LIBRARY_IDS = new Set(
);
describe("Help me right now situations", () => {
- it("has exactly eight situations with unique ids and labels", () => {
- expect(SITUATIONS).toHaveLength(8);
- expect(new Set(SITUATIONS.map((s) => s.id)).size).toBe(8);
- expect(new Set(SITUATIONS.map((s) => s.label)).size).toBe(8);
+ it("has exactly nine situations with unique ids and labels", () => {
+ expect(SITUATIONS).toHaveLength(9);
+ expect(new Set(SITUATIONS.map((s) => s.id)).size).toBe(9);
+ expect(new Set(SITUATIONS.map((s) => s.label)).size).toBe(9);
for (const s of SITUATIONS) {
expect(s.id, s.id).toMatch(/^[a-z]+(-[a-z]+)*$/);
expect(s.tagline.split(" ").length, s.id).toBeLessThanOrEqual(6);
@@ -71,6 +71,14 @@ describe("Help me right now situations", () => {
}
});
+ it("points the distress situation at local protocol and 000", () => {
+ const s = getSituation("distressed-or-unsafe");
+ expect(s?.safetyNote).toMatch(/organisation's safety or risk protocol/);
+ expect(s?.safetyNote).toMatch(/\b000\b/);
+ // Only the safety situation carries a safety note.
+ expect(SITUATIONS.filter((x) => x.safetyNote)).toHaveLength(1);
+ });
+
it("looks situations up by id", () => {
expect(getSituation("say-no")?.leadCardId).toBe("TC102");
expect(getSituation("missing")).toBeUndefined();