Skip to content
This repository has been archived by the owner on Jun 26, 2020. It is now read-only.

Commit

Permalink
Add unit test.
Browse files Browse the repository at this point in the history
  • Loading branch information
Mateusz Samsel committed Aug 8, 2019
1 parent 4234374 commit b3f1876
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions tests/colorgrid/colorgridview.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,23 @@ describe( 'ColorGridView', () => {
expect( view.items.get( 2 ).isOn ).to.be.false;
} );

it( 'should determins isOn value when colorTile is added', () => {
view.selectedColor = 'gold';

const tile = new ColorTileView();
tile.set( {
color: 'gold',
label: 'Gold',
options: {
hasBorder: false
}
} );

view.items.add( tile );

expect( view.items.get( 3 ).isOn ).to.be.true;
} );

describe( 'add colors from definition as child items', () => {
it( 'has proper number of elements', () => {
expect( view.items.length ).to.equal( 3 );
Expand Down

0 comments on commit b3f1876

Please sign in to comment.