Commit eecd70e3 authored by Denys Mishunov's avatar Denys Mishunov

Added the shared Edit Title component

Generated the changelog entry
parent 99b3ee82
<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