Skip to content
代码片段 群组 项目
提交 1d773bbe 编辑于 作者: Frédéric Caplette's avatar Frédéric Caplette
浏览文件

Merge branch 'comment-form-migrate-resolve-checkbox' into 'master'

No related branches found
No related tags found
无相关合并请求
<script>
import { GlButton, GlSprintf, GlLink } from '@gitlab/ui';
import { GlButton, GlSprintf, GlLink, GlFormCheckbox } from '@gitlab/ui';
import { mapGetters, mapActions, mapState } from 'vuex';
import { mergeUrlParams } from '~/lib/utils/url_utility';
import { __ } from '~/locale';
......@@ -20,6 +20,7 @@ export default {
GlButton,
GlSprintf,
GlLink,
GlFormCheckbox,
},
mixins: [issuableStateMixin, resolvable, glFeaturesFlagMixin()],
props: {
......@@ -372,12 +373,14 @@ export default {
<p v-if="showResolveDiscussionToggle">
<label>
<template v-if="discussionResolved">
<input v-model="isUnresolving" type="checkbox" class="js-unresolve-checkbox" />
{{ __('Unresolve thread') }}
<gl-form-checkbox v-model="isUnresolving" class="js-unresolve-checkbox">
{{ __('Unresolve thread') }}
</gl-form-checkbox>
</template>
<template v-else>
<input v-model="isResolving" type="checkbox" class="js-resolve-checkbox" />
{{ __('Resolve thread') }}
<gl-form-checkbox v-model="isResolving" class="js-resolve-checkbox">
{{ __('Resolve thread') }}
</gl-form-checkbox>
</template>
</label>
</p>
......
import { GlLink } from '@gitlab/ui';
import { GlLink, GlFormCheckbox } from '@gitlab/ui';
import { nextTick } from 'vue';
import batchComments from '~/batch_comments/stores/modules/batch_comments';
import NoteForm from '~/notes/components/note_form.vue';
......@@ -234,7 +234,7 @@ describe('issue_note_form component', () => {
});
it('shows resolve checkbox', () => {
expect(wrapper.find('.js-resolve-checkbox').exists()).toBe(true);
expect(wrapper.findComponent(GlFormCheckbox).exists()).toBe(true);
});
it('hides resolve checkbox', async () => {
......@@ -253,7 +253,7 @@ describe('issue_note_form component', () => {
},
});
expect(wrapper.find('.js-resolve-checkbox').exists()).toBe(false);
expect(wrapper.findComponent(GlFormCheckbox).exists()).toBe(false);
});
it('hides actions for commits', async () => {
......
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册