Commit a0ce7cf3 authored by Jacob Schatz's avatar Jacob Schatz Committed by Robert Speicher

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
parent a23e108e
...@@ -30,6 +30,7 @@ v 8.9.1 (unreleased) ...@@ -30,6 +30,7 @@ v 8.9.1 (unreleased)
- Fix merge requests project settings help link anchor. !4873 - Fix merge requests project settings help link anchor. !4873
- Fix 404 when accessing pipelines as guest user on public projects. !4881 - Fix 404 when accessing pipelines as guest user on public projects. !4881
- Bump gitlab_git to 10.2.3 to fix false truncated warnings with ISO-8559 files. !4884 - Bump gitlab_git to 10.2.3 to fix false truncated warnings with ISO-8559 files. !4884
- Apply selected value as label. !4886
v 8.9.0 v 8.9.0
- Fix builds API response not including commit data - Fix builds API response not including commit data
......
...@@ -19,6 +19,7 @@ class @TemplateSelector ...@@ -19,6 +19,7 @@ class @TemplateSelector
data: @data, data: @data,
filterable: true, filterable: true,
selectable: true, selectable: true,
toggleLabel: @toggleLabel,
search: search:
fields: ['name'] fields: ['name']
clicked: @onClick clicked: @onClick
...@@ -31,6 +32,9 @@ class @TemplateSelector ...@@ -31,6 +32,9 @@ class @TemplateSelector
@onFilenameUpdate() @onFilenameUpdate()
) )
toggleLabel: (item) ->
item.name
onFilenameUpdate: -> onFilenameUpdate: ->
return unless @$input.length return unless @$input.length
......
...@@ -24,6 +24,7 @@ feature 'User wants to add a .gitignore file', feature: true do ...@@ -24,6 +24,7 @@ feature 'User wants to add a .gitignore file', feature: true do
end end
wait_for_ajax 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('/.bundle')
expect(page).to have_content('# Gemfile.lock, .ruby-version, .ruby-gemset') expect(page).to have_content('# Gemfile.lock, .ruby-version, .ruby-gemset')
end end
......
...@@ -24,6 +24,7 @@ feature 'User wants to add a .gitlab-ci.yml file', feature: true do ...@@ -24,6 +24,7 @@ feature 'User wants to add a .gitlab-ci.yml file', feature: true do
end end
wait_for_ajax 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('This file is a template, and might need editing before it works on your project')
expect(page).to have_content('jekyll build -d test') expect(page).to have_content('jekyll build -d test')
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