diff options
author | Sebastian Ziebell <sebastian.ziebell@asquera.de> | 2013-02-08 10:32:42 +0100 |
---|---|---|
committer | Sebastian Ziebell <sebastian.ziebell@asquera.de> | 2013-02-08 10:32:42 +0100 |
commit | 8045a81bcf5822f1992442750e1484a93c368229 (patch) | |
tree | 94ce2b257f3ba002ac1a0fde70b69b622304810d /features | |
parent | 5d8a99f10429168e6471fdd1843f5045a10a84b3 (diff) | |
parent | 2f0a75ab77af430f682d67aa9bb865007d832795 (diff) | |
download | gitlab-ce-8045a81bcf5822f1992442750e1484a93c368229.tar.gz |
Merge branch 'master' into fixes/api
Diffstat (limited to 'features')
-rw-r--r-- | features/group/group.feature | 6 | ||||
-rw-r--r-- | features/steps/admin/admin_active_tab.rb | 2 | ||||
-rw-r--r-- | features/steps/group/group.rb | 11 | ||||
-rw-r--r-- | features/steps/profile/profile_active_tab.rb | 2 | ||||
-rw-r--r-- | features/steps/project/project_active_tab.rb | 2 | ||||
-rw-r--r-- | features/steps/project/project_network_graph.rb | 2 | ||||
-rw-r--r-- | features/steps/project/project_team_management.rb | 2 | ||||
-rw-r--r-- | features/steps/shared/active_tab.rb | 6 | ||||
-rw-r--r-- | features/steps/shared/paths.rb | 6 | ||||
-rw-r--r-- | features/support/env.rb | 9 |
10 files changed, 33 insertions, 15 deletions
diff --git a/features/group/group.feature b/features/group/group.feature index a4a55a7fc26..a48affe8e02 100644 --- a/features/group/group.feature +++ b/features/group/group.feature @@ -24,3 +24,9 @@ Feature: Groups When I visit group people page And I select user "John" from list with role "Reporter" Then I should see user "John" in team list + + Scenario: I should see edit group page + When I visit group settings page + And I change group name + Then I should see new group name + diff --git a/features/steps/admin/admin_active_tab.rb b/features/steps/admin/admin_active_tab.rb index 48ec7bac0d6..f14c5f396be 100644 --- a/features/steps/admin/admin_active_tab.rb +++ b/features/steps/admin/admin_active_tab.rb @@ -4,7 +4,7 @@ class AdminActiveTab < Spinach::FeatureSteps include SharedActiveTab Then 'the active main tab should be Home' do - ensure_active_main_tab('Stats') + ensure_active_main_tab('Home') end Then 'the active main tab should be Projects' do diff --git a/features/steps/group/group.rb b/features/steps/group/group.rb index c6c6b4b5e5b..5cfa4756ac3 100644 --- a/features/steps/group/group.rb +++ b/features/steps/group/group.rb @@ -82,6 +82,17 @@ class Groups < Spinach::FeatureSteps current_path.should == group_path(Group.last) end + And 'I change group name' do + fill_in 'group_name', :with => 'new-name' + click_button "Save group" + end + + Then 'I should see new group name' do + within ".navbar-gitlab" do + page.should have_content "group: new-name" + end + end + protected def current_group diff --git a/features/steps/profile/profile_active_tab.rb b/features/steps/profile/profile_active_tab.rb index 1924a6fa785..ee9f5f201cf 100644 --- a/features/steps/profile/profile_active_tab.rb +++ b/features/steps/profile/profile_active_tab.rb @@ -4,7 +4,7 @@ class ProfileActiveTab < Spinach::FeatureSteps include SharedActiveTab Then 'the active main tab should be Home' do - ensure_active_main_tab('Profile') + ensure_active_main_tab('Home') end Then 'the active main tab should be Account' do diff --git a/features/steps/project/project_active_tab.rb b/features/steps/project/project_active_tab.rb index a5c80353862..bce67c82962 100644 --- a/features/steps/project/project_active_tab.rb +++ b/features/steps/project/project_active_tab.rb @@ -7,7 +7,7 @@ class ProjectActiveTab < Spinach::FeatureSteps # Main Tabs Then 'the active main tab should be Home' do - ensure_active_main_tab(@project.name) + ensure_active_main_tab('Home') end Then 'the active main tab should be Files' do diff --git a/features/steps/project/project_network_graph.rb b/features/steps/project/project_network_graph.rb index 77149bfe2c3..f26deff9367 100644 --- a/features/steps/project/project_network_graph.rb +++ b/features/steps/project/project_network_graph.rb @@ -14,6 +14,6 @@ class ProjectNetworkGraph < Spinach::FeatureSteps Gitlab::Graph::JsonBuilder.stub(max_count: 10) project = Project.find_by_name("Shop") - visit graph_project_path(project) + visit project_graph_path(project, "master") end end diff --git a/features/steps/project/project_team_management.rb b/features/steps/project/project_team_management.rb index 91b3ffeee9a..19352fe0ab8 100644 --- a/features/steps/project/project_team_management.rb +++ b/features/steps/project/project_team_management.rb @@ -24,7 +24,7 @@ class ProjectTeamManagement < Spinach::FeatureSteps select user.name, :from => "user_ids" select "Reporter", :from => "project_access" end - click_button "Save" + click_button "Add users" end Then 'I should see "Mike" in team list as "Reporter"' do diff --git a/features/steps/shared/active_tab.rb b/features/steps/shared/active_tab.rb index 884f2d5fb71..446e3b9a8b3 100644 --- a/features/steps/shared/active_tab.rb +++ b/features/steps/shared/active_tab.rb @@ -2,7 +2,11 @@ module SharedActiveTab include Spinach::DSL def ensure_active_main_tab(content) - page.find('ul.main_menu li.active').should have_content(content) + if content == "Home" + page.find('ul.main_menu li.active').should have_css('i.icon-home') + else + page.find('ul.main_menu li.active').should have_content(content) + end end def ensure_active_sub_tab(content) diff --git a/features/steps/shared/paths.rb b/features/steps/shared/paths.rb index 42ef40d6b95..a8e68012d05 100644 --- a/features/steps/shared/paths.rb +++ b/features/steps/shared/paths.rb @@ -25,6 +25,10 @@ module SharedPaths visit people_group_path(current_group) end + When 'I visit group settings page' do + visit edit_group_path(current_group) + end + # ---------------------------------------- # Dashboard # ---------------------------------------- @@ -141,7 +145,7 @@ module SharedPaths # Stub Graph::JsonBuilder max_size to speed up test (10 commits vs. 650) Gitlab::Graph::JsonBuilder.stub(max_count: 10) - visit graph_project_path(@project) + visit project_graph_path(@project, root_ref) end Given "I visit my project's issues page" do diff --git a/features/support/env.rb b/features/support/env.rb index a08aa0de9f8..c19ca3088cb 100644 --- a/features/support/env.rb +++ b/features/support/env.rb @@ -9,17 +9,12 @@ require 'spinach/capybara' require 'sidekiq/testing/inline' -%w(gitolite_stub stubbed_repository valid_commit).each do |f| +%w(stubbed_repository valid_commit).each do |f| require Rails.root.join('spec', 'support', f) end Dir["#{Rails.root}/features/steps/shared/*.rb"].each {|file| require file} -# -# Stub gitolite -# -include GitoliteStub - WebMock.allow_net_connect! # # JS driver @@ -49,6 +44,4 @@ Spinach.hooks.before_run do RSpec::Mocks::setup self include FactoryGirl::Syntax::Methods - - stub_gitolite! end |