Commit cf6d9a222213e37c9490bd30ae3a9971ac1baff5
1 parent
9959669f
Exists in
master
and in
4 other branches
Tests for team and group descriptions added
Showing
5 changed files
with
14 additions
and
0 deletions
Show diff stats
features/steps/admin/admin_groups.rb
| @@ -25,11 +25,13 @@ class AdminGroups < Spinach::FeatureSteps | @@ -25,11 +25,13 @@ class AdminGroups < Spinach::FeatureSteps | ||
| 25 | 25 | ||
| 26 | And 'submit form with new group info' do | 26 | And 'submit form with new group info' do |
| 27 | fill_in 'group_name', :with => 'gitlab' | 27 | fill_in 'group_name', :with => 'gitlab' |
| 28 | + fill_in 'group_description', :with => 'Group description' | ||
| 28 | click_button "Create group" | 29 | click_button "Create group" |
| 29 | end | 30 | end |
| 30 | 31 | ||
| 31 | Then 'I should see newly created group' do | 32 | Then 'I should see newly created group' do |
| 32 | page.should have_content "Group: gitlab" | 33 | page.should have_content "Group: gitlab" |
| 34 | + page.should have_content "Group description" | ||
| 33 | end | 35 | end |
| 34 | 36 | ||
| 35 | Then 'I should be redirected to group page' do | 37 | Then 'I should be redirected to group page' do |
features/steps/admin/admin_teams.rb
| @@ -18,6 +18,7 @@ class AdminTeams < Spinach::FeatureSteps | @@ -18,6 +18,7 @@ class AdminTeams < Spinach::FeatureSteps | ||
| 18 | 18 | ||
| 19 | And 'submit form with new team info' do | 19 | And 'submit form with new team info' do |
| 20 | fill_in 'user_team_name', with: 'gitlab' | 20 | fill_in 'user_team_name', with: 'gitlab' |
| 21 | + fill_in 'user_team_description', with: 'description' | ||
| 21 | click_button 'Create team' | 22 | click_button 'Create team' |
| 22 | end | 23 | end |
| 23 | 24 | ||
| @@ -27,6 +28,7 @@ class AdminTeams < Spinach::FeatureSteps | @@ -27,6 +28,7 @@ class AdminTeams < Spinach::FeatureSteps | ||
| 27 | 28 | ||
| 28 | And 'I should see newly created team' do | 29 | And 'I should see newly created team' do |
| 29 | page.should have_content "Team: gitlab" | 30 | page.should have_content "Team: gitlab" |
| 31 | + page.should have_content "description" | ||
| 30 | end | 32 | end |
| 31 | 33 | ||
| 32 | When 'I visit admin teams page' do | 34 | When 'I visit admin teams page' do |
features/steps/group/group.rb
| @@ -70,11 +70,13 @@ class Groups < Spinach::FeatureSteps | @@ -70,11 +70,13 @@ class Groups < Spinach::FeatureSteps | ||
| 70 | 70 | ||
| 71 | And 'submit form with new group info' do | 71 | And 'submit form with new group info' do |
| 72 | fill_in 'group_name', :with => 'Samurai' | 72 | fill_in 'group_name', :with => 'Samurai' |
| 73 | + fill_in 'group_description', :with => 'Tokugawa Shogunate' | ||
| 73 | click_button "Create group" | 74 | click_button "Create group" |
| 74 | end | 75 | end |
| 75 | 76 | ||
| 76 | Then 'I should see newly created group' do | 77 | Then 'I should see newly created group' do |
| 77 | page.should have_content "Samurai" | 78 | page.should have_content "Samurai" |
| 79 | + page.should have_content "Tokugawa Shogunate" | ||
| 78 | page.should have_content "You will only see events from projects in this group" | 80 | page.should have_content "You will only see events from projects in this group" |
| 79 | end | 81 | end |
| 80 | 82 |
features/steps/userteams/userteams.rb
| @@ -44,9 +44,16 @@ class Userteams < Spinach::FeatureSteps | @@ -44,9 +44,16 @@ class Userteams < Spinach::FeatureSteps | ||
| 44 | 44 | ||
| 45 | And 'I submit form with new team info' do | 45 | And 'I submit form with new team info' do |
| 46 | fill_in 'name', with: 'gitlab' | 46 | fill_in 'name', with: 'gitlab' |
| 47 | + | ||
| 48 | + fill_in 'user_team_description', with: 'team description' | ||
| 47 | click_button 'Create team' | 49 | click_button 'Create team' |
| 48 | end | 50 | end |
| 49 | 51 | ||
| 52 | + And 'I should see newly created team' do | ||
| 53 | + page.should have_content "gitlab" | ||
| 54 | + page.should have_content "team description" | ||
| 55 | + end | ||
| 56 | + | ||
| 50 | Then 'I should be redirected to new team page' do | 57 | Then 'I should be redirected to new team page' do |
| 51 | team = UserTeam.last | 58 | team = UserTeam.last |
| 52 | current_path.should == team_path(team) | 59 | current_path.should == team_path(team) |
features/teams/team.feature
| @@ -20,6 +20,7 @@ Feature: UserTeams | @@ -20,6 +20,7 @@ Feature: UserTeams | ||
| 20 | When I click to "New team" link | 20 | When I click to "New team" link |
| 21 | And I submit form with new team info | 21 | And I submit form with new team info |
| 22 | Then I should be redirected to new team page | 22 | Then I should be redirected to new team page |
| 23 | + Then I should see newly created team | ||
| 23 | 24 | ||
| 24 | Scenario: I should see team dashboard list | 25 | Scenario: I should see team dashboard list |
| 25 | When I have teams with projects and members | 26 | When I have teams with projects and members |