summaryrefslogtreecommitdiffstats
path: root/src/utils
diff options
context:
space:
mode:
authorSteven Thomas <steve.thomas@amdocs.com>2018-09-13 16:22:40 -0400
committerSteven Thomas <steve.thomas@amdocs.com>2018-09-13 16:23:05 -0400
commit96319fec0d2af2be5802a56d6b05a3ada939c8df (patch)
tree630e87f62fbbebcded761bf3e67d0f3eb5b78598 /src/utils
parentd1975c8134f0401b0ccebf3719eda129d53dac14 (diff)
increasing test coverage to 20 percent
Issue-ID: AAI-1599 Change-Id: I345e38d4319e52b56de0a33d7065e02617cc2103 Signed-off-by: Steven Thomas <steve.thomas@amdocs.com>
Diffstat (limited to 'src/utils')
-rw-r--r--src/utils/Crypto.js13
-rw-r--r--src/utils/SpinnerContainer.jsx4
2 files changed, 13 insertions, 4 deletions
diff --git a/src/utils/Crypto.js b/src/utils/Crypto.js
index c84ca76..91b6799 100644
--- a/src/utils/Crypto.js
+++ b/src/utils/Crypto.js
@@ -23,7 +23,7 @@
*/
import CryptoJS from 'crypto-js';
-var key = 'key2017';
+const key = 'key2017';
function encrypt(text) {
var encrypted = CryptoJS.AES.encrypt(text, key);
@@ -35,8 +35,17 @@ function decrypt(text) {
return decrypted.toString(CryptoJS.enc.Utf8);
}
+function encode(phrase) {
+ return CryptoJS.enc.Utf16.parse(phrase);
+}
+
+function decode(encodedPhrase) {
+ return CryptoJS.enc.Utf16.stringify(encodedPhrase);
+}
module.exports = {
encrypt: encrypt,
- decrypt: decrypt
+ decrypt: decrypt,
+ encode: encode,
+ decode: decode
};
diff --git a/src/utils/SpinnerContainer.jsx b/src/utils/SpinnerContainer.jsx
index 9bcf769..17e6e58 100644
--- a/src/utils/SpinnerContainer.jsx
+++ b/src/utils/SpinnerContainer.jsx
@@ -26,9 +26,9 @@ import {COLOR_BLUE} from 'utils/GlobalConstants.js';
class SpinnerContainer extends Component {
render() {
// if loading, show content as busy (ex: grey out)
- const spinnerContentClass = this.props.loading ? 'spinner-content' : '';
+ const spinnerContentClass = this.props.loading ? 'spin-content' : '';
return (
- <div className='spinner-container'>
+ <div className='spin-container'>
<div className='spinner'>
<ClipLoader color={COLOR_BLUE} loading={this.props.loading} />
</div>