Commit 37187336 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Team features are green now

parent 28da2a8b
...@@ -12,7 +12,7 @@ Feature: Project Browse files ...@@ -12,7 +12,7 @@ Feature: Project Browse files
Then I should see files from repository for "8470d70" Then I should see files from repository for "8470d70"
Scenario: I browse file content 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 Then I should see it content
Scenario: I browse raw file Scenario: I browse raw file
...@@ -22,6 +22,6 @@ Feature: Project Browse files ...@@ -22,6 +22,6 @@ Feature: Project Browse files
@javascript @javascript
Scenario: I can edit file 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" And I click button "edit"
Then I can edit code Then I can edit code
...@@ -5,6 +5,6 @@ Feature: Project Browse git repo ...@@ -5,6 +5,6 @@ Feature: Project Browse git repo
Given I visit project source page Given I visit project source page
Scenario: I blame file 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 And I click blame button
Then I should see git file blame Then I should see git file blame
...@@ -9,7 +9,7 @@ class AdminTeams < Spinach::FeatureSteps ...@@ -9,7 +9,7 @@ class AdminTeams < Spinach::FeatureSteps
end end
And 'Create gitlab user "John"' do And 'Create gitlab user "John"' do
@user = create(:user, :name => "John") @user = create(:user, name: "John")
end end
And 'I click new team link' do And 'I click new team link' do
...@@ -50,8 +50,8 @@ class AdminTeams < Spinach::FeatureSteps ...@@ -50,8 +50,8 @@ class AdminTeams < Spinach::FeatureSteps
When 'I select user "John" from user list as "Developer"' do When 'I select user "John" from user list as "Developer"' do
@user ||= User.find_by_name("John") @user ||= User.find_by_name("John")
within "#team_members" do within "#team_members" do
select @user.name, :from => "user_ids" select "#{@user.name} (#{@user.email})", from: "user_ids"
select "Developer", :from => "default_project_access" select "Developer", from: "default_project_access"
end end
end end
...@@ -89,8 +89,8 @@ class AdminTeams < Spinach::FeatureSteps ...@@ -89,8 +89,8 @@ class AdminTeams < Spinach::FeatureSteps
When 'I select project "Shop" with max access "Reporter"' do When 'I select project "Shop" with max access "Reporter"' do
@project ||= Project.find_by_name("Shop") @project ||= Project.find_by_name("Shop")
within "#assign_projects" do within "#assign_projects" do
select @project.name, :from => "project_ids" select @project.name, from: "project_ids"
select "Reporter", :from => "greatest_project_access" select "Reporter", from: "greatest_project_access"
end end
end end
...@@ -127,8 +127,8 @@ class AdminTeams < Spinach::FeatureSteps ...@@ -127,8 +127,8 @@ class AdminTeams < Spinach::FeatureSteps
When 'I select user "Jimm" ub team members list as "Master"' do When 'I select user "Jimm" ub team members list as "Master"' do
user = User.find_by_name("Jimm") user = User.find_by_name("Jimm")
within "#team_members" do within "#team_members" do
select user.name, :from => "user_ids" select "#{user.name} (#{user.email})", from: "user_ids"
select "Developer", :from => "default_project_access" select "Developer", from: "default_project_access"
end end
end end
......
...@@ -16,12 +16,12 @@ class ProjectBrowseFiles < Spinach::FeatureSteps ...@@ -16,12 +16,12 @@ class ProjectBrowseFiles < Spinach::FeatureSteps
page.should have_content "Gemfile" page.should have_content "Gemfile"
end end
Given 'I click on "Gemfile" file in repo' do Given 'I click on "Gemfile.lock" file in repo' do
click_link "Gemfile" click_link "Gemfile.lock"
end end
Then 'I should see it content' do Then 'I should see it content' do
page.should have_content "rubygems.org" page.should have_content "DEPENDENCIES"
end end
And 'I click link "raw"' do And 'I click link "raw"' do
......
...@@ -3,8 +3,8 @@ class ProjectBrowseGitRepo < Spinach::FeatureSteps ...@@ -3,8 +3,8 @@ class ProjectBrowseGitRepo < Spinach::FeatureSteps
include SharedProject include SharedProject
include SharedPaths include SharedPaths
Given 'I click on "Gemfile" file in repo' do Given 'I click on "Gemfile.lock" file in repo' do
click_link "Gemfile" click_link "Gemfile.lock"
end end
And 'I click blame button' do And 'I click blame button' do
...@@ -12,7 +12,7 @@ class ProjectBrowseGitRepo < Spinach::FeatureSteps ...@@ -12,7 +12,7 @@ class ProjectBrowseGitRepo < Spinach::FeatureSteps
end end
Then 'I should see git file blame' do 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 "Dmitriy Zaporozhets"
page.should have_content "Moving to rails 3.2" page.should have_content "Moving to rails 3.2"
end end
......
...@@ -177,8 +177,8 @@ class Userteams < Spinach::FeatureSteps ...@@ -177,8 +177,8 @@ class Userteams < Spinach::FeatureSteps
And 'I select user "John" from list with role "Reporter"' do And 'I select user "John" from list with role "Reporter"' do
user = User.find_by_name("John") user = User.find_by_name("John")
within "#team_members" do within "#team_members" do
select user.name, :from => "user_ids" select "#{user.name} (#{user.email})", from: "user_ids"
select "Reporter", :from => "default_project_access" select "Reporter", from: "default_project_access"
end end
click_button "Add" click_button "Add"
end end
...@@ -213,8 +213,8 @@ class Userteams < Spinach::FeatureSteps ...@@ -213,8 +213,8 @@ class Userteams < Spinach::FeatureSteps
When 'I submit form with selected project and max access' do When 'I submit form with selected project and max access' do
within "#assign_projects" do within "#assign_projects" do
select @project.name_with_namespace, :from => "project_ids" select @project.name_with_namespace, from: "project_ids"
select "Reporter", :from => "greatest_project_access" select "Reporter", from: "greatest_project_access"
end end
click_button "Add" click_button "Add"
end end
......
...@@ -34,7 +34,7 @@ class Project ...@@ -34,7 +34,7 @@ class Project
end end
class MergeRequest class MergeRequest
def can_be_merged def check_if_can_be_merged
true true
end end
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment