Fix pipelines spec

This commit is contained in:
Annabel Dunstone Gray 2016-11-15 15:52:45 -06:00
parent 5ac2c5839a
commit 4ce2ca4d36
3 changed files with 6 additions and 8 deletions

View file

@ -1,9 +1,9 @@
.tabs-holder
%ul.nav-links.no-top.no-bottom
%li.active
= link_to "Pipeline", "#js-tab-pipeline", data: { target: '#js-tab-pipeline', action: 'pipeline', toggle: 'tab' }
= link_to "Pipeline", "#js-tab-pipeline", data: { target: '#js-tab-pipeline', action: 'pipeline', toggle: 'tab' }, class: 'pipeline-tab'
%li
= link_to "#js-tab-builds", data: { target: '#js-tab-builds', action: 'build', toggle: 'tab' } do
= link_to "#js-tab-builds", data: { target: '#js-tab-builds', action: 'build', toggle: 'tab' }, class: 'builds-tab' do
Builds
%span.badge= pipeline.statuses.count

View file

@ -64,7 +64,7 @@ describe 'Cherry-pick Commits' do
context "I cherry-pick a commit from a different branch", js: true do
it do
find('.commit-action-buttons a.dropdown-toggle').click
find('.header-action-buttons a.dropdown-toggle').click
find(:css, "a[href='#modal-cherry-pick-commit']").click
page.within('#modal-cherry-pick-commit') do

View file

@ -146,7 +146,8 @@ describe "Pipelines" do
end
describe 'GET /:project/pipelines/:id' do
let(:pipeline) { create(:ci_pipeline, project: project, ref: 'master') }
let(:project) { create(:project) }
let(:pipeline) { create(:ci_pipeline, project: project, ref: 'master', sha: project.commit.id) }
before do
@success = create(:ci_build, :success, pipeline: pipeline, stage: 'build', name: 'build')
@ -156,10 +157,7 @@ describe "Pipelines" do
@external = create(:generic_commit_status, status: 'success', pipeline: pipeline, name: 'jenkins', stage: 'external')
end
before do
visit namespace_project_pipeline_path(project.namespace, project, pipeline)
find('.builds-tab').click
end
before { visit namespace_project_pipeline_path(project.namespace, project, pipeline) }
it 'shows a list of builds' do
expect(page).to have_content('Test')