Commit 462cd6ab authored by Kushal Pandya's avatar Kushal Pandya

Merge branch 'ph/326801/singleCommitMergeRequestControls' into 'master'

Fixes merge request controls not being visible

See merge request gitlab-org/gitlab!61030
parents 4a279484 9e808aab
...@@ -142,7 +142,7 @@ export default { ...@@ -142,7 +142,7 @@ export default {
</gl-button-group> </gl-button-group>
</div> </div>
<gl-sprintf <gl-sprintf
v-else-if="hasSourceVersions" v-else-if="!commit && hasSourceVersions"
class="d-flex align-items-center compare-versions-container" class="d-flex align-items-center compare-versions-container"
:message="s__('MergeRequest|Compare %{target} and %{source}')" :message="s__('MergeRequest|Compare %{target} and %{source}')"
> >
......
---
title: Fixes merge request controls not visible when merge request has single commit
merge_request: 61030
author:
type: fixed
...@@ -19,8 +19,11 @@ describe('CompareVersions', () => { ...@@ -19,8 +19,11 @@ describe('CompareVersions', () => {
const targetBranchName = 'tmp-wine-dev'; const targetBranchName = 'tmp-wine-dev';
const { commit } = getDiffWithCommit(); const { commit } = getDiffWithCommit();
const createWrapper = (props = {}, commitArgs = {}) => { const createWrapper = (props = {}, commitArgs = {}, createCommit = true) => {
if (createCommit) {
store.state.diffs.commit = { ...store.state.diffs.commit, ...commitArgs }; store.state.diffs.commit = { ...store.state.diffs.commit, ...commitArgs };
}
wrapper = mount(CompareVersionsComponent, { wrapper = mount(CompareVersionsComponent, {
localVue, localVue,
store, store,
...@@ -59,7 +62,7 @@ describe('CompareVersions', () => { ...@@ -59,7 +62,7 @@ describe('CompareVersions', () => {
describe('template', () => { describe('template', () => {
beforeEach(() => { beforeEach(() => {
createWrapper(); createWrapper({}, {}, false);
}); });
it('should render Tree List toggle button with correct attribute values', () => { it('should render Tree List toggle button with correct attribute values', () => {
......
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