Commit e9b5b28d authored by Illya Klymov's avatar Illya Klymov

Merge branch 'dmishunov-fix-project-snippet-redirect' into 'master'

Fixed redirection to project snippets

See merge request gitlab-org/gitlab!32530
parents 8d100220 83d2dbd2
......@@ -127,7 +127,7 @@ export default {
},
methods: {
redirectToSnippets() {
window.location.pathname = this.snippet.project?.fullPath || 'dashboard/snippets';
window.location.pathname = `${this.snippet.project?.fullPath || 'dashboard'}/snippets`;
},
closeDeleteModal() {
this.$refs.deleteModal.hide();
......
---
title: Fixed redirection to project snippets
merge_request: 32530
author:
type: fixed
......@@ -198,7 +198,7 @@ describe('Snippet header component', () => {
},
}).then(() => {
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