mirror of
https://github.com/pgsty/minio.git
synced 2026-08-02 16:45:57 +03:00
Browser: Update UI with new components and elements (#5671)
This commit is contained in:
@@ -19,7 +19,7 @@ import { shallow } from "enzyme"
|
||||
import { SideBar } from "../SideBar"
|
||||
|
||||
jest.mock("../../web", () => ({
|
||||
LoggedIn: jest.fn(() => false).mockReturnValueOnce(true)
|
||||
LoggedIn: jest.fn(() => false).mockReturnValueOnce(true),
|
||||
}))
|
||||
|
||||
describe("SideBar", () => {
|
||||
@@ -35,7 +35,9 @@ describe("SideBar", () => {
|
||||
it("should call clickOutside when the user clicks outside the sidebar", () => {
|
||||
const clickOutside = jest.fn()
|
||||
const wrapper = shallow(<SideBar clickOutside={clickOutside} />)
|
||||
wrapper.simulate("clickOut", { preventDefault: jest.fn() })
|
||||
wrapper.simulate("clickOut", {
|
||||
preventDefault: jest.fn(),
|
||||
})
|
||||
expect(clickOutside).toHaveBeenCalled()
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user