Fixed create label form not working on issue boards in a sub-group project
Closes #31862
This commit is contained in:
parent
59c9ec5ce6
commit
95ddedca78
3 changed files with 50 additions and 1 deletions
|
@ -19,7 +19,7 @@
|
||||||
":value" => "label.id" }
|
":value" => "label.id" }
|
||||||
.dropdown
|
.dropdown
|
||||||
%button.dropdown-menu-toggle.js-label-select.js-multiselect.js-issue-board-sidebar{ type: "button",
|
%button.dropdown-menu-toggle.js-label-select.js-multiselect.js-issue-board-sidebar{ type: "button",
|
||||||
data: { toggle: "dropdown", field_name: "issue[label_names][]", show_no: "true", show_any: "true", project_id: @project.id, labels: namespace_project_labels_path(@project.namespace, @project, :json), namespace_path: @project.try(:namespace).try(:path), project_path: @project.try(:path) },
|
data: { toggle: "dropdown", field_name: "issue[label_names][]", show_no: "true", show_any: "true", project_id: @project.id, labels: namespace_project_labels_path(@project.namespace, @project, :json), namespace_path: @project.try(:namespace).try(:full_path), project_path: @project.try(:path) },
|
||||||
":data-issue-update" => "'#{namespace_project_issues_path(@project.namespace, @project)}/' + issue.id + '.json'" }
|
":data-issue-update" => "'#{namespace_project_issues_path(@project.namespace, @project)}/' + issue.id + '.json'" }
|
||||||
%span.dropdown-toggle-text
|
%span.dropdown-toggle-text
|
||||||
Label
|
Label
|
||||||
|
|
|
@ -0,0 +1,4 @@
|
||||||
|
---
|
||||||
|
title: Fixed create new label form in issue boards sidebar
|
||||||
|
merge_request:
|
||||||
|
author:
|
45
spec/features/boards/sub_group_project_spec.rb
Normal file
45
spec/features/boards/sub_group_project_spec.rb
Normal file
|
@ -0,0 +1,45 @@
|
||||||
|
require 'rails_helper'
|
||||||
|
|
||||||
|
describe 'Sub-group project issue boards', :feature, :js do
|
||||||
|
include WaitForVueResource
|
||||||
|
|
||||||
|
let(:group) { create(:group) }
|
||||||
|
let(:nested_group_1) { create(:group, parent: group) }
|
||||||
|
let(:project) { create(:empty_project, group: nested_group_1) }
|
||||||
|
let(:board) { create(:board, project: project) }
|
||||||
|
let(:label) { create(:label, project: project) }
|
||||||
|
let(:user) { create(:user) }
|
||||||
|
let!(:list1) { create(:list, board: board, label: label, position: 0) }
|
||||||
|
let!(:issue) { create(:labeled_issue, project: project, labels: [label]) }
|
||||||
|
|
||||||
|
before do
|
||||||
|
project.add_master(user)
|
||||||
|
|
||||||
|
login_as(user)
|
||||||
|
|
||||||
|
visit namespace_project_board_path(project.namespace, project, board)
|
||||||
|
wait_for_vue_resource
|
||||||
|
end
|
||||||
|
|
||||||
|
it 'creates new label from sidebar' do
|
||||||
|
find('.card').click
|
||||||
|
|
||||||
|
page.within '.labels' do
|
||||||
|
click_link 'Edit'
|
||||||
|
click_link 'Create new label'
|
||||||
|
end
|
||||||
|
|
||||||
|
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_ajax
|
||||||
|
end
|
||||||
|
|
||||||
|
page.within '.labels' do
|
||||||
|
expect(page).to have_link 'test label'
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
Loading…
Reference in a new issue