Commit fb506a12 authored by Jackie Fraser's avatar Jackie Fraser

Show selected template type when clicked

parent e37b141d
...@@ -117,11 +117,7 @@ export default class FileTemplateMediator { ...@@ -117,11 +117,7 @@ export default class FileTemplateMediator {
selector.hide(); selector.hide();
} }
}); });
this.setTypeSelectorToggleText(item.name);
if (this.editor.getValue() !== '') {
this.setTypeSelectorToggleText(item.name);
}
this.cacheToggleText(); this.cacheToggleText();
} }
......
---
title: Show selected template type when clicked
merge_request: 24596
author:
type: fixed
...@@ -75,6 +75,11 @@ describe 'Projects > Files > Template type dropdown selector', :js do ...@@ -75,6 +75,11 @@ describe 'Projects > Files > Template type dropdown selector', :js do
check_type_selector_toggle_text('.gitignore') check_type_selector_toggle_text('.gitignore')
end end
it 'sets the toggle text when selecting the template type' do
select_template_type('.gitignore')
check_type_selector_toggle_text('.gitignore')
end
it 'selects every template type correctly' do it 'selects every template type correctly' do
try_selecting_all_types try_selecting_all_types
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