mirror of
https://github.com/minio/minio.git
synced 2025-11-21 10:16:03 -05:00
Browser: Update UI with new components and elements (#5671)
This commit is contained in:
@@ -21,13 +21,13 @@ import { READ_ONLY, WRITE_ONLY, READ_WRITE } from "../../constants"
|
||||
|
||||
describe("BucketPolicyModal", () => {
|
||||
it("should render without crashing", () => {
|
||||
shallow(<BucketPolicyModal policies={[]}/>)
|
||||
shallow(<BucketPolicyModal policies={[]} />)
|
||||
})
|
||||
|
||||
it("should call hideBucketPolicy when close button is clicked", () => {
|
||||
const hideBucketPolicy = jest.fn()
|
||||
const wrapper = shallow(
|
||||
<BucketPolicyModal hideBucketPolicy={hideBucketPolicy} policies={[]} />
|
||||
<BucketPolicyModal hideBucketPolicy={hideBucketPolicy} policies={[]} />,
|
||||
)
|
||||
wrapper.find("button").simulate("click")
|
||||
expect(hideBucketPolicy).toHaveBeenCalled()
|
||||
@@ -35,7 +35,7 @@ describe("BucketPolicyModal", () => {
|
||||
|
||||
it("should include the PolicyInput and Policy components when there are any policies", () => {
|
||||
const wrapper = shallow(
|
||||
<BucketPolicyModal policies={ [{prefix: "test", policy: READ_ONLY}] } />
|
||||
<BucketPolicyModal policies={[{ prefix: "test", policy: READ_ONLY }]} />,
|
||||
)
|
||||
expect(wrapper.find("Connect(PolicyInput)").length).toBe(1)
|
||||
expect(wrapper.find("Connect(Policy)").length).toBe(1)
|
||||
|
||||
Reference in New Issue
Block a user