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
|
@ -3,13 +3,13 @@ class CreateProject < Spinach::FeatureSteps
|
|||
include SharedPaths
|
||||
|
||||
And 'fill project form with valid data' do
|
||||
fill_in 'project_name', :with => 'NewProject'
|
||||
fill_in 'project_name', with: 'Empty'
|
||||
click_button "Create project"
|
||||
end
|
||||
|
||||
Then 'I should see project page' do
|
||||
current_path.should == project_path(Project.last)
|
||||
page.should have_content "NewProject"
|
||||
page.should have_content "Empty"
|
||||
end
|
||||
|
||||
And 'I should see empty project instuctions' do
|
||||
|
|
|
@ -2,4 +2,17 @@ class Projects < Spinach::FeatureSteps
|
|||
include SharedAuthentication
|
||||
include SharedProject
|
||||
include SharedPaths
|
||||
|
||||
And 'change project settings' do
|
||||
fill_in 'project_name', with: 'NewName'
|
||||
uncheck 'project_issues_enabled'
|
||||
end
|
||||
|
||||
And 'I save project' do
|
||||
click_button 'Save'
|
||||
end
|
||||
|
||||
Then 'I should see project with new settings' do
|
||||
find_field('project_name').value.should == 'NewName'
|
||||
end
|
||||
end
|
||||
|
|
|
@ -4,7 +4,7 @@ class ProjectBrowseCommits < Spinach::FeatureSteps
|
|||
include SharedPaths
|
||||
|
||||
Then 'I see project commits' do
|
||||
commit = @project.commit
|
||||
commit = @project.repository.commit
|
||||
page.should have_content(@project.name)
|
||||
page.should have_content(commit.message)
|
||||
page.should have_content(commit.id.to_s[0..5])
|
||||
|
@ -15,7 +15,7 @@ class ProjectBrowseCommits < Spinach::FeatureSteps
|
|||
end
|
||||
|
||||
Then 'I see commits atom feed' do
|
||||
commit = CommitDecorator.decorate(@project.commit)
|
||||
commit = CommitDecorator.decorate(@project.repository.commit)
|
||||
page.response_headers['Content-Type'].should have_content("application/atom+xml")
|
||||
page.body.should have_selector("title", :text => "Recent commits to #{@project.name}")
|
||||
page.body.should have_selector("author email", :text => commit.author_email)
|
||||
|
@ -48,7 +48,7 @@ class ProjectBrowseCommits < Spinach::FeatureSteps
|
|||
page.should have_selector('ul.breadcrumb span.divider', count: 3)
|
||||
page.should have_selector('ul.breadcrumb a', count: 4)
|
||||
|
||||
find('ul.breadcrumb li:first a')['href'].should match(/#{@project.path}\/commits\/master\z/)
|
||||
find('ul.breadcrumb li:first a')['href'].should match(/#{@project.path_with_namespace}\/commits\/master\z/)
|
||||
find('ul.breadcrumb li:last a')['href'].should match(%r{master/app/models/project\.rb\z})
|
||||
end
|
||||
|
||||
|
|
|
@ -56,10 +56,10 @@ class ProjectMergeRequests < Spinach::FeatureSteps
|
|||
end
|
||||
|
||||
And 'I submit new merge request "Wiki Feature"' do
|
||||
fill_in "merge_request_title", with: "Wiki Feature"
|
||||
select "master", from: "merge_request_source_branch"
|
||||
select "stable", from: "merge_request_target_branch"
|
||||
click_button "Save"
|
||||
fill_in "merge_request_title", :with => "Wiki Feature"
|
||||
select "master", :from => "merge_request_source_branch"
|
||||
select "stable", :from => "merge_request_target_branch"
|
||||
click_button "Submit merge request"
|
||||
end
|
||||
|
||||
And 'project "Shop" have "Bug NS-04" open merge request' do
|
||||
|
|
|
@ -50,12 +50,12 @@ class ProjectMilestones < Spinach::FeatureSteps
|
|||
end
|
||||
|
||||
Then "I should see 3 issues" do
|
||||
page.should have_selector('.milestone-issue-filter tbody tr', count: 4)
|
||||
page.should have_selector('.milestone-issue-filter tbody tr.hide', count: 1)
|
||||
page.should have_selector('.milestone-issue-filter .well-list li', count: 4)
|
||||
page.should have_selector('.milestone-issue-filter .well-list li.hide', count: 1)
|
||||
end
|
||||
|
||||
Then "I should see 4 issues" do
|
||||
page.should have_selector('.milestone-issue-filter tbody tr', count: 4)
|
||||
page.should_not have_selector('.milestone-issue-filter tbody tr.hide')
|
||||
page.should have_selector('.milestone-issue-filter .well-list li', count: 4)
|
||||
page.should_not have_selector('.milestone-issue-filter .well-list li.hide')
|
||||
end
|
||||
end
|
||||
|
|
|
@ -6,7 +6,6 @@ class ProjectNetworkGraph < Spinach::FeatureSteps
|
|||
page.should have_content "Project Network Graph"
|
||||
within ".graph" do
|
||||
page.should have_content "master"
|
||||
page.should have_content "scss_refactor..."
|
||||
end
|
||||
end
|
||||
|
||||
|
|
30
features/steps/project/project_services.rb
Normal file
30
features/steps/project/project_services.rb
Normal file
|
@ -0,0 +1,30 @@
|
|||
class ProjectServices < Spinach::FeatureSteps
|
||||
include SharedAuthentication
|
||||
include SharedProject
|
||||
include SharedPaths
|
||||
|
||||
When 'I visit project "Shop" services page' do
|
||||
visit project_services_path(@project)
|
||||
end
|
||||
|
||||
Then 'I should see list of available services' do
|
||||
page.should have_content 'Services'
|
||||
page.should have_content 'Jenkins'
|
||||
page.should have_content 'GitLab CI'
|
||||
end
|
||||
|
||||
And 'I click gitlab-ci service link' do
|
||||
click_link 'GitLab CI'
|
||||
end
|
||||
|
||||
And 'I fill gitlab-ci settings' do
|
||||
check 'Active'
|
||||
fill_in 'Project URL', with: 'http://ci.gitlab.org/projects/3'
|
||||
fill_in 'CI Project token', with: 'verySecret'
|
||||
click_button 'Save'
|
||||
end
|
||||
|
||||
Then 'I should see service settings saved' do
|
||||
find_field('Project URL').value.should == 'http://ci.gitlab.org/projects/3'
|
||||
end
|
||||
end
|
|
@ -84,18 +84,18 @@ class ProjectTeamManagement < Spinach::FeatureSteps
|
|||
And '"Sam" is "Shop" developer' do
|
||||
user = User.find_by_name("Sam")
|
||||
project = Project.find_by_name("Shop")
|
||||
project.add_access(user, :write)
|
||||
project.team << [user, :developer]
|
||||
end
|
||||
|
||||
Given 'I own project "Website"' do
|
||||
@project = create(:project, :name => "Website")
|
||||
@project.add_access(@user, :admin)
|
||||
@project.team << [@user, :master]
|
||||
end
|
||||
|
||||
And '"Mike" is "Website" reporter' do
|
||||
user = User.find_by_name("Mike")
|
||||
project = Project.find_by_name("Website")
|
||||
project.add_access(user, :read)
|
||||
project.team << [user, :reporter]
|
||||
end
|
||||
|
||||
And 'I click link "Import team from another project"' do
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue