Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
eecd70e3
Commit
eecd70e3
authored
Mar 19, 2020
by
Denys Mishunov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added the shared Edit Title component
Generated the changelog entry
parent
99b3ee82
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
54 additions
and
0 deletions
+54
-0
app/assets/javascripts/vue_shared/components/form/title.vue
app/assets/javascripts/vue_shared/components/form/title.vue
+15
-0
changelogs/unreleased/207236-snippet-edit-title.yml
changelogs/unreleased/207236-snippet-edit-title.yml
+5
-0
spec/frontend/vue_shared/components/form/__snapshots__/title_spec.js.snap
...e_shared/components/form/__snapshots__/title_spec.js.snap
+12
-0
spec/frontend/vue_shared/components/form/title_spec.js
spec/frontend/vue_shared/components/form/title_spec.js
+22
-0
No files found.
app/assets/javascripts/vue_shared/components/form/title.vue
0 → 100644
View file @
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
>
changelogs/unreleased/207236-snippet-edit-title.yml
0 → 100644
View file @
eecd70e3
---
title
:
Added Edit Title shared component
merge_request
:
27582
author
:
type
:
added
spec/frontend/vue_shared/components/form/__snapshots__/title_spec.js.snap
0 → 100644
View file @
eecd70e3
// 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>
`;
spec/frontend/vue_shared/components/form/title_spec.js
0 → 100644
View file @
eecd70e3
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
();
});
});
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment