summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZlatko Murgoski <zlatko.murgoski@nokia.com>2018-08-27 13:44:07 +0200
committerZlatko Murgoski <zlatko.murgoski@nokia.com>2018-08-27 13:45:58 +0200
commit197b38833b6172d67e13501633ff983579e7f99e (patch)
tree71da5c4d1916bf76628e40c76e52d3681c3fbe49
parent45de05c45d952d3a302fffc76c79aef7a48b04ed (diff)
Fix failed tests
Fix DateTimeCharUtil, SpinnerContainer test Fix DateTimeCharUtil, SpinnerContainer test Change-Id: I6ed1f74944be6c3ce4dd74a48e8c0531f50b777c Signed-off-by: ZlatkoMurgoski <zlatko.murgoski@nokia.com> Issue-ID: AAI-1535
-rw-r--r--test/utils/DateTimeChartUtil.test.js10
-rw-r--r--test/utils/SpinnerContainer.test.js6
2 files changed, 8 insertions, 8 deletions
diff --git a/test/utils/DateTimeChartUtil.test.js b/test/utils/DateTimeChartUtil.test.js
index 3f7be00..4f2b181 100644
--- a/test/utils/DateTimeChartUtil.test.js
+++ b/test/utils/DateTimeChartUtil.test.js
@@ -37,7 +37,7 @@ describe('DateTimeChartUtil Tests', () => {
it('getTicks', () => {
const timestamps = [
- {timestamp: 1521691200000, date: 'Thu, 22 Mar 2018 04:00:00 GMT'},
+ {timestamp: 1521604800000, date: 'Thu, 21 Mar 2018 04:00:00 GMT'},
{timestamp: 1521777600000, date: 'Thu, 23 Mar 2018 04:00:00 GMT'},
{timestamp: 1521950400000, date: 'Thu, 25 Mar 2018 04:00:00 GMT'},
{timestamp: 1522296000000, date: 'Thu, 29 Mar 2018 04:00:00 GMT'}
@@ -55,7 +55,7 @@ describe('DateTimeChartUtil Tests', () => {
it('getTicksData', () => {
const timestamps = [
- {timestamp: 1521691200000, date: 'Thu, 22 Mar 2018 04:00:00 GMT'},
+ {timestamp: 1521604800000, date: 'Thu, 21 Mar 2018 04:00:00 GMT'},
{timestamp: 1521777600000, date: 'Thu, 23 Mar 2018 04:00:00 GMT'},
{timestamp: 1521950400000, date: 'Thu, 25 Mar 2018 04:00:00 GMT'},
{timestamp: 1522296000000, date: 'Thu, 29 Mar 2018 04:00:00 GMT'}
@@ -64,9 +64,9 @@ describe('DateTimeChartUtil Tests', () => {
let mergedData = getTicksData(timestamps, ticksPerDay, 'timestamp');
// expect original 4 objects plus 4 additional objects for the missing days
// (4 additional objects will only have timestamp attribute, no date attribute)
- expect(mergedData.length).toBe(8);
- expect(mergedData[0]['timestamp']).toBe(1521691200000);
- expect(mergedData[0]['date']).toBe('Thu, 22 Mar 2018 04:00:00 GMT');
+ expect(mergedData.length).toBe(12);
+ expect(mergedData[0]['timestamp']).toBe(1521604800000);
+ expect(mergedData[0]['date']).toBe('Thu, 21 Mar 2018 04:00:00 GMT');
expect(mergedData[1]['timestamp']).toBe(1521777600000);
expect(mergedData[1]['date']).toBe('Thu, 23 Mar 2018 04:00:00 GMT');
expect(mergedData[2]['timestamp']).toBe(1521950400000);
diff --git a/test/utils/SpinnerContainer.test.js b/test/utils/SpinnerContainer.test.js
index 088ad2a..90c7cf5 100644
--- a/test/utils/SpinnerContainer.test.js
+++ b/test/utils/SpinnerContainer.test.js
@@ -9,8 +9,8 @@ describe('SpinnerContainer', () => {
it('render spinner - visible', () => {
const spinner = mount(
<SpinnerContainer loading={true}>
- <div class='test-div'>Testing Spinner Child</div>
- <div class='test-div'>Testing Spinner Child</div>
+ <div className='test-div'>Testing Spinner Child</div>
+ <div className='test-div'>Testing Spinner Child</div>
</SpinnerContainer>
);
expect(spinner.props().loading).toEqual(true); // check that the props match
@@ -24,7 +24,7 @@ describe('SpinnerContainer', () => {
it('render spinner - not visible', () => {
const spinner = mount(
<SpinnerContainer loading={false}>
- <div class='test-div'>Testing Spinner</div>
+ <div className='test-div'>Testing Spinner</div>
</SpinnerContainer>
);
expect(spinner.props().loading).toEqual(false);