Skip to content

Commit

Permalink
Updating search test to not use role
Browse files Browse the repository at this point in the history
  • Loading branch information
7emansell committed Dec 12, 2024
1 parent 3ff6900 commit 498a2ba
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 15 deletions.
4 changes: 2 additions & 2 deletions src/components/SearchBar/SearchBar.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,8 @@ describe("SearchBar", () => {
textInputProps={textInputProps}
/>
);
expect(screen.getByRole("search")).toBeInTheDocument();
expect(screen.getByRole("search")).toHaveAttribute(
expect(screen.getByRole("form")).toBeInTheDocument();
expect(screen.getByRole("form")).toHaveAttribute(
"aria-label",
`${labelText} - ${helperText}`
);
Expand Down
13 changes: 0 additions & 13 deletions src/components/SearchBar/__snapshots__/SearchBar.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ exports[`SearchBar renders the UI snapshot correctly 1`] = `
className="css-1xdhyk6"
id="searchbar-form-basic"
onSubmit={[MockFunction]}
role="search"
>
<div
className="css-1ik4laa"
Expand Down Expand Up @@ -113,7 +112,6 @@ exports[`SearchBar renders the UI snapshot correctly 2`] = `
className="css-1xdhyk6"
id="searchbar-form-withSelect"
onSubmit={[MockFunction]}
role="search"
>
<div
className="css-1u8qly9"
Expand Down Expand Up @@ -335,7 +333,6 @@ exports[`SearchBar renders the UI snapshot correctly 3`] = `
className="css-1xdhyk6"
id="searchbar-form-withoutHelperText"
onSubmit={[MockFunction]}
role="search"
>
<div
className="css-1ik4laa"
Expand Down Expand Up @@ -421,7 +418,6 @@ exports[`SearchBar renders the UI snapshot correctly 4`] = `
className="css-1xdhyk6"
id="searchbar-form-withClearButton"
onSubmit={[MockFunction]}
role="search"
>
<div
className="css-1ik4laa"
Expand Down Expand Up @@ -524,7 +520,6 @@ exports[`SearchBar renders the UI snapshot correctly 5`] = `
className="css-1xdhyk6"
id="searchbar-form-invalidState"
onSubmit={[MockFunction]}
role="search"
>
<div
className="css-1ik4laa"
Expand Down Expand Up @@ -619,7 +614,6 @@ exports[`SearchBar renders the UI snapshot correctly 6`] = `
className="css-1xdhyk6"
id="searchbar-form-disabledState"
onSubmit={[MockFunction]}
role="search"
>
<div
className="css-1ik4laa"
Expand Down Expand Up @@ -706,7 +700,6 @@ exports[`SearchBar renders the UI snapshot correctly 7`] = `
className="css-1xdhyk6"
id="searchbar-form-requiredState"
onSubmit={[MockFunction]}
role="search"
>
<div
className="css-1ik4laa"
Expand Down Expand Up @@ -794,7 +787,6 @@ exports[`SearchBar renders the UI snapshot correctly 8`] = `
className="css-1xdhyk6"
id="searchbar-form-noBrandButtonType"
onSubmit={[MockFunction]}
role="search"
>
<div
className="css-1ik4laa"
Expand Down Expand Up @@ -888,7 +880,6 @@ exports[`SearchBar renders the UI snapshot correctly 9`] = `
className="css-1xdhyk6"
id="searchbar-form-withHeading"
onSubmit={[MockFunction]}
role="search"
>
<div
className="css-1ik4laa"
Expand Down Expand Up @@ -955,7 +946,6 @@ exports[`SearchBar renders the UI snapshot correctly 10`] = `
className="css-1xdhyk6"
id="searchbar-form-withDescription"
onSubmit={[MockFunction]}
role="search"
>
<div
className="css-1ik4laa"
Expand Down Expand Up @@ -1028,7 +1018,6 @@ exports[`SearchBar renders the UI snapshot correctly 11`] = `
className="css-1xdhyk6"
id="searchbar-form-withHeadingAndDescription"
onSubmit={[MockFunction]}
role="search"
>
<div
className="css-1ik4laa"
Expand Down Expand Up @@ -1090,7 +1079,6 @@ exports[`SearchBar renders the UI snapshot correctly 12`] = `
className="css-kle7zy"
id="searchbar-form-chakra"
onSubmit={[MockFunction]}
role="search"
>
<div
className="css-1ik4laa"
Expand Down Expand Up @@ -1194,7 +1182,6 @@ exports[`SearchBar renders the UI snapshot correctly 13`] = `
className="css-1xdhyk6"
id="searchbar-form-props"
onSubmit={[MockFunction]}
role="search"
>
<div
className="css-1ik4laa"
Expand Down

0 comments on commit 498a2ba

Please sign in to comment.