Skip to content
This repository has been archived by the owner on Apr 15, 2019. It is now read-only.

Migrate forging component to React - Closes #351 #495

Merged
merged 26 commits into from
Jul 24, 2017
Merged
Changes from 1 commit
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
a6c6a6e
Migrate forging component to React
slaweet Jul 13, 2017
6ceb523
Add unit tests for ForgedBlocks component
slaweet Jul 18, 2017
a0bee86
Fix forging reducers to append and prepend forgedBlocks
slaweet Jul 19, 2017
6ca8ceb
Add tests for forging reducers
slaweet Jul 19, 2017
4c62223
Add unit tests for forging actions
slaweet Jul 19, 2017
2e64149
Add more unit tests for forging components
slaweet Jul 19, 2017
e9f3ef9
Use <TooltipTime> instead of react-timeago
slaweet Jul 21, 2017
c06f0b9
Use spread operator instead of [].concat
slaweet Jul 21, 2017
5cc6d91
Merge branch 'development' into 351-forging-tab
slaweet Jul 21, 2017
dacebdd
Load delegate info with account
slaweet Jul 21, 2017
e6f344a
Move Page links right below Account
slaweet Jul 21, 2017
3cbfbf8
Merge branch 'development' into 351-forging-tab
slaweet Jul 21, 2017
c94c058
Replace FormattedNumber with LiskNumnber in forging
slaweet Jul 21, 2017
d0c4cc1
Fix delegate username in account component
slaweet Jul 21, 2017
8ad9495
Fix forging reducer to work without forgedBlocks
slaweet Jul 21, 2017
3988ae2
Fix Address delegate test
slaweet Jul 21, 2017
7a09fab
Fix test descriptions
slaweet Jul 21, 2017
d753137
Use LiskAmount in forgedBlocks
slaweet Jul 21, 2017
3eb46c0
Remove unused import from forging.test.js
slaweet Jul 21, 2017
27806fa
Handle non-delegate state of forgingComponent
slaweet Jul 21, 2017
dc3cd2e
Fix test describe statements
slaweet Jul 24, 2017
000e534
Rename variables in delegateStats
slaweet Jul 24, 2017
cbfe8d3
Refactor percentageTransform in delegateStats
slaweet Jul 24, 2017
2970c60
Move Api calls to the forgingComponent consuming the data
slaweet Jul 24, 2017
9c3d502
Fix forgingComponent unit tests
slaweet Jul 24, 2017
84ec037
Fix delegateStats rank for rank > 101
slaweet Jul 24, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add unit tests for forging actions
slaweet committed Jul 21, 2017

Unverified

The committer email address is not verified.
commit 4c6222365961476f881bc770b170db1a6f59d955
27 changes: 27 additions & 0 deletions src/actions/forging.test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import { expect } from 'chai';
import actionTypes from '../constants/actions';
import { updateForgedBlocks, updateForgingStats } from './forging';

describe('actions', () => {
it('should create an action to update forged blocks', () => {
const data = {
online: true,
};

const expectedAction = {
data,
type: actionTypes.forgedBlocksUpdated,
};
expect(updateForgedBlocks(data)).to.be.deep.equal(expectedAction);
});

it('should create an action to update forging stats', () => {
const data = { last7d: 1000 };

const expectedAction = {
data,
type: actionTypes.forgingStatsUpdated,
};
expect(updateForgingStats(data)).to.be.deep.equal(expectedAction);
});
});