Merge commit 'master' into discussions
Conflicts: app/assets/stylesheets/sections/notes.scss app/contexts/notes/load_context.rb app/models/project.rb app/observers/note_observer.rb app/roles/votes.rb app/views/commit/show.html.haml app/views/merge_requests/_show.html.haml app/views/merge_requests/diffs.js.haml app/views/merge_requests/show.js.haml app/views/notes/_note.html.haml features/steps/project/project_merge_requests.rb spec/models/note_spec.rb
This commit is contained in:
commit
3022786948
930 changed files with 80374 additions and 103682 deletions
12
features/steps/shared/admin.rb
Normal file
12
features/steps/shared/admin.rb
Normal file
|
@ -0,0 +1,12 @@
|
|||
module SharedAdmin
|
||||
include Spinach::DSL
|
||||
|
||||
And 'there are projects in system' do
|
||||
2.times { create(:project) }
|
||||
end
|
||||
|
||||
And 'system has users' do
|
||||
2.times { create(:user) }
|
||||
end
|
||||
end
|
||||
|
|
@ -21,6 +21,10 @@ module SharedPaths
|
|||
visit merge_requests_group_path(current_group)
|
||||
end
|
||||
|
||||
When 'I visit group people page' do
|
||||
visit people_group_path(current_group)
|
||||
end
|
||||
|
||||
# ----------------------------------------
|
||||
# Dashboard
|
||||
# ----------------------------------------
|
||||
|
@ -110,15 +114,15 @@ module SharedPaths
|
|||
end
|
||||
|
||||
Given "I visit my project's files page" do
|
||||
visit project_tree_path(@project, @project.root_ref)
|
||||
visit project_tree_path(@project, root_ref)
|
||||
end
|
||||
|
||||
Given "I visit my project's commits page" do
|
||||
visit project_commits_path(@project, @project.root_ref, {limit: 5})
|
||||
visit project_commits_path(@project, root_ref, {limit: 5})
|
||||
end
|
||||
|
||||
Given "I visit my project's commits page for a specific path" do
|
||||
visit project_commits_path(@project, @project.root_ref + "/app/models/project.rb", {limit: 5})
|
||||
visit project_commits_path(@project, root_ref + "/app/models/project.rb", {limit: 5})
|
||||
end
|
||||
|
||||
Given 'I visit my project\'s commits stats page' do
|
||||
|
@ -161,6 +165,11 @@ module SharedPaths
|
|||
visit project_path(project)
|
||||
end
|
||||
|
||||
When 'I visit edit project "Shop" page' do
|
||||
project = Project.find_by_name("Shop")
|
||||
visit edit_project_path(project)
|
||||
end
|
||||
|
||||
Given 'I visit project branches page' do
|
||||
visit branches_project_repository_path(@project)
|
||||
end
|
||||
|
@ -170,7 +179,7 @@ module SharedPaths
|
|||
end
|
||||
|
||||
Given 'I visit project commits page' do
|
||||
visit project_commits_path(@project, @project.root_ref, {limit: 5})
|
||||
visit project_commits_path(@project, root_ref, {limit: 5})
|
||||
end
|
||||
|
||||
Given 'I visit project commits page for stable branch' do
|
||||
|
@ -178,7 +187,7 @@ module SharedPaths
|
|||
end
|
||||
|
||||
Given 'I visit project source page' do
|
||||
visit project_tree_path(@project, @project.root_ref)
|
||||
visit project_tree_path(@project, root_ref)
|
||||
end
|
||||
|
||||
Given 'I visit blob file from repo' do
|
||||
|
@ -241,4 +250,8 @@ module SharedPaths
|
|||
Given 'I visit project wiki page' do
|
||||
visit project_wiki_path(@project, :index)
|
||||
end
|
||||
|
||||
def root_ref
|
||||
@project.repository.root_ref
|
||||
end
|
||||
end
|
||||
|
|
|
@ -4,13 +4,51 @@ module SharedProject
|
|||
# Create a project without caring about what it's called
|
||||
And "I own a project" do
|
||||
@project = create(:project)
|
||||
@project.add_access(@user, :admin)
|
||||
@project.team << [@user, :master]
|
||||
end
|
||||
|
||||
# Create a specific project called "Shop"
|
||||
And 'I own project "Shop"' do
|
||||
@project = create(:project, :name => "Shop")
|
||||
@project.add_access(@user, :admin)
|
||||
@project = create(:project, name: "Shop")
|
||||
@project.team << [@user, :master]
|
||||
end
|
||||
|
||||
And 'project "Shop" has push event' do
|
||||
@project = Project.find_by_name("Shop")
|
||||
|
||||
data = {
|
||||
before: "0000000000000000000000000000000000000000",
|
||||
after: "0220c11b9a3e6c69dc8fd35321254ca9a7b98f7e",
|
||||
ref: "refs/heads/new_design",
|
||||
user_id: @user.id,
|
||||
user_name: @user.name,
|
||||
repository: {
|
||||
name: @project.name,
|
||||
url: "localhost/rubinius",
|
||||
description: "",
|
||||
homepage: "localhost/rubinius",
|
||||
private: true
|
||||
}
|
||||
}
|
||||
|
||||
@event = Event.create(
|
||||
project: @project,
|
||||
action: Event::Pushed,
|
||||
data: data,
|
||||
author_id: @user.id
|
||||
)
|
||||
end
|
||||
|
||||
Then 'I should see project "Shop" activity feed' do
|
||||
project = Project.find_by_name("Shop")
|
||||
page.should have_content "#{@user.name} pushed new branch new_design at #{project.name}"
|
||||
end
|
||||
|
||||
Then 'I should see project settings' do
|
||||
current_path.should == edit_project_path(@project)
|
||||
page.should have_content("Project name is")
|
||||
page.should have_content("Advanced settings:")
|
||||
page.should have_content("Features:")
|
||||
end
|
||||
|
||||
def current_project
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue