Commit 2552fc1e authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Fix invalid milestone URL for new milestone dropdown

Signed-off-by: default avatarDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
parent db1b15e4
......@@ -8,7 +8,7 @@
- if current_user
.page-title-controls
= render 'shared/new_project_item_select',
path: 'milestones/new', label: 'New milestone',
path: '-/milestones/new', label: 'New milestone',
include_groups: true, type: :milestones
.top-area
......
---
title: Fix wrong URL when creating milestones from instance milestones dashboard
merge_request: 30512
author:
type: fixed
......@@ -29,5 +29,19 @@ describe 'Dashboard > Milestones' do
expect(page).to have_content(milestone.title)
expect(page).to have_content(group.name)
end
describe 'new milestones dropdown', :js do
it 'takes user to a new milestone page', :js do
find('.new-project-item-select-button').click
page.within('.select2-results') do
first('.select2-result-label').click
end
find('.new-project-item-link').click
expect(current_path).to eq(new_group_milestone_path(group))
end
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