Commit 46a6fb38 authored by Filipa Lacerda's avatar Filipa Lacerda

Merge branch 'issue-boards-sidebar-create-new-label-404-error' into 'master'

Fixed create label form not working on issue boards in a sub-group project

Closes #31862

See merge request !11182
parents d2df134f 95ddedca
......@@ -19,7 +19,7 @@
":value" => "label.id" }
.dropdown
%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'" }
%span.dropdown-toggle-text
Label
......
---
title: Fixed create new label form in issue boards sidebar
merge_request:
author:
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
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