Skip to content
Snippets Groups Projects
Commit 58eac61b authored by Paul Slaughter's avatar Paul Slaughter Committed by 🤖 GitLab Bot 🤖
Browse files

Merge branch '66331-html-code-shown-in-merge-request' into 'master'

Resolve "HTML code shown in merge request"

Closes #66331

See merge request gitlab-org/gitlab-ce!32032

(cherry picked from commit 77ffe60c)

57c629e5 Fix double escaped html
cd2518ac Added changelog entry
6c7b5f56 Removed extra assertion in spec
parent 91900ef4
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -50,6 +50,7 @@ export default {
startTag: '<span class="label-branch">',
endTag: '</span>',
},
false,
);
},
},
Loading
Loading
---
title: Fix HTML rendering for fast-forward rebases in merge request widget
merge_request: 32032
author:
type: fixed
Loading
Loading
@@ -83,6 +83,24 @@ describe('Merge request widget rebase component', () => {
expect(text).toContain('foo');
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', () => {
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment