Fix failing unit tests in browser (#5688)

* format js files using prettier

Used the following command to format the files
prettier --write "browser/app/js/**/*.js"

* fix failing unit tests in browser
This commit is contained in:
Kanagaraj M
2018-03-23 00:55:56 +05:30
committed by Harshavardhana
parent cb3818be27
commit c0e45f9098
95 changed files with 839 additions and 890 deletions

View File

@@ -52,14 +52,14 @@ export const fetchBuckets = () => {
export const setList = buckets => {
return {
type: SET_LIST,
buckets,
buckets
}
}
export const setFilter = filter => {
return {
type: SET_FILTER,
filter,
filter
}
}
@@ -73,7 +73,7 @@ export const selectBucket = (bucket, prefix) => {
export const setCurrentBucket = bucket => {
return {
type: SET_CURRENT_BUCKET,
bucket,
bucket
}
}
@@ -81,7 +81,7 @@ export const makeBucket = bucket => {
return function(dispatch) {
return web
.MakeBucket({
bucketName: bucket,
bucketName: bucket
})
.then(() => {
dispatch(addBucket(bucket))
@@ -91,9 +91,9 @@ export const makeBucket = bucket => {
dispatch(
alertActions.set({
type: "danger",
message: err.message,
}),
),
message: err.message
})
)
)
}
}
@@ -102,14 +102,14 @@ export const deleteBucket = bucket => {
return function(dispatch) {
return web
.DeleteBucket({
bucketName: bucket,
bucketName: bucket
})
.then(() => {
dispatch(
alertActions.set({
type: "info",
message: "Bucket '" + bucket + "' has been deleted.",
}),
message: "Bucket '" + bucket + "' has been deleted."
})
)
dispatch(removeBucket(bucket))
dispatch(fetchBuckets())
@@ -118,8 +118,8 @@ export const deleteBucket = bucket => {
dispatch(
alertActions.set({
type: "danger",
message: err.message,
}),
message: err.message
})
)
})
}
@@ -127,29 +127,29 @@ export const deleteBucket = bucket => {
export const addBucket = bucket => ({
type: ADD,
bucket,
bucket
})
export const removeBucket = bucket => ({
type: REMOVE,
bucket,
bucket
})
export const showMakeBucketModal = () => ({
type: SHOW_MAKE_BUCKET_MODAL,
show: true,
show: true
})
export const hideMakeBucketModal = () => ({
type: SHOW_MAKE_BUCKET_MODAL,
show: false,
show: false
})
export const fetchPolicies = bucket => {
return function(dispatch) {
return web
.ListAllBucketPolicies({
bucketName: bucket,
bucketName: bucket
})
.then(res => {
let policies = res.policies
@@ -160,8 +160,8 @@ export const fetchPolicies = bucket => {
dispatch(
alertActions.set({
type: "danger",
message: err.message,
}),
message: err.message
})
)
})
}
@@ -169,15 +169,15 @@ export const fetchPolicies = bucket => {
export const setPolicies = policies => ({
type: SET_POLICIES,
policies,
policies
})
export const showBucketPolicy = () => ({
type: SHOW_BUCKET_POLICY,
show: true,
show: true
})
export const hideBucketPolicy = () => ({
type: SHOW_BUCKET_POLICY,
show: false,
show: false
})