Commit 5d6cb037 authored by Paul Slaughter's avatar Paul Slaughter

Update form_spec to use shallow mount VTU

- This makes testing for disabled/tooltip on
buttons a lot easier
- We were also able to remove a number of
redundant specs
parent c0e171f0
<script>
import { mapState, mapActions, mapGetters } from 'vuex';
import { GlModal, GlSafeHtmlDirective, GlButton } from '@gitlab/ui';
import { n__, __ } from '~/locale';
import { n__ } from '~/locale';
import CommitMessageField from './message_field.vue';
import Actions from './actions.vue';
import SuccessMessage from './success_message.vue';
......@@ -35,10 +35,6 @@ export default {
overviewText() {
return n__('%d changed file', '%d changed files', this.stagedFiles.length);
},
commitButtonText() {
return this.stagedFiles.length ? __('Commit') : __('Stage & Commit');
},
currentViewIsCommitView() {
return this.currentActivityView === leftSidebarViews.commit.name;
},
......@@ -160,13 +156,19 @@ export default {
<gl-button
:loading="submitCommitLoading"
class="float-left qa-commit-button"
data-testid="commit-button"
category="primary"
variant="success"
@click="commit"
>
{{ __('Commit') }}
</gl-button>
<gl-button v-if="!discardDraftButtonDisabled" class="float-right" @click="discardDraft">
<gl-button
v-if="!discardDraftButtonDisabled"
class="float-right"
data-testid="discard-draft"
@click="discardDraft"
>
{{ __('Discard draft') }}
</gl-button>
<gl-button
......
......@@ -26818,9 +26818,6 @@ msgstr ""
msgid "Stage"
msgstr ""
msgid "Stage & Commit"
msgstr ""
msgid "Stage data updated"
msgstr ""
......
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