Commit 50ef0452 authored by Coung Ngo's avatar Coung Ngo Committed by Peter Hegman

Fix bulk edit unchecking in issues list refactor

With the `vue_issues_list` feature flag enabled,
when you select all issues then uncheck one issue,
all issues are unchecked which is incorrect behaviour.

This commit fixes this so that unchecking the one issue
only unselects that one issue.
parent bfcd87d5
......@@ -332,7 +332,7 @@ export default {
v-if="showCheckbox"
class="gl-align-self-center"
:checked="checkboxChecked"
@input="$emit('checked-input', $event)"
@change="$emit('checked-input', $event)"
>
<span class="gl-sr-only">{{ __('Select all') }}</span>
</gl-form-checkbox>
......
......@@ -104,6 +104,26 @@ RSpec.describe 'Multiple issue updating from issues#index', :js do
end
end
describe 'select all issues' do
let!(:issue_2) { create(:issue, project: project) }
before do
stub_feature_flags(vue_issues_list: true)
end
it 'after selecting all issues, unchecking one issue only unselects that one issue' do
visit project_issues_path(project)
click_button 'Edit issues'
check 'Select all'
uncheck issue.title
expect(page).to have_unchecked_field 'Select all'
expect(page).to have_unchecked_field issue.title
expect(page).to have_checked_field issue_2.title
end
end
def create_closed
create(:issue, project: project, state: :closed)
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment