Skip to content

Commit

Permalink
fix e2e
Browse files Browse the repository at this point in the history
  • Loading branch information
fzhao99 committed May 17, 2024
1 parent 8af5ee7 commit 6cf5600
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 12 deletions.
16 changes: 7 additions & 9 deletions cypress/e2e/04-covid_only_tests.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -138,16 +138,14 @@ describe("Conducting a COVID test from:", () => {
"exist",
);

cy.contains("label", "When did the patient's symptoms start?")
.next("input")
.type("2021-10-05");
cy.get("[data-testid='symptom-date']").within(() => {
cy.get("input").type("2021-10-05");
});

cy.contains("legend", "Select any symptoms the patient is experiencing")
.next("div")
.within(() => {
cy.contains("label", "Chills").click();
cy.contains("label", "Headache").click();
});
cy.get("[data-testid='symptom-selection']").within(() => {
cy.contains("label", "Chills").click();
cy.contains("label", "Headache").click();
});

cy.checkAccessibility();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,8 @@ const CovidAoEForm = ({
</div>
{hasSymptoms === "YES" && (
<>
<div className="grid-row grid-gap">
<div className="grid-row grid-gap" data-testid="symptom-date">
<TextInput
data-testid="symptom-date"
name={`symptom-date-${testOrder.internalId}`}
type="date"
label="When did the patient's symptoms start?"
Expand All @@ -99,7 +98,7 @@ const CovidAoEForm = ({
}
></TextInput>
</div>
<div className="grid-row grid-gap">
<div className="grid-row grid-gap" data-testid="symptom-selection">
<Checkboxes
boxes={respiratorySymptomDefinitions.map(({ label, value }) => ({
label,
Expand Down

0 comments on commit 6cf5600

Please sign in to comment.