Commit 1c463586 authored by Phil Hughes's avatar Phil Hughes

Removed un-used CSS

Fixed random if statement

[ci skip]
parent c225007a
...@@ -8,6 +8,7 @@ import Store from '../stores'; ...@@ -8,6 +8,7 @@ import Store from '../stores';
import titleComponent from './title.vue'; import titleComponent from './title.vue';
import descriptionComponent from './description.vue'; import descriptionComponent from './description.vue';
import formComponent from './form.vue'; import formComponent from './form.vue';
import '../../lib/utils/url_utility';
export default { export default {
props: { props: {
...@@ -106,8 +107,8 @@ export default { ...@@ -106,8 +107,8 @@ export default {
.then((data) => { .then((data) => {
if (location.pathname !== data.path) { if (location.pathname !== data.path) {
gl.utils.visitUrl(data.path); gl.utils.visitUrl(data.path);
} if (data.confidential !== this.isConfidential) { } else if (data.confidential !== this.isConfidential) {
gl.utils.visitUrl(location.href); gl.utils.visitUrl(location.pathname);
} }
eventHub.$emit('close.form'); eventHub.$emit('close.form');
......
...@@ -72,7 +72,6 @@ ...@@ -72,7 +72,6 @@
</div> </div>
<span <span
data-placement="auto top" data-placement="auto top"
style="cursor: default"
title="Moving an issue will copy the discussion to a different project and close it here. All participants will be notified of the new location." title="Moving an issue will copy the discussion to a different project and close it here. All participants will be notified of the new location."
ref="tooltip"> ref="tooltip">
<i <i
......
...@@ -116,6 +116,7 @@ describe('Issuable output', () => { ...@@ -116,6 +116,7 @@ describe('Issuable output', () => {
json() { json() {
return { return {
confidential: true, confidential: true,
path: location.pathname,
}; };
}, },
}); });
...@@ -126,7 +127,7 @@ describe('Issuable output', () => { ...@@ -126,7 +127,7 @@ describe('Issuable output', () => {
setTimeout(() => { setTimeout(() => {
expect( expect(
gl.utils.visitUrl, gl.utils.visitUrl,
).toHaveBeenCalledWith(location.href); ).toHaveBeenCalledWith(location.pathname);
done(); done();
}); });
...@@ -154,7 +155,14 @@ describe('Issuable output', () => { ...@@ -154,7 +155,14 @@ describe('Issuable output', () => {
it('does not redirect if issue has not moved', (done) => { it('does not redirect if issue has not moved', (done) => {
spyOn(gl.utils, 'visitUrl'); spyOn(gl.utils, 'visitUrl');
spyOn(vm.service, 'updateIssuable').and.callFake(() => new Promise((resolve) => { spyOn(vm.service, 'updateIssuable').and.callFake(() => new Promise((resolve) => {
resolve(); resolve({
json() {
return {
path: location.pathname,
confidential: vm.isConfidential,
};
},
});
})); }));
vm.updateIssuable(); vm.updateIssuable();
...@@ -175,6 +183,7 @@ describe('Issuable output', () => { ...@@ -175,6 +183,7 @@ describe('Issuable output', () => {
json() { json() {
return { return {
path: '/testing-issue-move', path: '/testing-issue-move',
confidential: vm.isConfidential,
}; };
}, },
}); });
......
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