-
Notifications
You must be signed in to change notification settings - Fork 57
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add test card support for chlamydia * Move chlamydia consts * update lang files * add Chlamydia Result Guidance * show gender of sexual partners for chlamydia result * add test * fix typo * Update spanish copy * add snapshot * push guidance for chlamydia is positive --------- Co-authored-by: Mike Brown <[email protected]>
- Loading branch information
1 parent
5dd51ba
commit 74caf63
Showing
7 changed files
with
104 additions
and
1 deletion.
There are no files selected for viewing
13 changes: 13 additions & 0 deletions
13
frontend/src/app/commonComponents/TestResultGuidance/ChlamydiaResultGuidance.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 ChlamydiaResultGuidance from "./ChlamydiaResultGuidance"; | ||
|
||
describe("ChlamydiaResultGuidance", () => { | ||
it("displays guidance for a Chlamydia result", () => { | ||
const { container } = render(<ChlamydiaResultGuidance />); | ||
expect(screen.getByText("For Chlamydia:")).toBeInTheDocument(); | ||
expect(container).toMatchSnapshot(); | ||
}); | ||
}); |
31 changes: 31 additions & 0 deletions
31
frontend/src/app/commonComponents/TestResultGuidance/ChlamydiaResultGuidance.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 ChlamydiaResultGuidance = () => { | ||
const { t } = useTranslation(); | ||
|
||
return ( | ||
<> | ||
<p className="text-bold sr-guidance-heading"> | ||
{t("testResult.chlamydiaNotes.h1")} | ||
</p> | ||
<p>{t("testResult.chlamydiaNotes.positive.p0")}</p> | ||
<Trans | ||
parent="p" | ||
i18nKey="testResult.chlamydiaNotes.positive.p1" | ||
components={[ | ||
<a | ||
href={t("testResult.chlamydiaNotes.positive.treatmentLink")} | ||
target="_blank" | ||
rel="noopener noreferrer" | ||
key="chlamydia-treatment-link" | ||
> | ||
chlamydia treatment link | ||
</a>, | ||
]} | ||
/> | ||
</> | ||
); | ||
}; | ||
|
||
export default ChlamydiaResultGuidance; |
24 changes: 24 additions & 0 deletions
24
...p/commonComponents/TestResultGuidance/__snapshots__/ChlamydiaResultGuidance.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[`ChlamydiaResultGuidance displays guidance for a Chlamydia result 1`] = ` | ||
<div> | ||
<p | ||
class="text-bold sr-guidance-heading" | ||
> | ||
For Chlamydia: | ||
</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/chlamydia/about/index.html" | ||
rel="noopener noreferrer" | ||
target="_blank" | ||
> | ||
Visit the CDC website to learn more about a positive Chlamydia result. | ||
</a> | ||
(cdc.gov/chlamydia/about). | ||
</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