Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
8 changes: 3 additions & 5 deletions __tests__/components/Pomodoro/Pomodoro-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,16 +27,14 @@ describe('<Pomodoro /> tests of default settings', () => {
assert.isFalse(component.node.refs.notification.checked);
});

it('should be two buttons to control the play and pause', () => {
it('should be one visible button to control the play and pause', () => {
let buttons = component.find('div.pomodoro div.controlsPlay button');

assert.equal(buttons.length, 2);
assert.equal(buttons.length, 1);

let playButton = buttons.find('.play').node,
stopButton = buttons.find('.stop').node;
let playButton = buttons.find('.play').node;

assert.isDefined(playButton);
assert.isDefined(stopButton);
});

it('should be three buttons to change pomodoro type', () => {
Expand Down
3 changes: 1 addition & 2 deletions app/components/Pomodoro/Pomodoro.js
Original file line number Diff line number Diff line change
Expand Up @@ -216,8 +216,7 @@ export default class Pomodoro extends React.Component {

<div className="container">
<div className="controlsPlay">
<button className="play btnIcon" onClick={this.play}></button>
<button className="stop btnIcon" onClick={this.reset}></button>
{ (this.state.play) ? <button className="stop btnIcon" onClick={this.reset}></button> : <button className="play btnIcon" onClick={this.play}></button> }
</div>
</div>

Expand Down