Commit 7086dac4 authored by Filipa Lacerda's avatar Filipa Lacerda

Changes after review

Fix broken test

Remove spinach tests for the builds tab
parent 9a82aa70
...@@ -8,6 +8,7 @@ class Projects::CommitController < Projects::ApplicationController ...@@ -8,6 +8,7 @@ class Projects::CommitController < Projects::ApplicationController
# Authorize # Authorize
before_action :require_non_empty_project before_action :require_non_empty_project
before_action :authorize_download_code!
before_action :authorize_read_pipeline!, only: [:pipelines] before_action :authorize_read_pipeline!, only: [:pipelines]
before_action :commit before_action :commit
before_action :define_commit_vars, only: [:show, :diff_for_path, :pipelines] before_action :define_commit_vars, only: [:show, :diff_for_path, :pipelines]
...@@ -107,7 +108,6 @@ class Projects::CommitController < Projects::ApplicationController ...@@ -107,7 +108,6 @@ class Projects::CommitController < Projects::ApplicationController
def define_status_vars def define_status_vars
@ci_pipelines = project.pipelines.where(sha: commit.sha) @ci_pipelines = project.pipelines.where(sha: commit.sha)
@statuses = CommitStatus.where(pipeline: @ci_pipelines).relevant
end end
def assign_change_commit_vars(mr_source_branch) def assign_change_commit_vars(mr_source_branch)
......
module CiStatusHelper module CiStatusHelper
def ci_status_path(pipeline) def ci_status_path(pipeline)
project = pipeline.project project = pipeline.project
# builds_namespace_project_commit_path(project.namespace, project, pipeline.sha) namespace_project_pipeline_path(project.namespace, project, pipeline)
end end
# Is used by Commit and Merge Request Widget # Is used by Commit and Merge Request Widget
......
...@@ -33,8 +33,6 @@ constraints(ProjectUrlConstrainer.new) do ...@@ -33,8 +33,6 @@ constraints(ProjectUrlConstrainer.new) do
member do member do
get :branches get :branches
get :pipelines get :pipelines
post :cancel_builds
post :retry_builds
post :revert post :revert
post :cherry_pick post :cherry_pick
get :diff_for_path get :diff_for_path
......
...@@ -47,8 +47,6 @@ Feature: Project Commits ...@@ -47,8 +47,6 @@ Feature: Project Commits
And repository contains ".gitlab-ci.yml" file And repository contains ".gitlab-ci.yml" file
When I click on commit link When I click on commit link
Then I see commit ci info Then I see commit ci info
And I click status link
Then I see builds list
Scenario: I browse commit with side-by-side diff view Scenario: I browse commit with side-by-side diff view
Given I click on commit link Given I click on commit link
......
...@@ -166,15 +166,6 @@ class Spinach::Features::ProjectCommits < Spinach::FeatureSteps ...@@ -166,15 +166,6 @@ class Spinach::Features::ProjectCommits < Spinach::FeatureSteps
expect(page).to have_content "Pipeline #1 for 570e7b2a pending" expect(page).to have_content "Pipeline #1 for 570e7b2a pending"
end end
step 'I click status link' do
find('.commit-ci-menu').click_link "Builds"
end
step 'I see builds list' do
expect(page).to have_content "Pipeline #1 for 570e7b2a pending"
expect(page).to have_content "1 build"
end
step 'I search "submodules" commits' do step 'I search "submodules" commits' do
fill_in 'commits-search', with: 'submodules' fill_in 'commits-search', with: 'submodules'
end end
......
require 'spec_helper' require 'spec_helper'
feature 'project commit builds' do feature 'project commit pipelines' do
given(:project) { create(:project) } given(:project) { create(:project) }
background do background do
...@@ -16,11 +16,13 @@ feature 'project commit builds' do ...@@ -16,11 +16,13 @@ feature 'project commit builds' do
ref: 'master') ref: 'master')
end end
scenario 'user views commit builds page' do scenario 'user views commit pipelines page' do
visit builds_namespace_project_commit_path(project.namespace, visit pipelines_namespace_project_commit_path(project.namespace, project, project.commit.sha)
project, project.commit.sha)
expect(page).to have_content('Builds') page.within('.table-holder') do
expect(page).to have_content project.pipelines[0].status # pipeline status
expect(page).to have_content project.pipelines[0].id # pipeline ids
end
end end
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