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
7148226e
Commit
7148226e
authored
Nov 27, 2019
by
Tom Quirk
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add test for design item loading state
parent
399964b6
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
56 additions
and
2 deletions
+56
-2
ee/spec/frontend/design_management/components/list/__snapshots__/item_spec.js.snap
...anagement/components/list/__snapshots__/item_spec.js.snap
+48
-0
ee/spec/frontend/design_management/components/list/item_spec.js
...c/frontend/design_management/components/list/item_spec.js
+8
-2
No files found.
ee/spec/frontend/design_management/components/list/__snapshots__/item_spec.js.snap
View file @
7148226e
...
@@ -415,3 +415,51 @@ exports[`Design management list item component renders item with single comment
...
@@ -415,3 +415,51 @@ exports[`Design management list item component renders item with single comment
</div>
</div>
</router-link-stub>
</router-link-stub>
`;
`;
exports[`Design management list item component 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]"
>
<div
class="card-body p-0 d-flex-center overflow-hidden position-relative"
>
<!---->
<glloadingicon-stub
color="orange"
label="Loading"
size="md"
/>
</div>
<div
class="card-footer d-flex w-100"
>
<div
class="d-flex flex-column str-truncated-100"
>
<span
class="bold str-truncated-100"
data-qa-selector="design_file_name"
>
test
</span>
<span
class="str-truncated-100"
>
Updated
<timeago-stub
cssclass=""
time="01-01-2019"
tooltipplacement="bottom"
/>
</span>
</div>
<!---->
</div>
</router-link-stub>
`;
ee/spec/frontend/design_management/components/list/item_spec.js
View file @
7148226e
...
@@ -9,7 +9,7 @@ const router = new VueRouter();
...
@@ -9,7 +9,7 @@ const router = new VueRouter();
describe
(
'
Design management list item component
'
,
()
=>
{
describe
(
'
Design management list item component
'
,
()
=>
{
let
wrapper
;
let
wrapper
;
function
createComponent
(
notesCount
=
1
,
event
=
'
NONE
'
)
{
function
createComponent
(
notesCount
=
1
,
event
=
'
NONE
'
,
isLoading
=
false
)
{
wrapper
=
shallowMount
(
Item
,
{
wrapper
=
shallowMount
(
Item
,
{
sync
:
false
,
sync
:
false
,
localVue
,
localVue
,
...
@@ -17,7 +17,7 @@ describe('Design management list item component', () => {
...
@@ -17,7 +17,7 @@ describe('Design management list item component', () => {
propsData
:
{
propsData
:
{
id
:
1
,
id
:
1
,
filename
:
'
test
'
,
filename
:
'
test
'
,
image
:
'
http://via.placeholder.com/300
'
,
image
:
isLoading
?
''
:
'
http://via.placeholder.com/300
'
,
event
,
event
,
notesCount
,
notesCount
,
updatedAt
:
'
01-01-2019
'
,
updatedAt
:
'
01-01-2019
'
,
...
@@ -71,4 +71,10 @@ describe('Design management list item component', () => {
...
@@ -71,4 +71,10 @@ describe('Design management list item component', () => {
expect
(
wrapper
.
element
).
toMatchSnapshot
();
expect
(
wrapper
.
element
).
toMatchSnapshot
();
});
});
it
(
'
renders loading spinner when no image prop present
'
,
()
=>
{
createComponent
(
0
,
'
NONE
'
,
true
);
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