diff options
author | Dmitriy Zaporozhets <dzaporozhets@sphereconsultinginc.com> | 2012-08-03 20:49:54 +0400 |
---|---|---|
committer | Dmitriy Zaporozhets <dzaporozhets@sphereconsultinginc.com> | 2012-08-03 20:49:54 +0400 |
commit | 1281c122c7a4edf2873aad13c22ea09ce6dc57c3 (patch) | |
tree | 12bfd6b27c27919787d65f0a93551e652a894915 /features | |
parent | b846ac10597d832bd4b03ee65a026fcf4f9480f2 (diff) |
Issues cucumber. refactored step_definitoons
Diffstat (limited to 'features')
-rw-r--r-- | features/projects/issues/issues.feature | 30 | ||||
-rw-r--r-- | features/step_definitions/profile/profile_keys_steps.rb (renamed from features/step_definitions/profile_keys_steps.rb) | 0 | ||||
-rw-r--r-- | features/step_definitions/profile/profile_steps.rb (renamed from features/step_definitions/profile_steps.rb) | 0 | ||||
-rw-r--r-- | features/step_definitions/project/browse_code_steps.rb (renamed from features/step_definitions/browse_code_steps.rb) | 0 | ||||
-rw-r--r-- | features/step_definitions/project/project_commits_steps.rb (renamed from features/step_definitions/project_commits_steps.rb) | 0 | ||||
-rw-r--r-- | features/step_definitions/project/project_issues_steps.rb | 47 | ||||
-rw-r--r-- | features/step_definitions/project/project_merge_requests_steps.rb (renamed from features/step_definitions/project_merge_requests_steps.rb) | 0 | ||||
-rw-r--r-- | features/step_definitions/project/project_team_steps.rb (renamed from features/step_definitions/project_team_steps.rb) | 0 | ||||
-rw-r--r-- | features/step_definitions/project/project_wiki_steps.rb (renamed from features/step_definitions/project_wiki_steps.rb) | 0 | ||||
-rw-r--r-- | features/step_definitions/project/projects_steps.rb (renamed from features/step_definitions/projects_steps.rb) | 0 | ||||
-rw-r--r-- | features/step_definitions/project_issues_steps.rb | 22 |
11 files changed, 75 insertions, 24 deletions
diff --git a/features/projects/issues/issues.feature b/features/projects/issues/issues.feature index 0ca0792dd8a..a45dd801696 100644 --- a/features/projects/issues/issues.feature +++ b/features/projects/issues/issues.feature @@ -7,6 +7,32 @@ Feature: Issues 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 + Given I should see "Release 0.4" in issues + And I should not see "Release 0.3" in issues + Scenario: I should see closed issues + Given I click link "Closed" + Then I should see "Release 0.3" in issues + And I should not see "Release 0.4" in issues + + Scenario: I should see all issues + Given I click link "All" + Then I should see "Release 0.3" in issues + And I should see "Release 0.4" in issues + + Scenario: I visit issue page + Given I click link "Release 0.4" + Then I should see issue "Release 0.4" + + @javascript + Scenario: I submit new unassigned issue + Given I click link "New Issue" + And I submit new issue "500 error on profile" + Given I click link "500 error on profile" + Then I should see issue "500 error on profile" + + @javascript + Scenario: I comment issue + Given I visit issue page "Release 0.4" + And I leave a comment like "XML attached" + Then I should see commetn "XML attached" diff --git a/features/step_definitions/profile_keys_steps.rb b/features/step_definitions/profile/profile_keys_steps.rb index 5ab7e0480ad..5ab7e0480ad 100644 --- a/features/step_definitions/profile_keys_steps.rb +++ b/features/step_definitions/profile/profile_keys_steps.rb diff --git a/features/step_definitions/profile_steps.rb b/features/step_definitions/profile/profile_steps.rb index 4661139c180..4661139c180 100644 --- a/features/step_definitions/profile_steps.rb +++ b/features/step_definitions/profile/profile_steps.rb diff --git a/features/step_definitions/browse_code_steps.rb b/features/step_definitions/project/browse_code_steps.rb index 7f9001bb989..7f9001bb989 100644 --- a/features/step_definitions/browse_code_steps.rb +++ b/features/step_definitions/project/browse_code_steps.rb diff --git a/features/step_definitions/project_commits_steps.rb b/features/step_definitions/project/project_commits_steps.rb index 9b3b0aa1f81..9b3b0aa1f81 100644 --- a/features/step_definitions/project_commits_steps.rb +++ b/features/step_definitions/project/project_commits_steps.rb diff --git a/features/step_definitions/project/project_issues_steps.rb b/features/step_definitions/project/project_issues_steps.rb new file mode 100644 index 00000000000..2c47f37233e --- /dev/null +++ b/features/step_definitions/project/project_issues_steps.rb @@ -0,0 +1,47 @@ +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 "(.*?)" in issues$/ do |arg1| + page.should have_content arg1 +end + +Given /^I should not see "(.*?)" in issues$/ do |arg1| + page.should_not have_content arg1 +end + +Then /^I should see issue "(.*?)"$/ do |arg1| + issue = Issue.find_by_title(arg1) + page.should have_content issue.title + page.should have_content issue.author_name + page.should have_content issue.project.name +end + +Given /^I visit issue page "(.*?)"$/ do |arg1| + issue = Issue.find_by_title(arg1) + visit project_issue_path(issue.project, issue) +end + +Given /^I leave a comment like "(.*?)"$/ do |arg1| + fill_in "note_note", :with => arg1 + click_button "Add Comment" +end + +Then /^I should see commetn "(.*?)"$/ do |arg1| + page.should have_content(arg1) +end + +Given /^I submit new issue "(.*?)"$/ do |arg1| + fill_in "issue_title", :with => arg1 + click_button "Submit new issue" +end diff --git a/features/step_definitions/project_merge_requests_steps.rb b/features/step_definitions/project/project_merge_requests_steps.rb index 6749773e2b5..6749773e2b5 100644 --- a/features/step_definitions/project_merge_requests_steps.rb +++ b/features/step_definitions/project/project_merge_requests_steps.rb diff --git a/features/step_definitions/project_team_steps.rb b/features/step_definitions/project/project_team_steps.rb index f0bab29a6f8..f0bab29a6f8 100644 --- a/features/step_definitions/project_team_steps.rb +++ b/features/step_definitions/project/project_team_steps.rb diff --git a/features/step_definitions/project_wiki_steps.rb b/features/step_definitions/project/project_wiki_steps.rb index 10de38d9ae3..10de38d9ae3 100644 --- a/features/step_definitions/project_wiki_steps.rb +++ b/features/step_definitions/project/project_wiki_steps.rb diff --git a/features/step_definitions/projects_steps.rb b/features/step_definitions/project/projects_steps.rb index bca1213908d..bca1213908d 100644 --- a/features/step_definitions/projects_steps.rb +++ b/features/step_definitions/project/projects_steps.rb diff --git a/features/step_definitions/project_issues_steps.rb b/features/step_definitions/project_issues_steps.rb deleted file mode 100644 index e83c0e7f399..00000000000 --- a/features/step_definitions/project_issues_steps.rb +++ /dev/null @@ -1,22 +0,0 @@ -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 - |