summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorRémy Coutable <remy@rymai.me>2016-09-22 10:03:46 +0000
committerRémy Coutable <remy@rymai.me>2016-09-22 12:31:02 +0200
commitb48d3893d07d81267d6e8fc013b871df2185735a (patch)
tree5c26025b739364277c38124996b8f233647b0865 /spec
parentebfb2ea21b4210895711601dd12568557c4b8f3c (diff)
downloadgitlab-ce-b48d3893d07d81267d6e8fc013b871df2185735a.tar.gz
Merge branch '22421-fix-issuable-counter-when-more-than-one-label-is-selected' into 'master'
Hotfix the issuable counters when filtering by multiple labels This is an ugly fix, but it make the counters work when multiple labels are selected so I think we should include it in 8.12, and try to find a proper fix afterward. Closes #22421 See merge request !6455
Diffstat (limited to 'spec')
-rw-r--r--spec/features/issues/filter_by_labels_spec.rb20
1 files changed, 13 insertions, 7 deletions
diff --git a/spec/features/issues/filter_by_labels_spec.rb b/spec/features/issues/filter_by_labels_spec.rb
index 908b18e5339..7e2abd759e1 100644
--- a/spec/features/issues/filter_by_labels_spec.rb
+++ b/spec/features/issues/filter_by_labels_spec.rb
@@ -6,20 +6,19 @@ feature 'Issue filtering by Labels', feature: true do
let(:project) { create(:project, :public) }
let!(:user) { create(:user)}
let!(:label) { create(:label, project: project) }
+ let(:bug) { create(:label, project: project, title: 'bug') }
+ let(:feature) { create(:label, project: project, title: 'feature') }
+ let(:enhancement) { create(:label, project: project, title: 'enhancement') }
+ let(:issue1) { create(:issue, title: "Bugfix1", project: project) }
+ let(:issue2) { create(:issue, title: "Bugfix2", project: project) }
+ let(:issue3) { create(:issue, title: "Feature1", project: project) }
before do
- bug = create(:label, project: project, title: 'bug')
- feature = create(:label, project: project, title: 'feature')
- enhancement = create(:label, project: project, title: 'enhancement')
-
- issue1 = create(:issue, title: "Bugfix1", project: project)
issue1.labels << bug
- issue2 = create(:issue, title: "Bugfix2", project: project)
issue2.labels << bug
issue2.labels << enhancement
- issue3 = create(:issue, title: "Feature1", project: project)
issue3.labels << feature
project.team << [user, :master]
@@ -159,6 +158,13 @@ feature 'Issue filtering by Labels', feature: true do
wait_for_ajax
end
+ it 'shows a correct "Open" counter' do
+ page.within '.issues-state-filters' do
+ expect(page).not_to have_content "{#{issue2.id} => 1}"
+ expect(page).to have_content "Open 1"
+ end
+ end
+
it 'shows issue "Bugfix2" in issues list' do
expect(page).to have_content "Bugfix2"
end