mirror of
https://github.com/minio/minio.git
synced 2025-11-21 02:09:08 -05:00
Browser: Update UI with new components and elements (#5671)
This commit is contained in:
@@ -26,9 +26,11 @@ describe("Alert", () => {
|
||||
it("should call onDismiss when close button is clicked", () => {
|
||||
const onDismiss = jest.fn()
|
||||
const wrapper = mount(
|
||||
<Alert show={true} type="danger" message="test" onDismiss={onDismiss} />
|
||||
<Alert show={true} type="danger" message="test" onDismiss={onDismiss} />,
|
||||
)
|
||||
wrapper.find("button").simulate("click", { preventDefault: jest.fn() })
|
||||
wrapper.find("button").simulate("click", {
|
||||
preventDefault: jest.fn(),
|
||||
})
|
||||
expect(onDismiss).toHaveBeenCalled()
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user