mirror of
https://github.com/minio/minio.git
synced 2025-11-21 18:26:04 -05:00
Refactor download object and bulk action components (#5546)
This commit is contained in:
committed by
Harshavardhana
parent
da4558a8f7
commit
6a42727e00
@@ -31,7 +31,8 @@ describe("objects reducer", () => {
|
||||
show: false,
|
||||
object: "",
|
||||
url: ""
|
||||
}
|
||||
},
|
||||
checkedList: []
|
||||
})
|
||||
})
|
||||
|
||||
@@ -135,4 +136,33 @@ describe("objects reducer", () => {
|
||||
url: "test"
|
||||
})
|
||||
})
|
||||
|
||||
it("should handle CHECKED_LIST_ADD", () => {
|
||||
const newState = reducer(undefined, {
|
||||
type: actions.CHECKED_LIST_ADD,
|
||||
object: "obj1"
|
||||
})
|
||||
expect(newState.checkedList).toEqual(["obj1"])
|
||||
})
|
||||
|
||||
it("should handle SELECTED_LIST_REMOVE", () => {
|
||||
const newState = reducer(
|
||||
{ checkedList: ["obj1", "obj2"] },
|
||||
{
|
||||
type: actions.CHECKED_LIST_REMOVE,
|
||||
object: "obj1"
|
||||
}
|
||||
)
|
||||
expect(newState.checkedList).toEqual(["obj2"])
|
||||
})
|
||||
|
||||
it("should handle CHECKED_LIST_RESET", () => {
|
||||
const newState = reducer(
|
||||
{ checkedList: ["obj1", "obj2"] },
|
||||
{
|
||||
type: actions.CHECKED_LIST_RESET
|
||||
}
|
||||
)
|
||||
expect(newState.checkedList).toEqual([])
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user