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 {
</gl-button-group>
</div>
<gl-sprintf
v-else-if="hasSourceVersions"
v-else-if="!commit && hasSourceVersions"
class="d-flex align-items-center compare-versions-container"
: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', () => {
const targetBranchName = 'tmp-wine-dev';
const { commit } = getDiffWithCommit();
const createWrapper = (props = {}, commitArgs = {}) => {
store.state.diffs.commit = { ...store.state.diffs.commit, ...commitArgs };
const createWrapper = (props = {}, commitArgs = {}, createCommit = true) => {
if (createCommit) {
store.state.diffs.commit = { ...store.state.diffs.commit, ...commitArgs };
}
wrapper = mount(CompareVersionsComponent, {
localVue,
store,
......@@ -59,7 +62,7 @@ describe('CompareVersions', () => {
describe('template', () => {
beforeEach(() => {
createWrapper();
createWrapper({}, {}, false);
});
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