initializes the branches dropdown upon invalid entry

Added Changelog
added feature spec
This commit is contained in:
Christiaan Van den Poel 2017-11-23 17:34:52 +01:00 committed by Christiaan Van den Poel
parent a7f6ab952a
commit 4fae2574c4
3 changed files with 18 additions and 0 deletions

View File

@ -383,6 +383,7 @@ import ProjectVariables from './project_variables';
projectImport();
break;
case 'projects:pipelines:new':
case 'projects:pipelines:create':
new NewBranchForm($('.js-new-pipeline-form'));
break;
case 'projects:pipelines:builds':

View File

@ -0,0 +1,5 @@
---
title: Initializes the branches dropdown when the 'Start new pipeline' failed due to validation errors
merge_request: 15588
author: Christiaan Van den Poel
type: fixed

View File

@ -500,6 +500,18 @@ describe 'Pipelines', :js do
end
it { expect(page).to have_content('Missing .gitlab-ci.yml file') }
it 'creates a pipeline after first request failed and a valid gitlab-ci.yml file is available when trying again' do
click_button project.default_branch
stub_ci_pipeline_to_return_yaml_file
page.within '.dropdown-menu' do
click_link 'master'
end
expect { click_on 'Create pipeline' }
.to change { Ci::Pipeline.count }.by(1)
end
end
end
end