Commit 5ac9eb84 authored by Kushal Pandya's avatar Kushal Pandya

Merge branch '207236-snippet-edit-title' into 'master'

Added the shared Edit Title component

Closes #207236

See merge request gitlab-org/gitlab!27582
parents 23a9dd77 eecd70e3
<script>
import { GlFormInput, GlFormGroup } from '@gitlab/ui';
export default {
components: {
GlFormInput,
GlFormGroup,
},
};
</script>
<template>
<gl-form-group :label="__('Title')" label-for="title-field-edit">
<gl-form-input id="title-field-edit" v-bind="$attrs" v-on="$listeners" />
</gl-form-group>
</template>
---
title: Added Edit Title shared component
merge_request: 27582
author:
type: added
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`Title edit field matches the snapshot 1`] = `
<gl-form-group-stub
label="Title"
label-for="title-field-edit"
>
<gl-form-input-stub
id="title-field-edit"
/>
</gl-form-group-stub>
`;
import TitleField from '~/vue_shared/components/form/title.vue';
import { shallowMount } from '@vue/test-utils';
describe('Title edit field', () => {
let wrapper;
function createComponent() {
wrapper = shallowMount(TitleField);
}
beforeEach(() => {
createComponent();
});
afterEach(() => {
wrapper.destroy();
});
it('matches the snapshot', () => {
expect(wrapper.element).toMatchSnapshot();
});
});
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