mirror of
https://github.com/chakra-ui/chakra-ui.git
synced 2026-09-14 16:43:45 +08:00
c6516a12ef
* fix: add missing type=button to Tag, ActionBar, Dialog, and Drawer close/action triggers * test: add regression coverage for close/action trigger type=button fix
20 lines
617 B
TypeScript
20 lines
617 B
TypeScript
import { ActionBar } from "@chakra-ui/react"
|
|
import { render } from "./core/render"
|
|
|
|
describe("ActionBar", () => {
|
|
it("defaults SelectionTrigger to type=button", () => {
|
|
const { getByTestId } = render(
|
|
<ActionBar.Root open>
|
|
<ActionBar.Positioner>
|
|
<ActionBar.Content>
|
|
<ActionBar.SelectionTrigger data-testid="selection-trigger">
|
|
Selection
|
|
</ActionBar.SelectionTrigger>
|
|
</ActionBar.Content>
|
|
</ActionBar.Positioner>
|
|
</ActionBar.Root>,
|
|
)
|
|
expect(getByTestId("selection-trigger")).toHaveAttribute("type", "button")
|
|
})
|
|
})
|