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
370fac6a
Commit
370fac6a
authored
Dec 05, 2019
by
Tom Quirk
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Group design item_spec tests by presence of notes
In an effort to improve readability of this test
parent
6732ec11
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
42 additions
and
38 deletions
+42
-38
ee/spec/frontend/design_management/components/list/__snapshots__/item_spec.js.snap
...anagement/components/list/__snapshots__/item_spec.js.snap
+8
-8
ee/spec/frontend/design_management/components/list/item_spec.js
...c/frontend/design_management/components/list/item_spec.js
+34
-30
No files found.
ee/spec/frontend/design_management/components/list/__snapshots__/item_spec.js.snap
View file @
370fac6a
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`Design management list item component hides comment count 1`] = `
exports[`Design management list item component
with no notes
hides comment count 1`] = `
<router-link-stub
class="card cursor-pointer text-plain js-design-list-item design-list-item"
to="[object Object]"
...
...
@@ -49,7 +49,7 @@ exports[`Design management list item component hides comment count 1`] = `
</router-link-stub>
`;
exports[`Design management list item component renders item with correct status icon for creation event 1`] = `
exports[`Design management list item component
with no notes
renders item with correct status icon for creation event 1`] = `
<router-link-stub
class="card cursor-pointer text-plain js-design-list-item design-list-item"
to="[object Object]"
...
...
@@ -111,7 +111,7 @@ exports[`Design management list item component renders item with correct status
</router-link-stub>
`;
exports[`Design management list item component renders item with correct status icon for deletion event 1`] = `
exports[`Design management list item component
with no notes
renders item with correct status icon for deletion event 1`] = `
<router-link-stub
class="card cursor-pointer text-plain js-design-list-item design-list-item"
to="[object Object]"
...
...
@@ -173,7 +173,7 @@ exports[`Design management list item component renders item with correct status
</router-link-stub>
`;
exports[`Design management list item component renders item with correct status icon for modification event 1`] = `
exports[`Design management list item component
with no notes
renders item with correct status icon for modification event 1`] = `
<router-link-stub
class="card cursor-pointer text-plain js-design-list-item design-list-item"
to="[object Object]"
...
...
@@ -235,7 +235,7 @@ exports[`Design management list item component renders item with correct status
</router-link-stub>
`;
exports[`Design management list item component renders item with multiple comments 1`] = `
exports[`Design management list item component
with notes
renders item with multiple comments 1`] = `
<router-link-stub
class="card cursor-pointer text-plain js-design-list-item design-list-item"
to="[object Object]"
...
...
@@ -301,7 +301,7 @@ exports[`Design management list item component renders item with multiple commen
</router-link-stub>
`;
exports[`Design management list item component renders item with no status icon for none event 1`] = `
exports[`Design management list item component
with no notes
renders item with no status icon for none event 1`] = `
<router-link-stub
class="card cursor-pointer text-plain js-design-list-item design-list-item"
to="[object Object]"
...
...
@@ -350,7 +350,7 @@ exports[`Design management list item component renders item with no status icon
</router-link-stub>
`;
exports[`Design management list item component renders item with single comment 1`] = `
exports[`Design management list item component
with notes
renders item with single comment 1`] = `
<router-link-stub
class="card cursor-pointer text-plain js-design-list-item design-list-item"
to="[object Object]"
...
...
@@ -416,7 +416,7 @@ exports[`Design management list item component renders item with single comment
</router-link-stub>
`;
exports[`Design management list item component renders loading spinner when no image prop present 1`] = `
exports[`Design management list item component
with no notes
renders loading spinner when no image prop present 1`] = `
<router-link-stub
class="card cursor-pointer text-plain js-design-list-item design-list-item"
to="[object Object]"
...
...
ee/spec/frontend/design_management/components/list/item_spec.js
View file @
370fac6a
...
...
@@ -41,51 +41,55 @@ describe('Design management list item component', () => {
wrapper
.
destroy
();
});
it
(
'
renders item with single comment
'
,
()
=>
{
createComponent
();
describe
(
'
with notes
'
,
()
=>
{
it
(
'
renders item with single comment
'
,
()
=>
{
createComponent
();
expect
(
wrapper
.
element
).
toMatchSnapshot
();
});
expect
(
wrapper
.
element
).
toMatchSnapshot
();
});
it
(
'
renders item with multiple comments
'
,
()
=>
{
createComponent
({
notesCount
:
2
});
it
(
'
renders item with multiple comments
'
,
()
=>
{
createComponent
({
notesCount
:
2
});
expect
(
wrapper
.
element
).
toMatchSnapshot
();
expect
(
wrapper
.
element
).
toMatchSnapshot
();
});
});
it
(
'
hides comment count
'
,
()
=>
{
createComponent
({
notesCount
:
0
});
describe
(
'
with no notes
'
,
()
=>
{
it
(
'
hides comment count
'
,
()
=>
{
createComponent
({
notesCount
:
0
});
expect
(
wrapper
.
element
).
toMatchSnapshot
();
});
expect
(
wrapper
.
element
).
toMatchSnapshot
();
});
it
(
'
renders item with correct status icon for modification event
'
,
()
=>
{
createComponent
({
notesCount
:
0
,
event
:
DESIGN_VERSION_EVENT
.
MODIFICATION
});
it
(
'
renders item with correct status icon for modification event
'
,
()
=>
{
createComponent
({
notesCount
:
0
,
event
:
DESIGN_VERSION_EVENT
.
MODIFICATION
});
expect
(
wrapper
.
element
).
toMatchSnapshot
();
});
expect
(
wrapper
.
element
).
toMatchSnapshot
();
});
it
(
'
renders item with correct status icon for deletion event
'
,
()
=>
{
createComponent
({
notesCount
:
0
,
event
:
DESIGN_VERSION_EVENT
.
DELETION
});
it
(
'
renders item with correct status icon for deletion event
'
,
()
=>
{
createComponent
({
notesCount
:
0
,
event
:
DESIGN_VERSION_EVENT
.
DELETION
});
expect
(
wrapper
.
element
).
toMatchSnapshot
();
});
expect
(
wrapper
.
element
).
toMatchSnapshot
();
});
it
(
'
renders item with correct status icon for creation event
'
,
()
=>
{
createComponent
({
notesCount
:
0
,
event
:
DESIGN_VERSION_EVENT
.
CREATION
});
it
(
'
renders item with correct status icon for creation event
'
,
()
=>
{
createComponent
({
notesCount
:
0
,
event
:
DESIGN_VERSION_EVENT
.
CREATION
});
expect
(
wrapper
.
element
).
toMatchSnapshot
();
});
expect
(
wrapper
.
element
).
toMatchSnapshot
();
});
it
(
'
renders item with no status icon for none event
'
,
()
=>
{
createComponent
({
notesCount
:
0
});
it
(
'
renders item with no status icon for none event
'
,
()
=>
{
createComponent
({
notesCount
:
0
});
expect
(
wrapper
.
element
).
toMatchSnapshot
();
});
expect
(
wrapper
.
element
).
toMatchSnapshot
();
});
it
(
'
renders loading spinner when no image prop present
'
,
()
=>
{
createComponent
({
notesCount
:
0
,
isLoading
:
true
});
it
(
'
renders loading spinner when no image prop present
'
,
()
=>
{
createComponent
({
notesCount
:
0
,
isLoading
:
true
});
expect
(
wrapper
.
element
).
toMatchSnapshot
();
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