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
07b08ec2
Commit
07b08ec2
authored
May 21, 2021
by
Paul Slaughter
Committed by
Miguel Rincon
May 21, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add missing inheritAttrs: false
parent
b30db443
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
2 deletions
+14
-2
app/assets/javascripts/nav/components/top_nav_container_view.vue
...ets/javascripts/nav/components/top_nav_container_view.vue
+1
-0
spec/frontend/nav/components/top_nav_container_view_spec.js
spec/frontend/nav/components/top_nav_container_view_spec.js
+13
-2
No files found.
app/assets/javascripts/nav/components/top_nav_container_view.vue
View file @
07b08ec2
...
...
@@ -10,6 +10,7 @@ export default {
TopNavMenuItem
,
VuexModuleProvider
,
},
inheritAttrs
:
false
,
props
:
{
frequentItemsVuexModule
:
{
type
:
String
,
...
...
spec/frontend/nav/components/top_nav_container_view_spec.js
View file @
07b08ec2
...
...
@@ -23,13 +23,14 @@ const TEST_OTHER_PROPS = {
describe
(
'
~/nav/components/top_nav_container_view.vue
'
,
()
=>
{
let
wrapper
;
const
createComponent
=
(
props
=
{})
=>
{
const
createComponent
=
(
props
=
{}
,
options
=
{}
)
=>
{
wrapper
=
shallowMount
(
TopNavContainerView
,
{
propsData
:
{
...
DEFAULT_PROPS
,
...
TEST_OTHER_PROPS
,
...
props
,
},
...
options
,
});
};
...
...
@@ -44,6 +45,7 @@ describe('~/nav/components/top_nav_container_view.vue', () => {
return
{
vuexModule
:
parent
.
props
(
'
vuexModule
'
),
props
:
parent
.
findComponent
(
FrequentItemsApp
).
props
(),
attributes
:
parent
.
findComponent
(
FrequentItemsApp
).
attributes
(),
};
};
...
...
@@ -67,14 +69,23 @@ describe('~/nav/components/top_nav_container_view.vue', () => {
);
describe
(
'
default
'
,
()
=>
{
const
EXTRA_ATTRS
=
{
'
data-test-attribute
'
:
'
foo
'
};
beforeEach
(()
=>
{
createComponent
();
createComponent
({},
{
attrs
:
EXTRA_ATTRS
});
});
it
(
'
does not inherit extra attrs
'
,
()
=>
{
expect
(
wrapper
.
attributes
()).
toEqual
({
class
:
expect
.
any
(
String
),
});
});
it
(
'
renders frequent items app
'
,
()
=>
{
expect
(
findFrequentItemsApp
()).
toEqual
({
vuexModule
:
DEFAULT_PROPS
.
frequentItemsVuexModule
,
props
:
TEST_OTHER_PROPS
,
attributes
:
expect
.
objectContaining
(
EXTRA_ATTRS
),
});
});
...
...
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