Allow overriding actions in cors addon

After upgrading to Babel 7, it's no longer possible to
override properties of an imported module.
To workaround this, explicit functions were added to
make the override possible.
diff --git a/app/addons/cors/__tests__/actions.test.js b/app/addons/cors/__tests__/actions.test.js
index 15f1f15..1ad1034 100644
--- a/app/addons/cors/__tests__/actions.test.js
+++ b/app/addons/cors/__tests__/actions.test.js
@@ -11,7 +11,7 @@
 // the License.
 import utils from "../../../../test/mocha/testUtils";
 import FauxtonAPI from "../../../core/api";
-import * as Actions from "../actions";
+import Actions from "../actions";
 import * as CorsAPI from "../api";
 import sinon from "sinon";
 
diff --git a/app/addons/cors/actions.js b/app/addons/cors/actions.js
index eb05dab..6fa4b00 100644
--- a/app/addons/cors/actions.js
+++ b/app/addons/cors/actions.js
@@ -14,7 +14,7 @@
 import ActionTypes from "./actiontypes";
 import * as CorsAPI from "./api";
 
-export const fetchAndLoadCORSOptions = (url, node) => (dispatch) => {
+const fetchAndLoadCORSOptions = (url, node) => (dispatch) => {
   const fetchCors = CorsAPI.fetchCORSConfig(url);
   const fetchHttp = CorsAPI.fetchHttpdConfig(url);
 
@@ -33,21 +33,21 @@
   });
 };
 
-export const showLoadingBars = () => {
+const showLoadingBars = () => {
   return {
     type: ActionTypes.CORS_SET_IS_LOADING,
     isLoading: true
   };
 };
 
-export const hideLoadingBars = () => {
+const hideLoadingBars = () => {
   return {
     type: ActionTypes.CORS_SET_IS_LOADING,
     isLoading: false
   };
 };
 
-export const loadCORSOptions = (options) => {
+const loadCORSOptions = (options) => {
   return {
     type: ActionTypes.EDIT_CORS,
     options: options,
@@ -55,20 +55,20 @@
   };
 };
 
-export const showDomainDeleteConfirmation = (domain) => {
+const showDomainDeleteConfirmation = (domain) => {
   return {
     type: ActionTypes.CORS_SHOW_DELETE_DOMAIN_MODAL,
     domainToDelete: domain
   };
 };
 
-export const hideDomainDeleteConfirmation = () => {
+const hideDomainDeleteConfirmation = () => {
   return {
     type: ActionTypes.CORS_HIDE_DELETE_DOMAIN_MODAL
   };
 };
 
-export const saveCors = (url, options) => (dispatch) => {
+const saveCors = (url, options) => (dispatch) => {
   const promises = [];
 
   promises.push(CorsAPI.updateEnableCorsToHttpd(url, options.node, options.corsEnabled));
@@ -101,10 +101,29 @@
   return 'Reason: ' + ((error && error.message) || 'n/a');
 };
 
-export const sanitizeOrigins = (origins) => {
+const sanitizeOrigins = (origins) => {
   if (_.isEmpty(origins)) {
     return '';
   }
 
   return origins.join(',');
 };
+
+const Actions = {
+  fetchAndLoadCORSOptions,
+  showLoadingBars,
+  hideLoadingBars,
+  showDomainDeleteConfirmation,
+  hideDomainDeleteConfirmation,
+  loadCORSOptions,
+  sanitizeOrigins,
+  saveCors,
+  overrideFetchAndLoadCORSOptions: (newFn) => {
+    Actions.fetchAndLoadCORSOptions = newFn;
+  },
+  overrideSaveCors: (newFn) => {
+    Actions.saveCors = newFn;
+  }
+};
+
+export default Actions;
diff --git a/app/addons/cors/components/CORSContainer.js b/app/addons/cors/components/CORSContainer.js
index eece5ee..4e5de7d 100644
--- a/app/addons/cors/components/CORSContainer.js
+++ b/app/addons/cors/components/CORSContainer.js
@@ -1,9 +1,6 @@
 import { connect } from 'react-redux';
 import CORSScreen from './CORSScreen';
-import {
-  saveCors, showLoadingBars, fetchAndLoadCORSOptions,
-  showDomainDeleteConfirmation, hideDomainDeleteConfirmation
-} from '../actions';
+import Actions from '../actions';
 
 const mapStateToProps = ({ cors }) => {
   return {
@@ -20,20 +17,20 @@
 const mapDispatchToProps = (dispatch, ownProps) => {
   return {
     saveCORS: (options) => {
-      dispatch(showLoadingBars());
-      dispatch(saveCors(ownProps.url, options));
+      dispatch(Actions.showLoadingBars());
+      dispatch(Actions.saveCors(ownProps.url, options));
     },
 
     fetchAndLoadCORSOptions: () => {
-      dispatch(fetchAndLoadCORSOptions(ownProps.url, ownProps.node));
+      dispatch(Actions.fetchAndLoadCORSOptions(ownProps.url, ownProps.node));
     },
 
     showDeleteDomainConfirmation: (domain) => {
-      dispatch(showDomainDeleteConfirmation(domain));
+      dispatch(Actions.showDomainDeleteConfirmation(domain));
     },
 
     hideDeleteDomainConfirmation: () => {
-      dispatch(hideDomainDeleteConfirmation());
+      dispatch(Actions.hideDomainDeleteConfirmation());
     }
   };
 };