Resolve "HTML code shown in merge request"
- Fixes double escaped text in `mr_widget_rebase.vue`
This commit is contained in:
parent
ef0f1509dd
commit
b7e6c898c7
3 changed files with 24 additions and 0 deletions
|
@ -50,6 +50,7 @@ export default {
|
||||||
startTag: '<span class="label-branch">',
|
startTag: '<span class="label-branch">',
|
||||||
endTag: '</span>',
|
endTag: '</span>',
|
||||||
},
|
},
|
||||||
|
false,
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
|
@ -0,0 +1,5 @@
|
||||||
|
---
|
||||||
|
title: Fix HTML rendering for fast-forward rebases in merge request widget
|
||||||
|
merge_request: 32032
|
||||||
|
author:
|
||||||
|
type: fixed
|
|
@ -83,6 +83,24 @@ describe('Merge request widget rebase component', () => {
|
||||||
expect(text).toContain('foo');
|
expect(text).toContain('foo');
|
||||||
expect(text.replace(/\s\s+/g, ' ')).toContain('to allow this merge request to be merged.');
|
expect(text.replace(/\s\s+/g, ' ')).toContain('to allow this merge request to be merged.');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it('should render the correct target branch name', () => {
|
||||||
|
const targetBranch = 'fake-branch-to-test-with';
|
||||||
|
vm = mountComponent(Component, {
|
||||||
|
mr: {
|
||||||
|
rebaseInProgress: false,
|
||||||
|
canPushToSourceBranch: false,
|
||||||
|
targetBranch,
|
||||||
|
},
|
||||||
|
service: {},
|
||||||
|
});
|
||||||
|
|
||||||
|
const elem = vm.$el.querySelector('.rebase-state-find-class-convention span');
|
||||||
|
|
||||||
|
expect(elem.innerHTML).toContain(
|
||||||
|
`Fast-forward merge is not possible. Rebase the source branch onto <span class="label-branch">${targetBranch}</span> to allow this merge request to be merged.`,
|
||||||
|
);
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
describe('methods', () => {
|
describe('methods', () => {
|
||||||
|
|
Loading…
Reference in a new issue