Skip to content

Commit

Permalink
Replaced getByTestId with getByAltText
Browse files Browse the repository at this point in the history
  • Loading branch information
bzzz-coding committed Mar 28, 2024
1 parent 676607f commit 590ac43
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/website/src/entities/branding/ui/logo.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ test("clicking on the logo redirects to the home page", () => {
</MemoryRouter>,
);

const logo = screen.getByTestId("logo");
const logo = screen.getByAltText("Parking Insights brand mark");
userEvent.click(logo);

expect(window.location.pathname).toBe("/");
Expand Down
2 changes: 1 addition & 1 deletion packages/website/src/entities/branding/ui/logo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export default function Logo() {
* reloadDocument - A property used in the Link component from React Router to skip client side routing and let the browser handle the transition normally (as if it were an <a href>).
* @typedef {boolean} reloadDocument
*/
<Link to="/" reloadDocument={true} data-testid="logo" className="flex items-center space-x-2">
<Link to="/" reloadDocument={true} className="flex items-center space-x-2">
<img src={BrandMark} alt="Parking Insights brand mark" />

<div className="select-none -space-y-1 font-semibold uppercase text-blue-600">
Expand Down

0 comments on commit 590ac43

Please sign in to comment.