-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Rocio De Santiago
authored and
Rocio De Santiago
committed
Jul 29, 2024
1 parent
71ab718
commit 4979de4
Showing
1 changed file
with
37 additions
and
0 deletions.
There are no files selected for viewing
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,37 @@ | ||
import { render, screen } from "@testing-library/react"; | ||
import { RouterWrappedComponent } from "utils/testing/setupJest"; | ||
import { Header } from "components"; | ||
import { testA11y } from "utils/testing/commonTests"; | ||
|
||
const headerComponent = ( | ||
<RouterWrappedComponent> | ||
<Header handleLogout={() => {}} /> | ||
</RouterWrappedComponent> | ||
); | ||
|
||
describe("<Header />", () => { | ||
describe("Test Header", () => { | ||
beforeEach(() => { | ||
render(headerComponent); | ||
}); | ||
|
||
test("Header is visible", () => { | ||
const header = screen.getByRole("navigation"); | ||
expect(header).toBeVisible(); | ||
}); | ||
|
||
test("Logo is visible", () => { | ||
expect(screen.getByAltText("HCBS logo")).toBeVisible(); | ||
}); | ||
|
||
test("Help button is visible", () => { | ||
expect(screen.getByAltText("Help")).toBeVisible(); | ||
}); | ||
|
||
test("Menu button is visible", () => { | ||
expect(screen.getByAltText("Arrow down")).toBeVisible(); | ||
}); | ||
}); | ||
|
||
testA11y(headerComponent); | ||
}); |