Files
chakra-ui__chakra-ui/packages/react/__tests__/action-bar.test.tsx
Hiroki Akahoshi c6516a12ef fix: missing type="button" on Tag, ActionBar, Dialog, Drawer triggers (#10908)
* 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
2026-07-25 15:57:16 +02:00

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")
})
})