revert browser newux changes (#5714)

This commit is contained in:
Kanagaraj M
2018-03-27 01:19:12 +05:30
committed by Dee Koder
parent 35e64573fa
commit 19451e374a
186 changed files with 4507 additions and 16033 deletions

View File

@@ -85,9 +85,7 @@ describe("Uploads actions", () => {
it("creates alerts/SET action when currentBucket is not present", () => {
const store = mockStore({
buckets: {
currentBucket: ""
}
buckets: { currentBucket: "" }
})
const expectedActions = [
{
@@ -99,9 +97,7 @@ describe("Uploads actions", () => {
}
}
]
const file = new Blob(["file content"], {
type: "text/plain"
})
const file = new Blob(["file content"], { type: "text/plain" })
store.dispatch(uploadsActions.uploadFile(file))
const actions = store.getActions()
expect(actions).toEqual(expectedActions)
@@ -109,12 +105,8 @@ describe("Uploads actions", () => {
it("creates uploads/ADD action before uploading the file", () => {
const store = mockStore({
buckets: {
currentBucket: "test1"
},
objects: {
currentPrefix: "pre1/"
}
buckets: { currentBucket: "test1" },
objects: { currentPrefix: "pre1/" }
})
const expectedActions = [
{
@@ -142,12 +134,8 @@ describe("Uploads actions", () => {
})
window.XMLHttpRequest = jest.fn().mockImplementation(xhrMockClass)
const store = mockStore({
buckets: {
currentBucket: "test1"
},
objects: {
currentPrefix: "pre1/"
}
buckets: { currentBucket: "test1" },
objects: { currentPrefix: "pre1/" }
})
store.dispatch(uploadsActions.uploadFile(file))
expect(open).toHaveBeenCalledWith(