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
Léo-Paul Géneau
gitlab-ce
Commits
08800944
Commit
08800944
authored
Jun 01, 2017
by
Alfredo Sumaran
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make GroupsStore.store method non-static
parent
76543bce
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
4 deletions
+6
-4
app/assets/javascripts/groups/stores/groups_store.js
app/assets/javascripts/groups/stores/groups_store.js
+3
-3
spec/javascripts/groups/group_item_spec.js
spec/javascripts/groups/group_item_spec.js
+3
-1
No files found.
app/assets/javascripts/groups/stores/groups_store.js
View file @
08800944
/* eslint-disable class-methods-use-this */
export
default
class
GroupsStore
{
constructor
()
{
this
.
state
=
{};
...
...
@@ -104,11 +103,11 @@ export default class GroupsStore {
}
decorateGroups
(
rawGroups
)
{
this
.
groups
=
rawGroups
.
map
(
GroupsStore
.
decorateGroup
);
this
.
groups
=
rawGroups
.
map
(
this
.
decorateGroup
);
return
this
.
groups
;
}
static
decorateGroup
(
rawGroup
)
{
decorateGroup
(
rawGroup
)
{
return
{
id
:
rawGroup
.
id
,
fullName
:
rawGroup
.
full_name
,
...
...
@@ -130,6 +129,7 @@ export default class GroupsStore {
};
}
// eslint-disable-next-line class-methods-use-this
static
toggleSubGroups
(
toggleGroup
)
{
const
group
=
toggleGroup
;
group
.
isOpen
=
!
group
.
isOpen
;
...
...
spec/javascripts/groups/group_item_spec.js
View file @
08800944
...
...
@@ -6,11 +6,13 @@ import { group1 } from './mock_data';
describe
(
'
Groups Component
'
,
()
=>
{
let
GroupItemComponent
;
let
component
;
let
store
;
let
group
;
beforeEach
((
done
)
=>
{
GroupItemComponent
=
Vue
.
extend
(
groupItemComponent
);
group
=
GroupsStore
.
decorateGroup
(
group1
);
store
=
new
GroupsStore
();
group
=
store
.
decorateGroup
(
group1
);
component
=
new
GroupItemComponent
({
propsData
:
{
...
...
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