From 37187336b1ae92751d98f33d1f378aac069ecdaa Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Thu, 21 Feb 2013 12:27:52 +0200 Subject: [PATCH] Team features are green now --- features/project/source/browse_files.feature | 4 ++-- features/project/source/git_blame.feature | 2 +- features/steps/admin/admin_teams.rb | 14 +++++++------- features/steps/project/project_browse_files.rb | 6 +++--- features/steps/project/project_browse_git_repo.rb | 6 +++--- features/steps/userteams/userteams.rb | 8 ++++---- spec/support/stubbed_repository.rb | 2 +- 7 files changed, 21 insertions(+), 21 deletions(-) diff --git a/features/project/source/browse_files.feature b/features/project/source/browse_files.feature index 0b8495ff..ee26f537 100644 --- a/features/project/source/browse_files.feature +++ b/features/project/source/browse_files.feature @@ -12,7 +12,7 @@ Feature: Project Browse files Then I should see files from repository for "8470d70" Scenario: I browse file content - Given I click on "Gemfile" file in repo + Given I click on "Gemfile.lock" file in repo Then I should see it content Scenario: I browse raw file @@ -22,6 +22,6 @@ Feature: Project Browse files @javascript Scenario: I can edit file - Given I click on "Gemfile" file in repo + Given I click on "Gemfile.lock" file in repo And I click button "edit" Then I can edit code diff --git a/features/project/source/git_blame.feature b/features/project/source/git_blame.feature index 93ed20a8..3b20437a 100644 --- a/features/project/source/git_blame.feature +++ b/features/project/source/git_blame.feature @@ -5,6 +5,6 @@ Feature: Project Browse git repo Given I visit project source page Scenario: I blame file - Given I click on "Gemfile" file in repo + Given I click on "Gemfile.lock" file in repo And I click blame button Then I should see git file blame diff --git a/features/steps/admin/admin_teams.rb b/features/steps/admin/admin_teams.rb index 5c66b24b..637fc4e5 100644 --- a/features/steps/admin/admin_teams.rb +++ b/features/steps/admin/admin_teams.rb @@ -9,7 +9,7 @@ class AdminTeams < Spinach::FeatureSteps end And 'Create gitlab user "John"' do - @user = create(:user, :name => "John") + @user = create(:user, name: "John") end And 'I click new team link' do @@ -50,8 +50,8 @@ class AdminTeams < Spinach::FeatureSteps When 'I select user "John" from user list as "Developer"' do @user ||= User.find_by_name("John") within "#team_members" do - select @user.name, :from => "user_ids" - select "Developer", :from => "default_project_access" + select "#{@user.name} (#{@user.email})", from: "user_ids" + select "Developer", from: "default_project_access" end end @@ -89,8 +89,8 @@ class AdminTeams < Spinach::FeatureSteps When 'I select project "Shop" with max access "Reporter"' do @project ||= Project.find_by_name("Shop") within "#assign_projects" do - select @project.name, :from => "project_ids" - select "Reporter", :from => "greatest_project_access" + select @project.name, from: "project_ids" + select "Reporter", from: "greatest_project_access" end end @@ -127,8 +127,8 @@ class AdminTeams < Spinach::FeatureSteps When 'I select user "Jimm" ub team members list as "Master"' do user = User.find_by_name("Jimm") within "#team_members" do - select user.name, :from => "user_ids" - select "Developer", :from => "default_project_access" + select "#{user.name} (#{user.email})", from: "user_ids" + select "Developer", from: "default_project_access" end end diff --git a/features/steps/project/project_browse_files.rb b/features/steps/project/project_browse_files.rb index 4efce0dc..71360fb6 100644 --- a/features/steps/project/project_browse_files.rb +++ b/features/steps/project/project_browse_files.rb @@ -16,12 +16,12 @@ class ProjectBrowseFiles < Spinach::FeatureSteps page.should have_content "Gemfile" end - Given 'I click on "Gemfile" file in repo' do - click_link "Gemfile" + Given 'I click on "Gemfile.lock" file in repo' do + click_link "Gemfile.lock" end Then 'I should see it content' do - page.should have_content "rubygems.org" + page.should have_content "DEPENDENCIES" end And 'I click link "raw"' do diff --git a/features/steps/project/project_browse_git_repo.rb b/features/steps/project/project_browse_git_repo.rb index 19edfb07..cd9a60f4 100644 --- a/features/steps/project/project_browse_git_repo.rb +++ b/features/steps/project/project_browse_git_repo.rb @@ -3,8 +3,8 @@ class ProjectBrowseGitRepo < Spinach::FeatureSteps include SharedProject include SharedPaths - Given 'I click on "Gemfile" file in repo' do - click_link "Gemfile" + Given 'I click on "Gemfile.lock" file in repo' do + click_link "Gemfile.lock" end And 'I click blame button' do @@ -12,7 +12,7 @@ class ProjectBrowseGitRepo < Spinach::FeatureSteps end Then 'I should see git file blame' do - page.should have_content "rubygems.org" + page.should have_content "DEPENDENCIES" page.should have_content "Dmitriy Zaporozhets" page.should have_content "Moving to rails 3.2" end diff --git a/features/steps/userteams/userteams.rb b/features/steps/userteams/userteams.rb index be83b4ba..1abb0f49 100644 --- a/features/steps/userteams/userteams.rb +++ b/features/steps/userteams/userteams.rb @@ -177,8 +177,8 @@ class Userteams < Spinach::FeatureSteps And 'I select user "John" from list with role "Reporter"' do user = User.find_by_name("John") within "#team_members" do - select user.name, :from => "user_ids" - select "Reporter", :from => "default_project_access" + select "#{user.name} (#{user.email})", from: "user_ids" + select "Reporter", from: "default_project_access" end click_button "Add" end @@ -213,8 +213,8 @@ class Userteams < Spinach::FeatureSteps When 'I submit form with selected project and max access' do within "#assign_projects" do - select @project.name_with_namespace, :from => "project_ids" - select "Reporter", :from => "greatest_project_access" + select @project.name_with_namespace, from: "project_ids" + select "Reporter", from: "greatest_project_access" end click_button "Add" end diff --git a/spec/support/stubbed_repository.rb b/spec/support/stubbed_repository.rb index 34798963..106cfa6d 100644 --- a/spec/support/stubbed_repository.rb +++ b/spec/support/stubbed_repository.rb @@ -34,7 +34,7 @@ class Project end class MergeRequest - def can_be_merged + def check_if_can_be_merged true end end