diff options
-rw-r--r-- | app/views/projects/commit/_pipeline.html.haml | 4 | ||||
-rw-r--r-- | features/project/commits/commits.feature | 2 | ||||
-rw-r--r-- | features/steps/project/commits/commits.rb | 7 | ||||
-rw-r--r-- | spec/features/merge_requests/created_from_fork_spec.rb | 8 | ||||
-rw-r--r-- | spec/features/projects/commit/pipelines_spec.rb (renamed from spec/features/projects/commit/builds_spec.rb) | 8 | ||||
-rw-r--r-- | spec/features/projects/commits/cherry_pick_spec.rb | 2 | ||||
-rw-r--r-- | spec/features/projects/pipelines_spec.rb | 5 |
7 files changed, 19 insertions, 17 deletions
diff --git a/app/views/projects/commit/_pipeline.html.haml b/app/views/projects/commit/_pipeline.html.haml index 4d809ca54a3..718314701f9 100644 --- a/app/views/projects/commit/_pipeline.html.haml +++ b/app/views/projects/commit/_pipeline.html.haml @@ -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 diff --git a/features/project/commits/commits.feature b/features/project/commits/commits.feature index 1776c07e60e..b528b7f6aef 100644 --- a/features/project/commits/commits.feature +++ b/features/project/commits/commits.feature @@ -48,7 +48,7 @@ Feature: Project Commits When I click on commit link Then I see commit ci info And I click status link - Then I see builds list + Then I see the pipeline for commit Scenario: I browse commit with side-by-side diff view Given I click on commit link diff --git a/features/steps/project/commits/commits.rb b/features/steps/project/commits/commits.rb index 007dfb67a77..b399c826caa 100644 --- a/features/steps/project/commits/commits.rb +++ b/features/steps/project/commits/commits.rb @@ -167,12 +167,11 @@ class Spinach::Features::ProjectCommits < Spinach::FeatureSteps end step 'I click status link' do - find('.commit-ci-menu').click_link "Builds" + find('.commit-ci-menu').click_link "Pipelines" end - step 'I see builds list' do - expect(page).to have_content "Pipeline #1 for 570e7b2a pending" - expect(page).to have_content "1 build" + step 'I see the pipeline for commit' do + expect(page).to have_content "#1 by API" end step 'I search "submodules" commits' do diff --git a/spec/features/merge_requests/created_from_fork_spec.rb b/spec/features/merge_requests/created_from_fork_spec.rb index 142649297cc..5c49fead958 100644 --- a/spec/features/merge_requests/created_from_fork_spec.rb +++ b/spec/features/merge_requests/created_from_fork_spec.rb @@ -54,14 +54,14 @@ feature 'Merge request created from fork' do scenario 'user visits a pipelines page', js: true do visit_merge_request(merge_request) - page.within('.merge-request-tabs') { click_link 'Builds' } + page.within('.merge-request-tabs') { click_link 'Pipelines' } page.within('table.ci-table') do - expect(page).to have_content 'rspec' - expect(page).to have_content 'spinach' + expect(page).to have_content '#1 by API' + expect(page).to have_content 'latest' end - expect(find_link('Cancel running')[:href]) + expect(find_link('Cancel')[:href]) .to include fork_project.path_with_namespace end end diff --git a/spec/features/projects/commit/builds_spec.rb b/spec/features/projects/commit/pipelines_spec.rb index fcdf7870f34..3ab74d69f08 100644 --- a/spec/features/projects/commit/builds_spec.rb +++ b/spec/features/projects/commit/pipelines_spec.rb @@ -1,6 +1,6 @@ require 'spec_helper' -feature 'project commit builds' do +feature 'project commit pipelines' do given(:project) { create(:project) } background do @@ -16,11 +16,11 @@ feature 'project commit builds' do ref: 'master') end - scenario 'user views commit builds page' do - visit builds_namespace_project_commit_path(project.namespace, + 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') + expect(page).to have_content('Pipelines') end end end diff --git a/spec/features/projects/commits/cherry_pick_spec.rb b/spec/features/projects/commits/cherry_pick_spec.rb index e45e3a36d01..d46d9e9399e 100644 --- a/spec/features/projects/commits/cherry_pick_spec.rb +++ b/spec/features/projects/commits/cherry_pick_spec.rb @@ -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 diff --git a/spec/features/projects/pipelines_spec.rb b/spec/features/projects/pipelines_spec.rb index db56a50e058..77184ede784 100644 --- a/spec/features/projects/pipelines_spec.rb +++ b/spec/features/projects/pipelines_spec.rb @@ -156,7 +156,10 @@ describe "Pipelines" do @external = create(:generic_commit_status, status: 'success', pipeline: pipeline, name: 'jenkins', stage: 'external') end - before { visit namespace_project_pipeline_path(project.namespace, project, pipeline) } + before do + visit namespace_project_pipeline_path(project.namespace, project, pipeline) + find('.builds-tab').click + end it 'shows a list of builds' do expect(page).to have_content('Test') |