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
0
Merge Requests
0
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
Boxiang Sun
gitlab-ce
Commits
41203686
Commit
41203686
authored
May 30, 2017
by
Alfredo Sumaran
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix tests and eslint errors
[ci skip]
parent
0b594f68
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
16 additions
and
2 deletions
+16
-2
app/assets/javascripts/groups/services/groups_service.js
app/assets/javascripts/groups/services/groups_service.js
+2
-0
spec/javascripts/groups/group_item_spec.js
spec/javascripts/groups/group_item_spec.js
+1
-1
spec/javascripts/groups/groups_spec.js
spec/javascripts/groups/groups_spec.js
+1
-1
spec/javascripts/groups/mock_data.js
spec/javascripts/groups/mock_data.js
+12
-0
No files found.
app/assets/javascripts/groups/services/groups_service.js
View file @
41203686
/* eslint-disable class-methods-use-this */
import
Vue
from
'
vue
'
;
import
Vue
from
'
vue
'
;
import
VueResource
from
'
vue-resource
'
;
import
VueResource
from
'
vue-resource
'
;
...
...
spec/javascripts/groups/group_item_spec.js
View file @
41203686
...
@@ -26,7 +26,7 @@ describe('Groups Component', () => {
...
@@ -26,7 +26,7 @@ describe('Groups Component', () => {
it
(
'
should render the group item
'
,
()
=>
{
it
(
'
should render the group item
'
,
()
=>
{
expect
(
component
.
$el
.
classList
.
contains
(
'
group-row
'
)).
toBe
(
true
);
expect
(
component
.
$el
.
classList
.
contains
(
'
group-row
'
)).
toBe
(
true
);
expect
(
component
.
$el
.
querySelector
(
'
.number-projects
'
).
textContent
).
toContain
(
group
.
numberProjects
);
expect
(
component
.
$el
.
querySelector
(
'
.number-projects
'
).
textContent
).
toContain
(
group
.
numberProjects
);
expect
(
component
.
$el
.
querySelector
(
'
.number-
members
'
).
textContent
).
toContain
(
group
.
numberMemb
ers
);
expect
(
component
.
$el
.
querySelector
(
'
.number-
users
'
).
textContent
).
toContain
(
group
.
numberUs
ers
);
expect
(
component
.
$el
.
querySelector
(
'
.group-visibility
'
)).
toBeDefined
();
expect
(
component
.
$el
.
querySelector
(
'
.group-visibility
'
)).
toBeDefined
();
expect
(
component
.
$el
.
querySelector
(
'
.avatar-container
'
)).
toBeDefined
();
expect
(
component
.
$el
.
querySelector
(
'
.avatar-container
'
)).
toBeDefined
();
expect
(
component
.
$el
.
querySelector
(
'
.title
'
).
textContent
).
toContain
(
group
.
name
);
expect
(
component
.
$el
.
querySelector
(
'
.title
'
).
textContent
).
toContain
(
group
.
name
);
...
...
spec/javascripts/groups/groups_spec.js
View file @
41203686
...
@@ -48,7 +48,7 @@ describe('Groups Component', () => {
...
@@ -48,7 +48,7 @@ describe('Groups Component', () => {
expect
(
lists
.
length
).
toBe
(
3
);
// one parent and two subgroups
expect
(
lists
.
length
).
toBe
(
3
);
// one parent and two subgroups
expect
(
lists
[
0
].
querySelector
(
'
#group-1119
'
).
classList
.
contains
(
'
is-open
'
)).
toBe
(
true
);
expect
(
lists
[
0
].
querySelector
(
'
#group-1119
'
).
classList
.
contains
(
'
is-open
'
)).
toBe
(
true
);
expect
(
lists
[
0
].
querySelector
(
'
#group-1119
'
).
classList
.
contains
(
'
is-expandable
'
)).
toBe
(
true
);
expect
(
lists
[
0
].
querySelector
(
'
#group-1119
'
).
classList
.
contains
(
'
has-subgroups
'
)).
toBe
(
true
);
expect
(
lists
[
2
].
querySelector
(
'
#group-1120
'
).
textContent
).
toContain
(
groups
[
1119
].
subGroups
[
1120
].
name
);
expect
(
lists
[
2
].
querySelector
(
'
#group-1120
'
).
textContent
).
toContain
(
groups
[
1119
].
subGroups
[
1120
].
name
);
});
});
...
...
spec/javascripts/groups/mock_data.js
View file @
41203686
...
@@ -11,6 +11,9 @@ const group1 = {
...
@@ -11,6 +11,9 @@ const group1 = {
parent_id
:
null
,
parent_id
:
null
,
created_at
:
'
2017-05-15T19:01:23.670Z
'
,
created_at
:
'
2017-05-15T19:01:23.670Z
'
,
updated_at
:
'
2017-05-15T19:01:23.670Z
'
,
updated_at
:
'
2017-05-15T19:01:23.670Z
'
,
number_projects
:
'
1
'
,
number_users
:
'
1
'
,
has_subgroups
:
true
,
permissions
:
{
permissions
:
{
group_access
:
50
,
group_access
:
50
,
},
},
...
@@ -30,6 +33,9 @@ const group14 = {
...
@@ -30,6 +33,9 @@ const group14 = {
parent_id
:
1127
,
parent_id
:
1127
,
created_at
:
'
2017-05-15T19:02:01.645Z
'
,
created_at
:
'
2017-05-15T19:02:01.645Z
'
,
updated_at
:
'
2017-05-15T19:02:01.645Z
'
,
updated_at
:
'
2017-05-15T19:02:01.645Z
'
,
number_projects
:
'
1
'
,
number_users
:
'
1
'
,
has_subgroups
:
true
,
permissions
:
{
permissions
:
{
group_access
:
30
,
group_access
:
30
,
},
},
...
@@ -48,6 +54,9 @@ const group2 = {
...
@@ -48,6 +54,9 @@ const group2 = {
parent_id
:
null
,
parent_id
:
null
,
created_at
:
'
2017-05-11T19:35:09.635Z
'
,
created_at
:
'
2017-05-11T19:35:09.635Z
'
,
updated_at
:
'
2017-05-11T19:35:09.635Z
'
,
updated_at
:
'
2017-05-11T19:35:09.635Z
'
,
number_projects
:
'
1
'
,
number_users
:
'
1
'
,
has_subgroups
:
true
,
permissions
:
{
permissions
:
{
group_access
:
50
,
group_access
:
50
,
},
},
...
@@ -66,6 +75,9 @@ const group21 = {
...
@@ -66,6 +75,9 @@ const group21 = {
parent_id
:
1119
,
parent_id
:
1119
,
created_at
:
'
2017-05-11T19:51:04.060Z
'
,
created_at
:
'
2017-05-11T19:51:04.060Z
'
,
updated_at
:
'
2017-05-11T19:51:04.060Z
'
,
updated_at
:
'
2017-05-11T19:51:04.060Z
'
,
number_projects
:
'
1
'
,
number_users
:
'
1
'
,
has_subgroups
:
true
,
permissions
:
{
permissions
:
{
group_access
:
50
,
group_access
:
50
,
},
},
...
...
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