Commit 959ca0df authored by Paul Slaughter's avatar Paul Slaughter

Merge branch '351251-web-ide-commit-button' into 'master'

Change type of Web IDE commit button to submit

See merge request gitlab-org/gitlab!79259
parents b30f4de3 a3389934
......@@ -187,7 +187,7 @@ export default {
class="qa-commit-button"
category="primary"
variant="confirm"
@click="commit"
type="submit"
>
{{ __('Commit') }}
</gl-button>
......
......@@ -56,7 +56,6 @@ describe('IDE commit form', () => {
disabled: findCommitButton().props('disabled'),
tooltip: getBinding(findCommitButtonTooltip().element, 'gl-tooltip').value.title,
});
const clickCommitButton = () => findCommitButton().vm.$emit('click');
const findForm = () => wrapper.find('form');
const submitForm = () => findForm().trigger('submit');
const findCommitMessageInput = () => wrapper.find(CommitMessageField);
......@@ -283,8 +282,8 @@ describe('IDE commit form', () => {
jest.spyOn(store, 'dispatch').mockResolvedValue();
});
it.each([clickCommitButton, submitForm])('when %p, commits changes', (fn) => {
fn();
it('when submitting form, commits changes', () => {
submitForm();
expect(store.dispatch).toHaveBeenCalledWith('commit/commitChanges', undefined);
});
......
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