Commit 4ab1a1bd authored by Filipa Lacerda's avatar Filipa Lacerda

Merge branch 'fix_invalid_new_pipeline_form' into 'master'

initializes the branches dropdown upon invalid entry

Closes #40012

See merge request gitlab-org/gitlab-ce!15588
parents e2babfbd 4fae2574
...@@ -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