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
8df33720
Commit
8df33720
authored
May 08, 2017
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed JS tests
parent
a2ec4c67
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
71 deletions
+2
-71
app/assets/javascripts/boards/models/assignee.js
app/assets/javascripts/boards/models/assignee.js
+2
-2
spec/javascripts/boards/issue_card_spec.js
spec/javascripts/boards/issue_card_spec.js
+0
-69
No files found.
app/assets/javascripts/boards/models/assignee.js
View file @
8df33720
/* eslint-disable no-unused-vars */
/* eslint-disable no-unused-vars */
class
ListAssignee
{
class
ListAssignee
{
constructor
(
user
)
{
constructor
(
user
,
defaultAvatar
)
{
this
.
id
=
user
.
id
;
this
.
id
=
user
.
id
;
this
.
name
=
user
.
name
;
this
.
name
=
user
.
name
;
this
.
username
=
user
.
username
;
this
.
username
=
user
.
username
;
this
.
avatar
=
user
.
avatar_url
;
this
.
avatar
=
user
.
avatar_url
||
defaultAvatar
;
}
}
}
}
...
...
spec/javascripts/boards/issue_card_spec.js
View file @
8df33720
...
@@ -237,75 +237,6 @@ describe('Issue card component', () => {
...
@@ -237,75 +237,6 @@ describe('Issue card component', () => {
});
});
});
});
describe
(
'
multiple assignees
'
,
()
=>
{
beforeEach
((
done
)
=>
{
component
.
issue
.
assignees
=
[
user
,
new
ListAssignee
({
id
:
2
,
name
:
'
user2
'
,
username
:
'
user2
'
,
avatar
:
'
test_image
'
,
}),
new
ListAssignee
({
id
:
3
,
name
:
'
user3
'
,
username
:
'
user3
'
,
avatar
:
'
test_image
'
,
}),
new
ListAssignee
({
id
:
4
,
name
:
'
user4
'
,
username
:
'
user4
'
,
avatar
:
'
test_image
'
,
})];
Vue
.
nextTick
(()
=>
done
());
});
it
(
'
renders all four assignees
'
,
()
=>
{
expect
(
component
.
$el
.
querySelectorAll
(
'
.card-assignee .avatar
'
).
length
).
toEqual
(
4
);
});
describe
(
'
more than four assignees
'
,
()
=>
{
beforeEach
((
done
)
=>
{
component
.
issue
.
assignees
.
push
(
new
ListAssignee
({
id
:
5
,
name
:
'
user5
'
,
username
:
'
user5
'
,
avatar
:
'
test_image
'
,
}));
Vue
.
nextTick
(()
=>
done
());
});
it
(
'
renders more avatar counter
'
,
()
=>
{
expect
(
component
.
$el
.
querySelector
(
'
.card-assignee .avatar-counter
'
).
innerText
).
toEqual
(
'
+2
'
);
});
it
(
'
renders three assignees
'
,
()
=>
{
expect
(
component
.
$el
.
querySelectorAll
(
'
.card-assignee .avatar
'
).
length
).
toEqual
(
3
);
});
it
(
'
renders 99+ avatar counter
'
,
(
done
)
=>
{
for
(
let
i
=
5
;
i
<
104
;
i
+=
1
)
{
const
u
=
new
ListAssignee
({
id
:
i
,
name
:
'
name
'
,
username
:
'
username
'
,
avatar
:
'
test_image
'
,
});
component
.
issue
.
assignees
.
push
(
u
);
}
Vue
.
nextTick
(()
=>
{
expect
(
component
.
$el
.
querySelector
(
'
.card-assignee .avatar-counter
'
).
innerText
).
toEqual
(
'
99+
'
);
done
();
});
});
});
});
describe
(
'
labels
'
,
()
=>
{
describe
(
'
labels
'
,
()
=>
{
it
(
'
does not render any
'
,
()
=>
{
it
(
'
does not render any
'
,
()
=>
{
expect
(
expect
(
...
...
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