summaryrefslogtreecommitdiff
path: root/features
diff options
context:
space:
mode:
authorYorick Peterse <yorickpeterse@gmail.com>2016-04-04 09:05:57 +0000
committerYorick Peterse <yorickpeterse@gmail.com>2016-04-04 09:05:57 +0000
commit3dd91f55a048c13e6dc81ec685e521d2fc5a78f5 (patch)
treeb4db81819109cbbae78e52874f13199b009d3deb /features
parentfee7ad86273b17100d541b68c670a20ca954d673 (diff)
parentfd090a2fab64332907953a1525cf5c822d983993 (diff)
downloadgitlab-ce-3dd91f55a048c13e6dc81ec685e521d2fc5a78f5.tar.gz
Merge branch 'issue_14853' into 'master'
Fix bug related to filtering Issues by Label/Milestone. See merge request !3499
Diffstat (limited to 'features')
-rw-r--r--features/dashboard/dashboard.feature8
-rw-r--r--features/steps/dashboard/dashboard.rb19
2 files changed, 27 insertions, 0 deletions
diff --git a/features/dashboard/dashboard.feature b/features/dashboard/dashboard.feature
index c3b3577c449..db73309804c 100644
--- a/features/dashboard/dashboard.feature
+++ b/features/dashboard/dashboard.feature
@@ -6,6 +6,7 @@ Feature: Dashboard
And project "Shop" has push event
And project "Shop" has CI enabled
And project "Shop" has CI build
+ And project "Shop" has labels: "bug", "feature", "enhancement"
And I visit dashboard page
Scenario: I should see projects list
@@ -51,6 +52,13 @@ Feature: Dashboard
Then The list should be sorted by "Oldest updated"
@javascript
+ Scenario: Filtering Issues by label
+ Given project "Shop" has issue "Bugfix1" with label "feature"
+ When I visit dashboard issues page
+ And I filter the list by label "feature"
+ Then I should see "Bugfix1" in issues list
+
+ @javascript
Scenario: Visiting Project's issues after sorting
Given I visit dashboard issues page
And I sort the list by "Oldest updated"
diff --git a/features/steps/dashboard/dashboard.rb b/features/steps/dashboard/dashboard.rb
index 5062e348844..b5980b35102 100644
--- a/features/steps/dashboard/dashboard.rb
+++ b/features/steps/dashboard/dashboard.rb
@@ -87,4 +87,23 @@ class Spinach::Features::Dashboard < Spinach::FeatureSteps
step 'I should see 1 project at group list' do
expect(find('span.last_activity/span')).to have_content('1')
end
+
+ step 'I filter the list by label "feature"' do
+ page.within ".labels-filter" do
+ find('.dropdown').click
+ click_link "feature"
+ end
+ end
+
+ step 'I should see "Bugfix1" in issues list' do
+ page.within "ul.content-list" do
+ expect(page).to have_content "Bugfix1"
+ end
+ end
+
+ step 'project "Shop" has issue "Bugfix1" with label "feature"' do
+ project = Project.find_by(name: "Shop")
+ issue = create(:issue, title: "Bugfix1", project: project, assignee: current_user)
+ issue.labels << project.labels.find_by(title: 'feature')
+ end
end