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
f5c27935
Commit
f5c27935
authored
Apr 13, 2020
by
Denys Mishunov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added form footer actions component
parent
bfe74afe
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
36 additions
and
0 deletions
+36
-0
app/assets/javascripts/vue_shared/components/form/form_footer_actions.vue
...cripts/vue_shared/components/form/form_footer_actions.vue
+7
-0
spec/frontend/vue_shared/components/form/form_footer_actions_spec.js
...nd/vue_shared/components/form/form_footer_actions_spec.js
+29
-0
No files found.
app/assets/javascripts/vue_shared/components/form/form_footer_actions.vue
0 → 100644
View file @
f5c27935
<
template
functional
>
<footer
class=
"form-actions d-flex justify-content-between"
>
<div><slot
name=
"prepend"
></slot></div>
<div><slot></slot></div>
<div><slot
name=
"append"
></slot></div>
</footer>
</
template
>
spec/frontend/vue_shared/components/form/form_footer_actions_spec.js
0 → 100644
View file @
f5c27935
import
FormFooterActions
from
'
~/vue_shared/components/form/form_footer_actions.vue
'
;
import
{
shallowMount
}
from
'
@vue/test-utils
'
;
describe
(
'
Form Footer Actions
'
,
()
=>
{
let
wrapper
;
function
createComponent
(
slots
=
{})
{
wrapper
=
shallowMount
(
FormFooterActions
,
{
slots
,
});
}
afterEach
(()
=>
{
wrapper
.
destroy
();
});
it
(
'
renders content properly
'
,
()
=>
{
const
defaultSlot
=
'
Foo
'
;
const
prepend
=
'
Bar
'
;
const
append
=
'
Abrakadabra
'
;
createComponent
({
default
:
defaultSlot
,
prepend
,
append
,
});
expect
(
wrapper
.
text
().
replace
(
/
\s
+/g
,
''
)).
toBe
(
`
${
prepend
}${
defaultSlot
}${
append
}
`
);
});
});
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