summaryrefslogtreecommitdiff
path: root/features
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dzaporozhets@sphereconsultinginc.com>2012-06-27 21:20:35 +0300
committerDmitriy Zaporozhets <dzaporozhets@sphereconsultinginc.com>2012-06-27 21:20:35 +0300
commit1b1e77c728e575a110e204e142e81bdff2737536 (patch)
treed0128a4f81844b219ba4fe5e9554342e63a0300e /features
parent4c1f435ab78e5d4da3d6aaaf20579be13b662d02 (diff)
downloadgitlab-ce-1b1e77c728e575a110e204e142e81bdff2737536.tar.gz
Issue Labels: Edit, show, index + filter
Diffstat (limited to 'features')
-rw-r--r--features/projects/issues/issues.feature12
-rw-r--r--features/step_definitions/project_issues_steps.rb22
2 files changed, 34 insertions, 0 deletions
diff --git a/features/projects/issues/issues.feature b/features/projects/issues/issues.feature
index e69de29bb2d..0ca0792dd8a 100644
--- a/features/projects/issues/issues.feature
+++ b/features/projects/issues/issues.feature
@@ -0,0 +1,12 @@
+Feature: Issues
+ Background:
+ Given I signin as a user
+ And I own project "Shop"
+ And project "Shop" have "Release 0.4" open issue
+ And project "Shop" have "Release 0.3" closed issue
+ And I visit project "Shop" issues page
+
+ Scenario: I should see open issues
+ Given I should see "Release 0.4" open issue
+ And I should not see "Release 0.3" closed issue
+
diff --git a/features/step_definitions/project_issues_steps.rb b/features/step_definitions/project_issues_steps.rb
new file mode 100644
index 00000000000..e83c0e7f399
--- /dev/null
+++ b/features/step_definitions/project_issues_steps.rb
@@ -0,0 +1,22 @@
+Given /^project "(.*?)" have "(.*?)" open issue$/ do |arg1, arg2|
+ project = Project.find_by_name(arg1)
+ Factory.create(:issue, :title => arg2, :project => project, :author => project.users.first)
+end
+
+Given /^project "(.*?)" have "(.*?)" closed issue$/ do |arg1, arg2|
+ project = Project.find_by_name(arg1)
+ Factory.create(:issue, :title => arg2, :project => project, :author => project.users.first, :closed => true)
+end
+
+Given /^I visit project "(.*?)" issues page$/ do |arg1|
+ visit project_issues_path(Project.find_by_name(arg1))
+end
+
+Given /^I should see "(.*?)" open issue$/ do |arg1|
+ page.should have_content arg1
+end
+
+Given /^I should not see "(.*?)" closed issue$/ do |arg1|
+ page.should_not have_content arg1
+end
+