Commit 72d25a26bd6383a530f9da6bd01f994a5825237b
1 parent
468c9ce4
Exists in
spb-stable
and in
3 other branches
Feature visit issues page for public project as auth and non auth user.
Showing
2 changed files
with
33 additions
and
0 deletions
Show diff stats
features/public/public_projects.feature
| @@ -62,3 +62,14 @@ Feature: Public Projects Feature | @@ -62,3 +62,14 @@ Feature: Public Projects Feature | ||
| 62 | Given public empty project "Empty Public Project" | 62 | Given public empty project "Empty Public Project" |
| 63 | When I visit empty project page | 63 | When I visit empty project page |
| 64 | Then I should see empty public project details | 64 | Then I should see empty public project details |
| 65 | + | ||
| 66 | + Scenario: I visit public project issues page as a non authorized user | ||
| 67 | + Given I visit project "Community" page | ||
| 68 | + And I visit "Community" issues page | ||
| 69 | + Then I should see list of issues for "Community" project | ||
| 70 | +@bug | ||
| 71 | + Scenario: I visit public project issues page as authorized user | ||
| 72 | + Given I sign in as a user | ||
| 73 | + Given I visit project "Community" page | ||
| 74 | + And I visit "Community" issues page | ||
| 75 | + Then I should see list of issues for "Community" project |
features/steps/public/projects_feature.rb
| @@ -107,5 +107,27 @@ class Spinach::Features::PublicProjectsFeature < Spinach::FeatureSteps | @@ -107,5 +107,27 @@ class Spinach::Features::PublicProjectsFeature < Spinach::FeatureSteps | ||
| 107 | project = Project.find_by(name: 'Community') | 107 | project = Project.find_by(name: 'Community') |
| 108 | page.should have_field('project_clone', with: project.url_to_repo) | 108 | page.should have_field('project_clone', with: project.url_to_repo) |
| 109 | end | 109 | end |
| 110 | + | ||
| 111 | + step 'I visit "Community" issues page' do | ||
| 112 | + project = Project.find_by(name: 'Community') | ||
| 113 | + create(:issue, | ||
| 114 | + title: "Bug", | ||
| 115 | + project: project | ||
| 116 | + ) | ||
| 117 | + create(:issue, | ||
| 118 | + title: "New feature", | ||
| 119 | + project: project | ||
| 120 | + ) | ||
| 121 | + visit project_issues_path(project) | ||
| 122 | + end | ||
| 123 | + | ||
| 124 | + | ||
| 125 | + step 'I should see list of issues for "Community" project' do | ||
| 126 | + project = Project.find_by(name: 'Community') | ||
| 127 | + | ||
| 128 | + page.should have_content "Bug" | ||
| 129 | + page.should have_content project.name | ||
| 130 | + page.should have_content "New feature" | ||
| 131 | + end | ||
| 110 | end | 132 | end |
| 111 | 133 |