Commit ffd7596c authored by Jose Ivan Vargas's avatar Jose Ivan Vargas

Merge branch 'exclude-projects-dropdown-from-revert' into 'master'

Exclude projects dropdown from revert modal

See merge request gitlab-org/gitlab!59504
parents 45434c78 a4ffdb85
...@@ -37,6 +37,11 @@ export default { ...@@ -37,6 +37,11 @@ export default {
type: String, type: String,
required: true, required: true,
}, },
isCherryPick: {
type: Boolean,
required: false,
default: false,
},
}, },
data() { data() {
return { return {
...@@ -111,7 +116,7 @@ export default { ...@@ -111,7 +116,7 @@ export default {
<input type="hidden" name="authenticity_token" :value="$options.csrf.token" /> <input type="hidden" name="authenticity_token" :value="$options.csrf.token" />
<gl-form-group <gl-form-group
v-if="glFeatures.pickIntoProject" v-if="glFeatures.pickIntoProject && isCherryPick"
:label="i18n.projectLabel" :label="i18n.projectLabel"
label-for="start_project" label-for="start_project"
data-testid="dropdown-group" data-testid="dropdown-group"
......
...@@ -51,6 +51,7 @@ export default function initInviteMembersModal() { ...@@ -51,6 +51,7 @@ export default function initInviteMembersModal() {
i18n: { ...I18N_CHERRY_PICK_MODAL, ...I18N_MODAL }, i18n: { ...I18N_CHERRY_PICK_MODAL, ...I18N_MODAL },
openModal: OPEN_CHERRY_PICK_MODAL, openModal: OPEN_CHERRY_PICK_MODAL,
modalId: CHERRY_PICK_MODAL_ID, modalId: CHERRY_PICK_MODAL_ID,
isCherryPick: true,
}, },
}), }),
}); });
......
---
title: Exclude projects dropdown from revert modal
merge_request: 59504
author:
type: fixed
...@@ -17,15 +17,14 @@ describe('CommitFormModal', () => { ...@@ -17,15 +17,14 @@ describe('CommitFormModal', () => {
let store; let store;
let axiosMock; let axiosMock;
const createComponent = (method, state = {}, provide = {}) => { const createComponent = (method, state = {}, provide = {}, propsData = {}) => {
store = createStore({ ...mockData.mockModal, ...state }); store = createStore({ ...mockData.mockModal, ...state });
wrapper = extendedWrapper( wrapper = extendedWrapper(
method(CommitFormModal, { method(CommitFormModal, {
provide: { provide: {
...provide, ...provide,
glFeatures: { pickIntoProject: true },
}, },
propsData: { ...mockData.modalPropsData }, propsData: { ...mockData.modalPropsData, ...propsData },
store, store,
attrs: { attrs: {
static: true, static: true,
...@@ -160,6 +159,12 @@ describe('CommitFormModal', () => { ...@@ -160,6 +159,12 @@ describe('CommitFormModal', () => {
}); });
it('Changes the target_project_id input value', async () => { it('Changes the target_project_id input value', async () => {
createComponent(
shallowMount,
{},
{ glFeatures: { pickIntoProject: true } },
{ isCherryPick: true },
);
findProjectsDropdown().vm.$emit('selectProject', '_changed_project_value_'); findProjectsDropdown().vm.$emit('selectProject', '_changed_project_value_');
await wrapper.vm.$nextTick(); await wrapper.vm.$nextTick();
......
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