diff options
author | Clement Ho <clemmakesapps@gmail.com> | 2019-07-10 13:18:18 +0000 |
---|---|---|
committer | Clement Ho <clemmakesapps@gmail.com> | 2019-07-10 13:18:18 +0000 |
commit | 863930cdfcca9051f0a5902ce3fa0594f3aeac52 (patch) | |
tree | d7ada1e6bf75bc7f3a17953dadeb3563ffcade0b | |
parent | 5b669c191d766ab980d647107d7c183be5f8f99e (diff) | |
parent | 2552fc1e24fce268d62b5462d54a66fe6c77dea7 (diff) | |
download | gitlab-ce-863930cdfcca9051f0a5902ce3fa0594f3aeac52.tar.gz |
Merge branch '64321-wrong-url-when-creating-milestones-from-instance-milestones-dashboard' into 'master'
Fix wrong URL when creating milestones from instance milestones dashboard
Closes #64321
See merge request gitlab-org/gitlab-ce!30512
3 files changed, 20 insertions, 1 deletions
diff --git a/app/views/dashboard/milestones/index.html.haml b/app/views/dashboard/milestones/index.html.haml index 37ba2143eba..b9be6028b72 100644 --- a/app/views/dashboard/milestones/index.html.haml +++ b/app/views/dashboard/milestones/index.html.haml @@ -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 diff --git a/changelogs/unreleased/64321-wrong-url-when-creating-milestones-from-instance-milestones-dashboard.yml b/changelogs/unreleased/64321-wrong-url-when-creating-milestones-from-instance-milestones-dashboard.yml new file mode 100644 index 00000000000..825247db3e7 --- /dev/null +++ b/changelogs/unreleased/64321-wrong-url-when-creating-milestones-from-instance-milestones-dashboard.yml @@ -0,0 +1,5 @@ +--- +title: Fix wrong URL when creating milestones from instance milestones dashboard +merge_request: 30512 +author: +type: fixed diff --git a/spec/features/dashboard/milestones_spec.rb b/spec/features/dashboard/milestones_spec.rb index 8fb2e37e269..c3310a4a132 100644 --- a/spec/features/dashboard/milestones_spec.rb +++ b/spec/features/dashboard/milestones_spec.rb @@ -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 |