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:
Kanagaraj M
2018-02-22 07:30:00 +05:30
committed by Harshavardhana
parent 6a42727e00
commit bb0adea494
17 changed files with 823 additions and 318 deletions
@@ -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"
})
})
})