Merge branch '19008_ci_dropdown_label_fix' into 'master'
Apply selected value as label ## What does this MR do? ## Are there points in the code the reviewer needs to double check? ## Why was this MR needed? ## What are the relevant issue numbers? ## Screenshots (if relevant) ![dropdown-label](/uploads/db2ea7cb3cc51fbdeea53c304f1bd7a5/dropdown-label.gif) ## Does this MR meet the acceptance criteria? - [ ] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry added - [ ] [Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md) - [ ] API support added - Tests - [x] Added for this feature/bug - [x] All builds are passing - [x] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides) - [x] Branch has no merge conflicts with `master` (if you do - rebase it please) - [x] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits) See merge request !4886
This commit is contained in:
commit
c390555f2f
|
@ -19,6 +19,7 @@ class @TemplateSelector
|
|||
data: @data,
|
||||
filterable: true,
|
||||
selectable: true,
|
||||
toggleLabel: @toggleLabel,
|
||||
search:
|
||||
fields: ['name']
|
||||
clicked: @onClick
|
||||
|
@ -31,6 +32,9 @@ class @TemplateSelector
|
|||
@onFilenameUpdate()
|
||||
)
|
||||
|
||||
toggleLabel: (item) ->
|
||||
item.name
|
||||
|
||||
onFilenameUpdate: ->
|
||||
return unless @$input.length
|
||||
|
||||
|
|
|
@ -24,6 +24,7 @@ feature 'User wants to add a .gitignore file', feature: true do
|
|||
end
|
||||
wait_for_ajax
|
||||
|
||||
expect(page).to have_css('.gitignore-selector .dropdown-toggle-text', text: 'Rails')
|
||||
expect(page).to have_content('/.bundle')
|
||||
expect(page).to have_content('# Gemfile.lock, .ruby-version, .ruby-gemset')
|
||||
end
|
||||
|
|
|
@ -24,6 +24,7 @@ feature 'User wants to add a .gitlab-ci.yml file', feature: true do
|
|||
end
|
||||
wait_for_ajax
|
||||
|
||||
expect(page).to have_css('.gitlab-ci-yml-selector .dropdown-toggle-text', text: 'jekyll')
|
||||
expect(page).to have_content('This file is a template, and might need editing before it works on your project')
|
||||
expect(page).to have_content('jekyll build -d test')
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue