Commit 83d2dbd2 authored by Denys Mishunov's avatar Denys Mishunov Committed by Illya Klymov

Fixed redirection to project snippets

When deleting a Project snippet, we should redirect to the project
snippets, not hte project itself
parent 98d89eae
...@@ -127,7 +127,7 @@ export default { ...@@ -127,7 +127,7 @@ export default {
}, },
methods: { methods: {
redirectToSnippets() { redirectToSnippets() {
window.location.pathname = this.snippet.project?.fullPath || 'dashboard/snippets'; window.location.pathname = `${this.snippet.project?.fullPath || 'dashboard'}/snippets`;
}, },
closeDeleteModal() { closeDeleteModal() {
this.$refs.deleteModal.hide(); this.$refs.deleteModal.hide();
......
---
title: Fixed redirection to project snippets
merge_request: 32530
author:
type: fixed
...@@ -198,7 +198,7 @@ describe('Snippet header component', () => { ...@@ -198,7 +198,7 @@ describe('Snippet header component', () => {
}, },
}).then(() => { }).then(() => {
expect(wrapper.vm.closeDeleteModal).toHaveBeenCalled(); expect(wrapper.vm.closeDeleteModal).toHaveBeenCalled();
expect(window.location.pathname).toBe(fullPath); expect(window.location.pathname).toBe(`${fullPath}/snippets`);
}); });
}); });
}); });
......
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