Skip to content

Commit

Permalink
feat: enable retry button for passed tests (#115)
Browse files Browse the repository at this point in the history
  • Loading branch information
rostik404 authored May 29, 2018
1 parent 894b954 commit b11661c
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions lib/static/components/section/body.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import SwitcherRetry from './switcher-retry';
import ControlButton from '../controls/button';
import State from '../state';
import * as actions from '../../modules/actions';
import {isSuccessStatus, isFailStatus, isErroredStatus} from '../../../common-utils';
import {isAcceptable} from '../../modules/utils';

class SectionBrowserBody extends Component {
Expand Down Expand Up @@ -53,9 +52,7 @@ class SectionBrowserBody extends Component {

_addExtraButtons(activeResult) {
const {gui, running} = this.props;
const {status} = activeResult;
const acceptDisabled = !isAcceptable(activeResult);
const retryDisabled = running || isSuccessStatus(status) || (!isFailStatus(status) && !isErroredStatus(status));

return gui
? (
Expand All @@ -69,7 +66,7 @@ class SectionBrowserBody extends Component {
<ControlButton
label="↻ Retry"
isSuiteControl={true}
isDisabled={retryDisabled}
isDisabled={running}
handler={this.onTestRetry}
/>
</div>
Expand Down

0 comments on commit b11661c

Please sign in to comment.