-
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.
Merge pull request #2 from dobrac/user-testing/fixes
User Testing Fixes
- Loading branch information
Showing
27 changed files
with
728 additions
and
168 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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 { act, render } from "@testing-library/react"; | ||
import CollapsibleHeader from "@/components/CollapsibleHeader"; | ||
|
||
describe("CollapsibleHeader", () => { | ||
it("renders - expanded", async () => { | ||
const onClick = jest.fn(); | ||
const elementRendered = await act(async () => { | ||
return render( | ||
<CollapsibleHeader onClick={onClick} open={true}> | ||
Header | ||
</CollapsibleHeader>, | ||
); | ||
}); | ||
|
||
const element = elementRendered.container.firstChild; | ||
expect(element).toBeInTheDocument(); | ||
}); | ||
it("renders - collapsed", async () => { | ||
const onClick = jest.fn(); | ||
const elementRendered = await act(async () => { | ||
return render( | ||
<CollapsibleHeader onClick={onClick} open={false}> | ||
Header | ||
</CollapsibleHeader>, | ||
); | ||
}); | ||
|
||
const element = elementRendered.container.firstChild; | ||
expect(element).toBeInTheDocument(); | ||
}); | ||
}); |
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
Oops, something went wrong.