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 {
type: String,
required: true,
},
isCherryPick: {
type: Boolean,
required: false,
default: false,
},
},
data() {
return {
......@@ -111,7 +116,7 @@ export default {
<input type="hidden" name="authenticity_token" :value="$options.csrf.token" />
<gl-form-group
v-if="glFeatures.pickIntoProject"
v-if="glFeatures.pickIntoProject && isCherryPick"
:label="i18n.projectLabel"
label-for="start_project"
data-testid="dropdown-group"
......
......@@ -51,6 +51,7 @@ export default function initInviteMembersModal() {
i18n: { ...I18N_CHERRY_PICK_MODAL, ...I18N_MODAL },
openModal: OPEN_CHERRY_PICK_MODAL,
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', () => {
let store;
let axiosMock;
const createComponent = (method, state = {}, provide = {}) => {
const createComponent = (method, state = {}, provide = {}, propsData = {}) => {
store = createStore({ ...mockData.mockModal, ...state });
wrapper = extendedWrapper(
method(CommitFormModal, {
provide: {
...provide,
glFeatures: { pickIntoProject: true },
},
propsData: { ...mockData.modalPropsData },
propsData: { ...mockData.modalPropsData, ...propsData },
store,
attrs: {
static: true,
......@@ -160,6 +159,12 @@ describe('CommitFormModal', () => {
});
it('Changes the target_project_id input value', async () => {
createComponent(
shallowMount,
{},
{ glFeatures: { pickIntoProject: true } },
{ isCherryPick: true },
);
findProjectsDropdown().vm.$emit('selectProject', '_changed_project_value_');
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