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
8fe7b1ad
Commit
8fe7b1ad
authored
Aug 26, 2020
by
Scott Stern
Committed by
Natalia Tepluhina
Aug 26, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update Slot syntax and specs for header_cell
parent
e6184680
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
25 deletions
+16
-25
ee/app/assets/javascripts/licenses/components/cells/header_cell.vue
...ets/javascripts/licenses/components/cells/header_cell.vue
+1
-1
ee/spec/frontend/licenses/components/cells/__snapshots__/header_cell_spec.js.snap
...s/components/cells/__snapshots__/header_cell_spec.js.snap
+0
-21
ee/spec/frontend/licenses/components/cells/header_cell_spec.js
...ec/frontend/licenses/components/cells/header_cell_spec.js
+15
-3
No files found.
ee/app/assets/javascripts/licenses/components/cells/header_cell.vue
View file @
8fe7b1ad
...
@@ -23,7 +23,7 @@ export default {
...
@@ -23,7 +23,7 @@ export default {
<
template
>
<
template
>
<cell
class=
"license-header-cell"
:is-flexible=
"false"
>
<cell
class=
"license-header-cell"
:is-flexible=
"false"
>
<template
slot=
"title"
>
<template
#title
>
<gl-icon
class=
"icon"
:name=
"icon"
/>
<gl-icon
class=
"icon"
:name=
"icon"
/>
<span
class=
"ml-2 font-weight-bold"
>
{{
title
}}
</span>
<span
class=
"ml-2 font-weight-bold"
>
{{
title
}}
</span>
</
template
>
</
template
>
...
...
ee/spec/frontend/licenses/components/cells/__snapshots__/header_cell_spec.js.snap
deleted
100644 → 0
View file @
e6184680
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`HeaderCell renders an inflexible cell with a title with an icon through props 1`] = `
<cell-stub
class="license-header-cell"
>
<template>
<gl-icon-stub
class="icon"
name="retry"
size="16"
/>
<span
class="ml-2 font-weight-bold"
>
title
</span>
</template>
</cell-stub>
`;
ee/spec/frontend/licenses/components/cells/header_cell_spec.js
View file @
8fe7b1ad
import
{
shallowMount
}
from
'
@vue/test-utils
'
;
import
{
shallowMount
}
from
'
@vue/test-utils
'
;
import
{
GlIcon
}
from
'
@gitlab/ui
'
;
import
Cell
from
'
ee/licenses/components/cells/cell.vue
'
;
import
{
HeaderCell
}
from
'
ee/licenses/components/cells
'
;
import
{
HeaderCell
}
from
'
ee/licenses/components/cells
'
;
describe
(
'
HeaderCell
'
,
()
=>
{
describe
(
'
HeaderCell
'
,
()
=>
{
...
@@ -10,16 +12,26 @@ describe('HeaderCell', () => {
...
@@ -10,16 +12,26 @@ describe('HeaderCell', () => {
title
:
'
title
'
,
title
:
'
title
'
,
icon
:
'
retry
'
,
icon
:
'
retry
'
,
},
},
stubs
:
{
Cell
,
},
});
});
}
}
beforeEach
(()
=>
{
createComponent
();
});
afterEach
(()
=>
{
afterEach
(()
=>
{
if
(
wrapper
)
wrapper
.
destroy
();
if
(
wrapper
)
wrapper
.
destroy
();
});
});
it
(
'
renders an inflexible cell with a title with an icon through props
'
,
()
=>
{
it
(
'
renders a cell with the correct "inflexible" value
'
,
()
=>
{
createComponent
();
expect
(
wrapper
.
find
(
Cell
).
props
(
'
isFlexible
'
)).
toBe
(
false
);
});
expect
(
wrapper
.
element
).
toMatchSnapshot
();
it
(
'
renders an icon and title
'
,
()
=>
{
expect
(
wrapper
.
find
(
GlIcon
).
props
(
'
name
'
)).
toBe
(
'
retry
'
);
expect
(
wrapper
.
find
(
Cell
).
text
()).
toContain
(
'
title
'
);
});
});
});
});
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