Commit 8b116ce1 authored by Justin Mandell's avatar Justin Mandell Committed by Vitaly Slobodin

Replace LoadingButton in IDE commit_sidebar/form.vue with GlButton

parent a414c3f5
<script> <script>
import { mapState, mapActions, mapGetters } from 'vuex'; import { mapState, mapActions, mapGetters } from 'vuex';
import { GlModal, GlSafeHtmlDirective } from '@gitlab/ui'; import { GlModal, GlSafeHtmlDirective, GlButton } from '@gitlab/ui';
import { n__, __ } from '~/locale'; import { n__, __ } from '~/locale';
import LoadingButton from '~/vue_shared/components/loading_button.vue';
import CommitMessageField from './message_field.vue'; import CommitMessageField from './message_field.vue';
import Actions from './actions.vue'; import Actions from './actions.vue';
import SuccessMessage from './success_message.vue'; import SuccessMessage from './success_message.vue';
...@@ -12,10 +11,10 @@ import { createUnexpectedCommitError } from '../../lib/errors'; ...@@ -12,10 +11,10 @@ import { createUnexpectedCommitError } from '../../lib/errors';
export default { export default {
components: { components: {
Actions, Actions,
LoadingButton,
CommitMessageField, CommitMessageField,
SuccessMessage, SuccessMessage,
GlModal, GlModal,
GlButton,
}, },
directives: { directives: {
SafeHtml: GlSafeHtmlDirective, SafeHtml: GlSafeHtmlDirective,
...@@ -156,12 +155,16 @@ export default { ...@@ -156,12 +155,16 @@ export default {
/> />
<div class="clearfix gl-mt-5"> <div class="clearfix gl-mt-5">
<actions /> <actions />
<loading-button <gl-button
:loading="submitCommitLoading" :loading="submitCommitLoading"
:label="commitButtonText" class="float-left qa-commit-button"
container-class="btn btn-success btn-sm float-left qa-commit-button" size="small"
category="primary"
variant="success"
@click="commit" @click="commit"
/> >
{{ __('Commit') }}
</gl-button>
<button <button
v-if="!discardDraftButtonDisabled" v-if="!discardDraftButtonDisabled"
type="button" type="button"
...@@ -170,14 +173,17 @@ export default { ...@@ -170,14 +173,17 @@ export default {
> >
{{ __('Discard draft') }} {{ __('Discard draft') }}
</button> </button>
<button <gl-button
v-else v-else
type="button" type="button"
class="btn btn-default btn-sm float-right" class="float-right"
category="secondary"
variant="default"
size="small"
@click="toggleIsCompact" @click="toggleIsCompact"
> >
{{ __('Collapse') }} {{ __('Collapse') }}
</button> </gl-button>
</div> </div>
<gl-modal <gl-modal
ref="commitErrorModal" ref="commitErrorModal"
......
...@@ -23,8 +23,6 @@ RSpec.describe 'User creates new blob', :js do ...@@ -23,8 +23,6 @@ RSpec.describe 'User creates new blob', :js do
ide_commit ide_commit
click_button('Commit')
expect(page).to have_content('All changes are committed') expect(page).to have_content('All changes are committed')
expect(project.repository.blob_at('master', 'dummy-file').data).to eql("Hello world\n") expect(project.repository.blob_at('master', 'dummy-file').data).to eql("Hello world\n")
end end
......
...@@ -27,9 +27,7 @@ RSpec.describe 'Projects > Files > Project owner sees a link to create a license ...@@ -27,9 +27,7 @@ RSpec.describe 'Projects > Files > Project owner sees a link to create a license
ide_commit ide_commit
click_button('Commit') expect(current_path).to eq("/-/ide/project/#{project.full_path}/tree/master/-/LICENSE/")
expect(current_path).to eq("/-/ide/project/#{project.full_path}/tree/master/-/")
expect(page).to have_content('All changes are committed') expect(page).to have_content('All changes are committed')
......
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