Commit 4fae2574 authored by Christiaan Van den Poel's avatar Christiaan Van den Poel Committed by Christiaan Van den Poel

initializes the branches dropdown upon invalid entry

Added Changelog
added feature spec
parent a7f6ab95
...@@ -383,6 +383,7 @@ import ProjectVariables from './project_variables'; ...@@ -383,6 +383,7 @@ import ProjectVariables from './project_variables';
projectImport(); projectImport();
break; break;
case 'projects:pipelines:new': case 'projects:pipelines:new':
case 'projects:pipelines:create':
new NewBranchForm($('.js-new-pipeline-form')); new NewBranchForm($('.js-new-pipeline-form'));
break; break;
case 'projects:pipelines:builds': case 'projects:pipelines:builds':
......
---
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
...@@ -500,6 +500,18 @@ describe 'Pipelines', :js do ...@@ -500,6 +500,18 @@ describe 'Pipelines', :js do
end end
it { expect(page).to have_content('Missing .gitlab-ci.yml file') } 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 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