Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-03-11 01:19:28 +0300
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-03-11 01:19:28 +0300
commit8527e8d5996bb5543cb5a13e857b864b466a31f2 (patch)
tree45ed0dbd7037b8832860fe671179180464f1b600 /features
parent04c674e6792ad638dfb505f06f4cf9e980bb4a74 (diff)
Fix test for creating group from dashboard
Diffstat (limited to 'features')
-rw-r--r--features/dashboard/group.feature8
-rw-r--r--features/groups.feature8
-rw-r--r--features/steps/dashboard/group.rb19
-rw-r--r--features/steps/groups.rb19
4 files changed, 27 insertions, 27 deletions
diff --git a/features/dashboard/group.feature b/features/dashboard/group.feature
index 92c1379ba77..cf4b8d7283b 100644
--- a/features/dashboard/group.feature
+++ b/features/dashboard/group.feature
@@ -46,3 +46,11 @@ Feature: Dashboard Group
When I visit dashboard groups page
Then I should see group "Owned" in group list
Then I should not see group "Guest" in group list
+
+ Scenario: Create a group from dasboard
+ And I visit dashboard groups page
+ And I click new group link
+ And submit form with new group "Samurai" info
+ Then I should be redirected to group "Samurai" page
+ And I should see newly created group "Samurai"
+
diff --git a/features/groups.feature b/features/groups.feature
index b5ff03db844..05546e0d6ef 100644
--- a/features/groups.feature
+++ b/features/groups.feature
@@ -10,14 +10,6 @@ Feature: Groups
Then I should see group "Owned" projects list
And I should see projects activity feed
- Scenario: Create a group from dasboard
- When I visit group "Owned" page
- And I visit dashboard page
- And I click new group link
- And submit form with new group "Samurai" info
- Then I should be redirected to group "Samurai" page
- And I should see newly created group "Samurai"
-
Scenario: I should see group "Owned" issues list
Given project from group "Owned" has issues assigned to me
When I visit group "Owned" issues page
diff --git a/features/steps/dashboard/group.rb b/features/steps/dashboard/group.rb
index 09d7717b67b..8384df2fb59 100644
--- a/features/steps/dashboard/group.rb
+++ b/features/steps/dashboard/group.rb
@@ -41,4 +41,23 @@ class Spinach::Features::DashboardGroup < Spinach::FeatureSteps
step 'I should not see group "Guest" in group list' do
page.should_not have_content("Guest")
end
+
+ step 'I click new group link' do
+ click_link "New Group"
+ end
+
+ step 'submit form with new group "Samurai" info' do
+ fill_in 'group_path', with: 'Samurai'
+ fill_in 'group_description', with: 'Tokugawa Shogunate'
+ click_button "Create group"
+ end
+
+ step 'I should be redirected to group "Samurai" page' do
+ current_path.should == group_path(Group.find_by(name: 'Samurai'))
+ end
+
+ step 'I should see newly created group "Samurai"' do
+ page.should have_content "Samurai"
+ page.should have_content "Tokugawa Shogunate"
+ end
end
diff --git a/features/steps/groups.rb b/features/steps/groups.rb
index c3c34070e2e..91921f5e21c 100644
--- a/features/steps/groups.rb
+++ b/features/steps/groups.rb
@@ -72,25 +72,6 @@ class Spinach::Features::Groups < Spinach::FeatureSteps
author: current_user
end
- When 'I click new group link' do
- click_link "New group"
- end
-
- step 'submit form with new group "Samurai" info' do
- fill_in 'group_path', with: 'Samurai'
- fill_in 'group_description', with: 'Tokugawa Shogunate'
- click_button "Create group"
- end
-
- step 'I should be redirected to group "Samurai" page' do
- current_path.should == group_path(Group.find_by(name: 'Samurai'))
- end
-
- step 'I should see newly created group "Samurai"' do
- page.should have_content "Samurai"
- page.should have_content "Tokugawa Shogunate"
- end
-
step 'I change group "Owned" name to "new-name"' do
fill_in 'group_name', with: 'new-name'
fill_in 'group_path', with: 'new-name'