Fixed create new label form in issue form not working for sub-group projects
Closes #32906
This commit is contained in:
parent
7c7fe22c27
commit
ed6bf343c8
3 changed files with 36 additions and 1 deletions
|
@ -9,7 +9,7 @@
|
|||
- selected = local_assigns.fetch(:selected, nil)
|
||||
- selected_toggle = local_assigns.fetch(:selected_toggle, nil)
|
||||
- dropdown_title = local_assigns.fetch(:dropdown_title, "Filter by label")
|
||||
- dropdown_data = {toggle: 'dropdown', field_name: "label_name[]", show_no: "true", show_any: "true", namespace_path: @project.try(:namespace).try(:path), project_path: @project.try(:path), labels: labels_filter_path, default_label: "Labels"}
|
||||
- dropdown_data = {toggle: 'dropdown', field_name: "label_name[]", show_no: "true", show_any: "true", namespace_path: @project.try(:namespace).try(:full_path), project_path: @project.try(:path), labels: labels_filter_path, default_label: "Labels"}
|
||||
- dropdown_data.merge!(data_options)
|
||||
- classes << 'js-extra-options' if extra_options
|
||||
- classes << 'js-filter-submit' if filter_submit
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
---
|
||||
title: Fixed create new label form in issue form not working for sub-group projects
|
||||
merge_request:
|
||||
author:
|
|
@ -219,6 +219,37 @@ describe 'New/edit issue', :feature, :js do
|
|||
end
|
||||
end
|
||||
|
||||
describe 'sub-group project' do
|
||||
let(:group) { create(:group) }
|
||||
let(:nested_group_1) { create(:group, parent: group) }
|
||||
let(:sub_group_project) { create(:empty_project, group: nested_group_1) }
|
||||
|
||||
before do
|
||||
sub_group_project.add_master(user)
|
||||
|
||||
visit new_namespace_project_issue_path(sub_group_project.namespace, sub_group_project)
|
||||
end
|
||||
|
||||
it 'creates new label from dropdown' do
|
||||
click_button 'Labels'
|
||||
|
||||
click_link 'Create new label'
|
||||
|
||||
page.within '.dropdown-new-label' do
|
||||
fill_in 'new_label_name', with: 'test label'
|
||||
first('.suggest-colors-dropdown a').click
|
||||
|
||||
click_button 'Create'
|
||||
|
||||
wait_for_requests
|
||||
end
|
||||
|
||||
page.within '.dropdown-menu-labels' do
|
||||
expect(page).to have_link 'test label'
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
def before_for_selector(selector)
|
||||
js = <<-JS.strip_heredoc
|
||||
(function(selector) {
|
||||
|
|
Loading…
Reference in a new issue