Skip to content

Commit

Permalink
Merge 688e21a into c6f929b
Browse files Browse the repository at this point in the history
  • Loading branch information
gkanwar committed Mar 31, 2020
2 parents c6f929b + 688e21a commit 46435ed
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion web/src/components/RunsTable/runsTable.js
Expand Up @@ -1003,7 +1003,7 @@ class RunsTable extends Component {
isCompareButtonDisabled = true;
isDeleteButtonDisabled = true;
} else {
isDeleteButtonDisabled = selectedRows.size < 2;
isDeleteButtonDisabled = selectedRows.size < 1;
// Only enable compare when 2 or more runs are selected
isCompareButtonDisabled = selectedRows.size < 2;
}
Expand Down
5 changes: 2 additions & 3 deletions web/src/components/RunsTable/runsTable.test.js
Expand Up @@ -142,9 +142,8 @@ describe('RunsTable', () => {
await initialRequestResponse();
wrapper.update().find('[test-attr="cell-row_selection-0"]').simulate('click');
wrapper.find('#delete_runs').at(1).simulate('click');
// Should not open modal when only one row is selected
expect(wrapper.update().state().showDeleteConfirmationModal).toBeFalsy();
expect(wrapper.update().state().isDeleteButtonDisabled).toBeTruthy();
expect(wrapper.update().state().showDeleteConfirmationModal).toBeTruthy();
expect(wrapper.update().state().isDeleteButtonDisabled).toBeFalsy();

wrapper.update().find('[test-attr="cell-row_selection-1"]').simulate('click');
wrapper.find('#delete_runs').at(1).simulate('click');
Expand Down

0 comments on commit 46435ed

Please sign in to comment.