mirror of
https://github.com/pgsty/minio.git
synced 2026-08-07 16:21:14 +03:00
Refactor browser dropdown links and components (#5562)
* refactor browser links and about modal Moved about modal to separate component and added unit tests. * refactor change password modal component * added unit tests for ChangePasswordModal * fix logout function in browser dropdown * remove older unused BrowserDropdown component * remove unused variables from BrowserDropdown component * show BrowserDropdown and StorageInfo only for LoggedIn users Non-loggedIn users will see a 'Login' button
This commit is contained in:
committed by
Harshavardhana
parent
6a42727e00
commit
bb0adea494
@@ -24,7 +24,8 @@ describe("common reducer", () => {
|
||||
storageInfo: {
|
||||
total: 0,
|
||||
free: 0
|
||||
}
|
||||
},
|
||||
serverInfo: {}
|
||||
})
|
||||
})
|
||||
|
||||
@@ -67,4 +68,25 @@ describe("common reducer", () => {
|
||||
storageInfo: { total: 100, free: 40 }
|
||||
})
|
||||
})
|
||||
|
||||
it("should handle SET_SERVER_INFO", () => {
|
||||
expect(
|
||||
reducer(undefined, {
|
||||
type: actionsCommon.SET_SERVER_INFO,
|
||||
serverInfo: {
|
||||
version: "test",
|
||||
memory: "test",
|
||||
platform: "test",
|
||||
runtime: "test",
|
||||
info: "test"
|
||||
}
|
||||
}).serverInfo
|
||||
).toEqual({
|
||||
version: "test",
|
||||
memory: "test",
|
||||
platform: "test",
|
||||
runtime: "test",
|
||||
info: "test"
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user