diff options
author | Phil Hughes <me@iamphill.com> | 2016-04-28 10:32:32 +0100 |
---|---|---|
committer | Jacob Schatz <jschatz1@gmail.com> | 2016-04-29 12:10:30 -0400 |
commit | b2ec176539dd7caf8ae463776175e00c80199470 (patch) | |
tree | 1045e98b5ff34cdae15305e332d4e1b6699cb608 /spec/features/dashboard | |
parent | bfc6a0e3718c1b4d5e3d2adcc1ef16cf5274df5c (diff) | |
download | gitlab-ce-b2ec176539dd7caf8ae463776175e00c80199470.tar.gz |
Removes duplicates from the label dropdown
It concats the duplicate labels into a single label in the dropdown with
the color being a gradient of the differnet colors being concatted.
Closes #16555
Diffstat (limited to 'spec/features/dashboard')
-rw-r--r-- | spec/features/dashboard/label_filter_spec.rb | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/spec/features/dashboard/label_filter_spec.rb b/spec/features/dashboard/label_filter_spec.rb new file mode 100644 index 00000000000..24e83d44010 --- /dev/null +++ b/spec/features/dashboard/label_filter_spec.rb @@ -0,0 +1,29 @@ +require 'spec_helper' + +describe 'Dashboard > label filter', feature: true, js: true do + let(:user) { create(:user) } + let(:project) { create(:project, name: 'test', namespace: user.namespace) } + let(:project2) { create(:project, name: 'test2', path: 'test2', namespace: user.namespace) } + let(:label) { create(:label, title: 'bug', color: '#ff0000') } + let(:label2) { create(:label, title: 'bug') } + + before do + project.labels << label + project2.labels << label2 + + login_as(user) + visit issues_dashboard_path + end + + context 'duplicate labels' do + it 'should remove duplicate labels' do + page.within('.labels-filter') do + click_button 'Label' + end + + page.within('.dropdown-menu-labels') do + expect(page).to have_selector('.dropdown-content a', text: 'bug', count: 1) + end + end + end +end |