Skip to content

Commit

Permalink
test: kill all snapshots and replace with a11y checks
Browse files Browse the repository at this point in the history
  • Loading branch information
segunadebayo committed Jan 6, 2021
1 parent fe9075d commit d45c495
Show file tree
Hide file tree
Showing 42 changed files with 112 additions and 3,144 deletions.
6 changes: 6 additions & 0 deletions .changeset/pink-bees-cover.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@chakra-ui/progress": patch
---

Forward `aria-label` and `aria-labelledby` to element that has
`role=progressbar` which is the `ProgressFilledTrack` component
3 changes: 2 additions & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,8 @@
"react/sort-prop-types": "error",
"react/prop-types": "off",
"@typescript-eslint/no-shadow": "off",
"react-hooks/exhaustive-deps": "error"
"react-hooks/exhaustive-deps": "error",
"import/no-named-as-default": "off"
},
"overrides": [
{
Expand Down
88 changes: 0 additions & 88 deletions packages/alert/tests/__snapshots__/alert.test.tsx.snap

This file was deleted.

11 changes: 0 additions & 11 deletions packages/alert/tests/alert.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,6 @@ import * as React from "react"
import { render, testA11y, screen } from "@chakra-ui/test-utils"
import { Alert, AlertDescription, AlertIcon, AlertTitle } from "../src"

test("matches snapshot", () => {
const tools = render(
<Alert>
<AlertIcon />
<AlertTitle>Alert title</AlertTitle>
<AlertDescription>Alert description</AlertDescription>
</Alert>,
)
expect(tools.asFragment()).toMatchSnapshot()
})

it("passes a11y test", async () => {
await testA11y(
<Alert>
Expand Down
85 changes: 0 additions & 85 deletions packages/avatar/tests/__snapshots__/avatar-group.test.tsx.snap

This file was deleted.

147 changes: 0 additions & 147 deletions packages/avatar/tests/__snapshots__/avatar.test.tsx.snap

This file was deleted.

9 changes: 0 additions & 9 deletions packages/avatar/tests/avatar-group.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,6 @@ import * as React from "react"
import { render, testA11y, screen } from "@chakra-ui/test-utils"
import { Avatar, AvatarGroup } from "../src"

test("matches snapshot", () => {
const tools = render(
<AvatarGroup>
<Avatar />
</AvatarGroup>,
)
expect(tools.asFragment()).toMatchSnapshot()
})

it("passes a11y test", async () => {
await testA11y(
<AvatarGroup>
Expand Down
Loading

0 comments on commit d45c495

Please sign in to comment.