BigW Consortium Gitlab

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