Commit 29a85cfe authored by David Kim's avatar David Kim

Remove deprecated WIP from GraphQL

We deprecated WIP in favor of Draft in 13.12.
We are removing it completely now.

Changelog: removed
parent 8e4ef96f
...@@ -10,8 +10,8 @@ import glFeatureFlagMixin from '~/vue_shared/mixins/gl_feature_flags_mixin'; ...@@ -10,8 +10,8 @@ import glFeatureFlagMixin from '~/vue_shared/mixins/gl_feature_flags_mixin';
import eventHub from '../../event_hub'; import eventHub from '../../event_hub';
import mergeRequestQueryVariablesMixin from '../../mixins/merge_request_query_variables'; import mergeRequestQueryVariablesMixin from '../../mixins/merge_request_query_variables';
import getStateQuery from '../../queries/get_state.query.graphql'; import getStateQuery from '../../queries/get_state.query.graphql';
import workInProgressQuery from '../../queries/states/work_in_progress.query.graphql'; import draftQuery from '../../queries/states/draft.query.graphql';
import removeWipMutation from '../../queries/toggle_wip.mutation.graphql'; import removeDraftMutation from '../../queries/toggle_draft.mutation.graphql';
import StatusIcon from '../mr_widget_status_icon.vue'; import StatusIcon from '../mr_widget_status_icon.vue';
export default { export default {
...@@ -23,7 +23,7 @@ export default { ...@@ -23,7 +23,7 @@ export default {
mixins: [glFeatureFlagMixin(), mergeRequestQueryVariablesMixin], mixins: [glFeatureFlagMixin(), mergeRequestQueryVariablesMixin],
apollo: { apollo: {
userPermissions: { userPermissions: {
query: workInProgressQuery, query: draftQuery,
skip() { skip() {
return !this.glFeatures.mergeRequestWidgetGraphql; return !this.glFeatures.mergeRequestWidgetGraphql;
}, },
...@@ -53,25 +53,25 @@ export default { ...@@ -53,25 +53,25 @@ export default {
}, },
}, },
methods: { methods: {
removeWipMutation() { removeDraftMutation() {
const { mergeRequestQueryVariables } = this; const { mergeRequestQueryVariables } = this;
this.isMakingRequest = true; this.isMakingRequest = true;
this.$apollo this.$apollo
.mutate({ .mutate({
mutation: removeWipMutation, mutation: removeDraftMutation,
variables: { variables: {
...mergeRequestQueryVariables, ...mergeRequestQueryVariables,
wip: false, draft: false,
}, },
update( update(
store, store,
{ {
data: { data: {
mergeRequestSetWip: { mergeRequestSetDraft: {
errors, errors,
mergeRequest: { mergeableDiscussionsState, workInProgress, title }, mergeRequest: { mergeableDiscussionsState, draft, title },
}, },
}, },
}, },
...@@ -91,7 +91,7 @@ export default { ...@@ -91,7 +91,7 @@ export default {
const data = produce(sourceData, (draftState) => { const data = produce(sourceData, (draftState) => {
draftState.project.mergeRequest.mergeableDiscussionsState = mergeableDiscussionsState; draftState.project.mergeRequest.mergeableDiscussionsState = mergeableDiscussionsState;
draftState.project.mergeRequest.workInProgress = workInProgress; draftState.project.mergeRequest.draft = draft;
draftState.project.mergeRequest.title = title; draftState.project.mergeRequest.title = title;
}); });
...@@ -104,14 +104,14 @@ export default { ...@@ -104,14 +104,14 @@ export default {
optimisticResponse: { optimisticResponse: {
// eslint-disable-next-line @gitlab/require-i18n-strings // eslint-disable-next-line @gitlab/require-i18n-strings
__typename: 'Mutation', __typename: 'Mutation',
mergeRequestSetWip: { mergeRequestSetDraft: {
__typename: 'MergeRequestSetWipPayload', __typename: 'MergeRequestSetWipPayload',
errors: [], errors: [],
mergeRequest: { mergeRequest: {
__typename: 'MergeRequest', __typename: 'MergeRequest',
mergeableDiscussionsState: true, mergeableDiscussionsState: true,
title: this.mr.title, title: this.mr.title,
workInProgress: false, draft: false,
}, },
}, },
}, },
...@@ -119,7 +119,7 @@ export default { ...@@ -119,7 +119,7 @@ export default {
.then( .then(
({ ({
data: { data: {
mergeRequestSetWip: { mergeRequestSetDraft: {
mergeRequest: { title }, mergeRequest: { title },
}, },
}, },
...@@ -137,9 +137,9 @@ export default { ...@@ -137,9 +137,9 @@ export default {
this.isMakingRequest = false; this.isMakingRequest = false;
}); });
}, },
handleRemoveWIP() { handleRemoveDraft() {
if (this.glFeatures.mergeRequestWidgetGraphql) { if (this.glFeatures.mergeRequestWidgetGraphql) {
this.removeWipMutation(); this.removeDraftMutation();
} else { } else {
this.isMakingRequest = true; this.isMakingRequest = true;
this.service this.service
...@@ -178,8 +178,8 @@ export default { ...@@ -178,8 +178,8 @@ export default {
size="small" size="small"
:disabled="isMakingRequest" :disabled="isMakingRequest"
:loading="isMakingRequest" :loading="isMakingRequest"
class="js-remove-wip gl-ml-3" class="js-remove-draft gl-ml-3"
@click="handleRemoveWIP" @click="handleRemoveDraft"
> >
{{ s__('mrWidget|Mark as ready') }} {{ s__('mrWidget|Mark as ready') }}
</gl-button> </gl-button>
......
...@@ -23,7 +23,7 @@ query getState($projectPath: ID!, $iid: String!) { ...@@ -23,7 +23,7 @@ query getState($projectPath: ID!, $iid: String!) {
userPermissions { userPermissions {
canMerge canMerge
} }
workInProgress draft
} }
} }
} }
mutation toggleWIPStatus($projectPath: ID!, $iid: String!, $wip: Boolean!) { mutation toggleDraftStatus($projectPath: ID!, $iid: String!, $draft: Boolean!) {
mergeRequestSetWip(input: { projectPath: $projectPath, iid: $iid, wip: $wip }) { mergeRequestSetDraft(input: { projectPath: $projectPath, iid: $iid, draft: $draft }) {
mergeRequest { mergeRequest {
mergeableDiscussionsState mergeableDiscussionsState
title title
workInProgress draft
} }
errors errors
} }
......
...@@ -17,8 +17,8 @@ export default function deviseState() { ...@@ -17,8 +17,8 @@ export default function deviseState() {
return stateKey.rebase; return stateKey.rebase;
} else if (this.onlyAllowMergeIfPipelineSucceeds && this.isPipelineFailed) { } else if (this.onlyAllowMergeIfPipelineSucceeds && this.isPipelineFailed) {
return stateKey.pipelineFailed; return stateKey.pipelineFailed;
} else if (this.workInProgress) { } else if (this.draft) {
return stateKey.workInProgress; return stateKey.draft;
} else if (this.hasMergeableDiscussionsState && !this.autoMergeEnabled) { } else if (this.hasMergeableDiscussionsState && !this.autoMergeEnabled) {
return stateKey.unresolvedDiscussions; return stateKey.unresolvedDiscussions;
} else if (this.isPipelineBlocked) { } else if (this.isPipelineBlocked) {
......
...@@ -164,7 +164,7 @@ export default class MergeRequestStore { ...@@ -164,7 +164,7 @@ export default class MergeRequestStore {
this.projectArchived = data.project_archived; this.projectArchived = data.project_archived;
this.isSHAMismatch = this.sha !== data.diff_head_sha; this.isSHAMismatch = this.sha !== data.diff_head_sha;
this.shouldBeRebased = Boolean(data.should_be_rebased); this.shouldBeRebased = Boolean(data.should_be_rebased);
this.workInProgress = data.work_in_progress; this.draft = data.draft;
} }
const currentUser = data.current_user; const currentUser = data.current_user;
...@@ -207,7 +207,7 @@ export default class MergeRequestStore { ...@@ -207,7 +207,7 @@ export default class MergeRequestStore {
this.isPipelineFailed = this.ciStatus === 'failed' || this.ciStatus === 'canceled'; this.isPipelineFailed = this.ciStatus === 'failed' || this.ciStatus === 'canceled';
this.isSHAMismatch = this.sha !== mergeRequest.diffHeadSha; this.isSHAMismatch = this.sha !== mergeRequest.diffHeadSha;
this.shouldBeRebased = mergeRequest.shouldBeRebased; this.shouldBeRebased = mergeRequest.shouldBeRebased;
this.workInProgress = mergeRequest.workInProgress; this.draft = mergeRequest.draft;
this.mergeRequestState = mergeRequest.state; this.mergeRequestState = mergeRequest.state;
this.setState(); this.setState();
......
...@@ -4,7 +4,7 @@ export const stateToComponentMap = { ...@@ -4,7 +4,7 @@ export const stateToComponentMap = {
merging: 'mr-widget-merging', merging: 'mr-widget-merging',
conflicts: 'mr-widget-conflicts', conflicts: 'mr-widget-conflicts',
missingBranch: 'mr-widget-missing-branch', missingBranch: 'mr-widget-missing-branch',
workInProgress: 'mr-widget-wip', draft: 'mr-widget-wip',
readyToMerge: 'mr-widget-ready-to-merge', readyToMerge: 'mr-widget-ready-to-merge',
nothingToMerge: 'mr-widget-nothing-to-merge', nothingToMerge: 'mr-widget-nothing-to-merge',
notAllowedToMerge: 'mr-widget-not-allowed', notAllowedToMerge: 'mr-widget-not-allowed',
...@@ -24,7 +24,7 @@ export const stateToComponentMap = { ...@@ -24,7 +24,7 @@ export const stateToComponentMap = {
export const statesToShowHelpWidget = [ export const statesToShowHelpWidget = [
'merging', 'merging',
'conflicts', 'conflicts',
'workInProgress', 'draft',
'readyToMerge', 'readyToMerge',
'checking', 'checking',
'unresolvedDiscussions', 'unresolvedDiscussions',
...@@ -40,7 +40,7 @@ export const stateKey = { ...@@ -40,7 +40,7 @@ export const stateKey = {
nothingToMerge: 'nothingToMerge', nothingToMerge: 'nothingToMerge',
checking: 'checking', checking: 'checking',
conflicts: 'conflicts', conflicts: 'conflicts',
workInProgress: 'workInProgress', draft: 'draft',
pipelineFailed: 'pipelineFailed', pipelineFailed: 'pipelineFailed',
unresolvedDiscussions: 'unresolvedDiscussions', unresolvedDiscussions: 'unresolvedDiscussions',
pipelineBlocked: 'pipelineBlocked', pipelineBlocked: 'pipelineBlocked',
......
# frozen_string_literal: true
module Mutations
module MergeRequests
class SetWip < Base
graphql_name 'MergeRequestSetWip'
argument :wip,
GraphQL::Types::Boolean,
required: true,
description: <<~DESC
Whether or not to set the merge request as a draft.
DESC
def resolve(project_path:, iid:, wip: nil)
merge_request = authorized_find!(project_path: project_path, iid: iid)
project = merge_request.project
::MergeRequests::UpdateService.new(project: project, current_user: current_user, params: { wip_event: wip_event(merge_request, wip) })
.execute(merge_request)
{
merge_request: merge_request,
errors: errors_on_object(merge_request)
}
end
private
def wip_event(merge_request, wip)
wip ? 'wip' : 'unwip'
end
end
end
end
...@@ -53,9 +53,6 @@ module Types ...@@ -53,9 +53,6 @@ module Types
description: 'Indicates if the source branch is protected.' description: 'Indicates if the source branch is protected.'
field :target_branch, GraphQL::Types::String, null: false, field :target_branch, GraphQL::Types::String, null: false,
description: 'Target branch of the merge request.' description: 'Target branch of the merge request.'
field :work_in_progress, GraphQL::Types::Boolean, method: :work_in_progress?, null: false,
deprecated: { reason: 'Use `draft`', milestone: '13.12' },
description: 'Indicates if the merge request is a draft.'
field :draft, GraphQL::Types::Boolean, method: :draft?, null: false, field :draft, GraphQL::Types::Boolean, method: :draft?, null: false,
description: 'Indicates if the merge request is a draft.' description: 'Indicates if the merge request is a draft.'
field :merge_when_pipeline_succeeds, GraphQL::Types::Boolean, null: true, field :merge_when_pipeline_succeeds, GraphQL::Types::Boolean, null: true,
......
...@@ -65,9 +65,6 @@ module Types ...@@ -65,9 +65,6 @@ module Types
mount_mutation Mutations::MergeRequests::SetLocked mount_mutation Mutations::MergeRequests::SetLocked
mount_mutation Mutations::MergeRequests::SetMilestone mount_mutation Mutations::MergeRequests::SetMilestone
mount_mutation Mutations::MergeRequests::SetSubscription mount_mutation Mutations::MergeRequests::SetSubscription
mount_mutation Mutations::MergeRequests::SetWip,
calls_gitaly: true,
deprecated: { reason: 'Use mergeRequestSetDraft', milestone: '13.12' }
mount_mutation Mutations::MergeRequests::SetDraft, calls_gitaly: true mount_mutation Mutations::MergeRequests::SetDraft, calls_gitaly: true
mount_mutation Mutations::MergeRequests::SetAssignees mount_mutation Mutations::MergeRequests::SetAssignees
mount_mutation Mutations::MergeRequests::ReviewerRereview mount_mutation Mutations::MergeRequests::ReviewerRereview
......
...@@ -3493,31 +3493,6 @@ Input type: `MergeRequestSetSubscriptionInput` ...@@ -3493,31 +3493,6 @@ Input type: `MergeRequestSetSubscriptionInput`
| <a id="mutationmergerequestsetsubscriptionerrors"></a>`errors` | [`[String!]!`](#string) | Errors encountered during execution of the mutation. | | <a id="mutationmergerequestsetsubscriptionerrors"></a>`errors` | [`[String!]!`](#string) | Errors encountered during execution of the mutation. |
| <a id="mutationmergerequestsetsubscriptionmergerequest"></a>`mergeRequest` | [`MergeRequest`](#mergerequest) | Merge request after mutation. | | <a id="mutationmergerequestsetsubscriptionmergerequest"></a>`mergeRequest` | [`MergeRequest`](#mergerequest) | Merge request after mutation. |
### `Mutation.mergeRequestSetWip`
WARNING:
**Deprecated** in 13.12.
Use mergeRequestSetDraft.
Input type: `MergeRequestSetWipInput`
#### Arguments
| Name | Type | Description |
| ---- | ---- | ----------- |
| <a id="mutationmergerequestsetwipclientmutationid"></a>`clientMutationId` | [`String`](#string) | A unique identifier for the client performing the mutation. |
| <a id="mutationmergerequestsetwipiid"></a>`iid` | [`String!`](#string) | IID of the merge request to mutate. |
| <a id="mutationmergerequestsetwipprojectpath"></a>`projectPath` | [`ID!`](#id) | Project the merge request to mutate is in. |
| <a id="mutationmergerequestsetwipwip"></a>`wip` | [`Boolean!`](#boolean) | Whether or not to set the merge request as a draft. |
#### Fields
| Name | Type | Description |
| ---- | ---- | ----------- |
| <a id="mutationmergerequestsetwipclientmutationid"></a>`clientMutationId` | [`String`](#string) | A unique identifier for the client performing the mutation. |
| <a id="mutationmergerequestsetwiperrors"></a>`errors` | [`[String!]!`](#string) | Errors encountered during execution of the mutation. |
| <a id="mutationmergerequestsetwipmergerequest"></a>`mergeRequest` | [`MergeRequest`](#mergerequest) | Merge request after mutation. |
### `Mutation.mergeRequestUpdate` ### `Mutation.mergeRequestUpdate`
Update attributes of a merge request. Update attributes of a merge request.
...@@ -11509,7 +11484,6 @@ Maven metadata. ...@@ -11509,7 +11484,6 @@ Maven metadata.
| <a id="mergerequestusernotescount"></a>`userNotesCount` | [`Int`](#int) | User notes count of the merge request. | | <a id="mergerequestusernotescount"></a>`userNotesCount` | [`Int`](#int) | User notes count of the merge request. |
| <a id="mergerequestuserpermissions"></a>`userPermissions` | [`MergeRequestPermissions!`](#mergerequestpermissions) | Permissions for the current user on the resource. | | <a id="mergerequestuserpermissions"></a>`userPermissions` | [`MergeRequestPermissions!`](#mergerequestpermissions) | Permissions for the current user on the resource. |
| <a id="mergerequestweburl"></a>`webUrl` | [`String`](#string) | Web URL of the merge request. | | <a id="mergerequestweburl"></a>`webUrl` | [`String`](#string) | Web URL of the merge request. |
| <a id="mergerequestworkinprogress"></a>`workInProgress` **{warning-solid}** | [`Boolean!`](#boolean) | **Deprecated** in 13.12. Use `draft`. |
#### Fields with arguments #### Fields with arguments
......
...@@ -46,7 +46,7 @@ describe('Wip', () => { ...@@ -46,7 +46,7 @@ describe('Wip', () => {
is_new_mr_data: true, is_new_mr_data: true,
}; };
describe('handleRemoveWIP', () => { describe('handleRemoveDraft', () => {
it('should make a request to service and handle response', (done) => { it('should make a request to service and handle response', (done) => {
const vm = createComponent(); const vm = createComponent();
...@@ -59,7 +59,7 @@ describe('Wip', () => { ...@@ -59,7 +59,7 @@ describe('Wip', () => {
}), }),
); );
vm.handleRemoveWIP(); vm.handleRemoveDraft();
setImmediate(() => { setImmediate(() => {
expect(vm.isMakingRequest).toBeTruthy(); expect(vm.isMakingRequest).toBeTruthy();
expect(eventHub.$emit).toHaveBeenCalledWith('UpdateWidgetData', mrObj); expect(eventHub.$emit).toHaveBeenCalledWith('UpdateWidgetData', mrObj);
...@@ -84,7 +84,7 @@ describe('Wip', () => { ...@@ -84,7 +84,7 @@ describe('Wip', () => {
expect(el.innerText).toContain('This merge request is still a draft.'); expect(el.innerText).toContain('This merge request is still a draft.');
expect(el.querySelector('button').getAttribute('disabled')).toBeTruthy(); expect(el.querySelector('button').getAttribute('disabled')).toBeTruthy();
expect(el.querySelector('button').innerText).toContain('Merge'); expect(el.querySelector('button').innerText).toContain('Merge');
expect(el.querySelector('.js-remove-wip').innerText.replace(/\s\s+/g, ' ')).toContain( expect(el.querySelector('.js-remove-draft').innerText.replace(/\s\s+/g, ' ')).toContain(
'Mark as ready', 'Mark as ready',
); );
}); });
...@@ -93,7 +93,7 @@ describe('Wip', () => { ...@@ -93,7 +93,7 @@ describe('Wip', () => {
vm.mr.removeWIPPath = ''; vm.mr.removeWIPPath = '';
Vue.nextTick(() => { Vue.nextTick(() => {
expect(el.querySelector('.js-remove-wip')).toEqual(null); expect(el.querySelector('.js-remove-draft')).toEqual(null);
done(); done();
}); });
}); });
......
...@@ -15,7 +15,7 @@ describe('getStateKey', () => { ...@@ -15,7 +15,7 @@ describe('getStateKey', () => {
branchMissing: false, branchMissing: false,
commitsCount: 2, commitsCount: 2,
hasConflicts: false, hasConflicts: false,
workInProgress: false, draft: false,
}; };
const bound = getStateKey.bind(context); const bound = getStateKey.bind(context);
...@@ -49,9 +49,9 @@ describe('getStateKey', () => { ...@@ -49,9 +49,9 @@ describe('getStateKey', () => {
expect(bound()).toEqual('unresolvedDiscussions'); expect(bound()).toEqual('unresolvedDiscussions');
context.workInProgress = true; context.draft = true;
expect(bound()).toEqual('workInProgress'); expect(bound()).toEqual('draft');
context.onlyAllowMergeIfPipelineSucceeds = true; context.onlyAllowMergeIfPipelineSucceeds = true;
context.isPipelineFailed = true; context.isPipelineFailed = true;
...@@ -99,7 +99,7 @@ describe('getStateKey', () => { ...@@ -99,7 +99,7 @@ describe('getStateKey', () => {
branchMissing: false, branchMissing: false,
commitsCount: 2, commitsCount: 2,
hasConflicts: false, hasConflicts: false,
workInProgress: false, draft: false,
}; };
const bound = getStateKey.bind(context); const bound = getStateKey.bind(context);
......
# frozen_string_literal: true
require 'spec_helper'
RSpec.describe Mutations::MergeRequests::SetWip do
let(:merge_request) { create(:merge_request) }
let(:user) { create(:user) }
subject(:mutation) { described_class.new(object: nil, context: { current_user: user }, field: nil) }
specify { expect(described_class).to require_graphql_authorizations(:update_merge_request) }
describe '#resolve' do
let(:wip) { true }
let(:mutated_merge_request) { subject[:merge_request] }
subject { mutation.resolve(project_path: merge_request.project.full_path, iid: merge_request.iid, wip: wip) }
it_behaves_like 'permission level for merge request mutation is correctly verified'
context 'when the user can update the merge request' do
before do
merge_request.project.add_developer(user)
end
it 'returns the merge request as a wip' do
expect(mutated_merge_request).to eq(merge_request)
expect(mutated_merge_request).to be_work_in_progress
expect(subject[:errors]).to be_empty
end
it 'returns errors merge request could not be updated' do
# Make the merge request invalid
merge_request.allow_broken = true
merge_request.update!(source_project: nil)
expect(subject[:errors]).not_to be_empty
end
context 'when passing wip as false' do
let(:wip) { false }
it 'removes `wip` from the title' do
merge_request.update!(title: "WIP: working on it")
expect(mutated_merge_request).not_to be_work_in_progress
end
it 'does not do anything if the title did not start with wip' do
expect(mutated_merge_request).not_to be_work_in_progress
end
end
end
end
end
...@@ -18,7 +18,7 @@ RSpec.describe GitlabSchema.types['MergeRequest'] do ...@@ -18,7 +18,7 @@ RSpec.describe GitlabSchema.types['MergeRequest'] do
notes discussions user_permissions id iid title title_html description notes discussions user_permissions id iid title title_html description
description_html state created_at updated_at source_project target_project description_html state created_at updated_at source_project target_project
project project_id source_project_id target_project_id source_branch project project_id source_project_id target_project_id source_branch
target_branch work_in_progress draft merge_when_pipeline_succeeds diff_head_sha target_branch draft merge_when_pipeline_succeeds diff_head_sha
merge_commit_sha user_notes_count user_discussions_count should_remove_source_branch merge_commit_sha user_notes_count user_discussions_count should_remove_source_branch
diff_refs diff_stats diff_stats_summary diff_refs diff_stats diff_stats_summary
force_remove_source_branch force_remove_source_branch
......
...@@ -3,14 +3,6 @@ ...@@ -3,14 +3,6 @@
require 'spec_helper' require 'spec_helper'
RSpec.describe Types::MutationType do RSpec.describe Types::MutationType do
it 'is expected to have the deprecated MergeRequestSetWip' do
field = get_field('MergeRequestSetWip')
expect(field).to be_present
expect(field.deprecation_reason).to be_present
expect(field.resolver).to eq(Mutations::MergeRequests::SetWip)
end
it 'is expected to have the MergeRequestSetDraft' do it 'is expected to have the MergeRequestSetDraft' do
expect(described_class).to have_graphql_mutation(Mutations::MergeRequests::SetDraft) expect(described_class).to have_graphql_mutation(Mutations::MergeRequests::SetDraft)
end end
......
...@@ -8,14 +8,14 @@ RSpec.describe 'Setting Draft status of a merge request' do ...@@ -8,14 +8,14 @@ RSpec.describe 'Setting Draft status of a merge request' do
let(:current_user) { create(:user) } let(:current_user) { create(:user) }
let(:merge_request) { create(:merge_request) } let(:merge_request) { create(:merge_request) }
let(:project) { merge_request.project } let(:project) { merge_request.project }
let(:input) { { wip: true } } let(:input) { { draft: true } }
let(:mutation) do let(:mutation) do
variables = { variables = {
project_path: project.full_path, project_path: project.full_path,
iid: merge_request.iid.to_s iid: merge_request.iid.to_s
} }
graphql_mutation(:merge_request_set_wip, variables.merge(input), graphql_mutation(:merge_request_set_draft, variables.merge(input),
<<-QL.strip_heredoc <<-QL.strip_heredoc
clientMutationId clientMutationId
errors errors
...@@ -28,7 +28,7 @@ RSpec.describe 'Setting Draft status of a merge request' do ...@@ -28,7 +28,7 @@ RSpec.describe 'Setting Draft status of a merge request' do
end end
def mutation_response def mutation_response
graphql_mutation_response(:merge_request_set_wip) graphql_mutation_response(:merge_request_set_draft)
end end
before do before do
...@@ -58,7 +58,7 @@ RSpec.describe 'Setting Draft status of a merge request' do ...@@ -58,7 +58,7 @@ RSpec.describe 'Setting Draft status of a merge request' do
end end
context 'when passing Draft false as input' do context 'when passing Draft false as input' do
let(:input) { { wip: false } } let(:input) { { draft: false } }
it 'does not do anything if the merge reqeust was not marked draft' do it 'does not do anything if the merge reqeust was not marked draft' do
post_graphql_mutation(mutation, current_user: current_user) post_graphql_mutation(mutation, current_user: current_user)
......
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