-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Results page and PXP support for Hepatitis C (#8249)
* Add Hep C result guidance and details * Show Hep C guidance for non-positive results too * Refactor disease result keys for sonar reduced complexity * Fix Hep C guidance copy text * Remove lowercasing in feature flag mock
- Loading branch information
Showing
9 changed files
with
144 additions
and
59 deletions.
There are no files selected for viewing
13 changes: 13 additions & 0 deletions
13
frontend/src/app/commonComponents/TestResultGuidance/HepatitisCResultGuidance.test.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { render, screen } from "@testing-library/react"; | ||
|
||
import "../../../i18n"; | ||
|
||
import HepatitisCResultGuidance from "./HepatitisCResultGuidance"; | ||
|
||
describe("HepatitisCResultGuidance", () => { | ||
it("displays guidance for a Hepatitis-C result", () => { | ||
const { container } = render(<HepatitisCResultGuidance />); | ||
expect(screen.getByText("For Hepatitis-C:")).toBeInTheDocument(); | ||
expect(container).toMatchSnapshot(); | ||
}); | ||
}); |
31 changes: 31 additions & 0 deletions
31
frontend/src/app/commonComponents/TestResultGuidance/HepatitisCResultGuidance.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import React from "react"; | ||
import { Trans, useTranslation } from "react-i18next"; | ||
|
||
const HepatitisCResultGuidance = () => { | ||
const { t } = useTranslation(); | ||
|
||
return ( | ||
<> | ||
<p className="text-bold sr-guidance-heading"> | ||
{t("testResult.hepatitisCNotes.h1")} | ||
</p> | ||
<p>{t("testResult.hepatitisCNotes.positive.p0")}</p> | ||
<Trans | ||
parent="p" | ||
i18nKey="testResult.hepatitisCNotes.positive.p1" | ||
components={[ | ||
<a | ||
href={t("testResult.hepatitisCNotes.positive.treatmentLink")} | ||
target="_blank" | ||
rel="noopener noreferrer" | ||
key="hepatitis-c-treatment-link" | ||
> | ||
hepatitis-c treatment link | ||
</a>, | ||
]} | ||
/> | ||
</> | ||
); | ||
}; | ||
|
||
export default HepatitisCResultGuidance; |
24 changes: 24 additions & 0 deletions
24
.../commonComponents/TestResultGuidance/__snapshots__/HepatitisCResultGuidance.test.tsx.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`HepatitisCResultGuidance displays guidance for a Hepatitis-C result 1`] = ` | ||
<div> | ||
<p | ||
class="text-bold sr-guidance-heading" | ||
> | ||
For Hepatitis-C: | ||
</p> | ||
<p> | ||
If you have a positive result, you will need a follow-up test to confirm your results. The organization that provided your test should be able to answer questions and provide referrals for follow-up testing. | ||
</p> | ||
<p> | ||
<a | ||
href="https://www.cdc.gov/hepatitis-c/testing/index.html#cdc_testing_results-testing-results" | ||
rel="noopener noreferrer" | ||
target="_blank" | ||
> | ||
Visit the CDC website to learn more about a positive Hepatitis-C result | ||
</a> | ||
(cdc.gov/hepatitis-c/testing/index.html#cdc_testing_results-testing-results). | ||
</p> | ||
</div> | ||
`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters