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
6736efc4
Commit
6736efc4
authored
Apr 02, 2018
by
Filipa Lacerda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removes eslint disabled comments
parent
3715a495
Changes
7
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
980 additions
and
899 deletions
+980
-899
spec/javascripts/boards/mock_data.js
spec/javascripts/boards/mock_data.js
+29
-27
spec/javascripts/droplab/constants_spec.js
spec/javascripts/droplab/constants_spec.js
+7
-9
spec/javascripts/notes/mock_data.js
spec/javascripts/notes/mock_data.js
+451
-412
spec/javascripts/pipelines/graph/mock_data.js
spec/javascripts/pipelines/graph/mock_data.js
+248
-219
spec/javascripts/sidebar/mock_data.js
spec/javascripts/sidebar/mock_data.js
+35
-24
spec/javascripts/vue_mr_widget/mock_data.js
spec/javascripts/vue_mr_widget/mock_data.js
+210
-206
spec/javascripts/vue_shared/components/mock_data.js
spec/javascripts/vue_shared/components/mock_data.js
+0
-2
No files found.
spec/javascripts/boards/mock_data.js
View file @
6736efc4
/* global BoardService */
/* global BoardService */
/* eslint-disable comma-dangle, no-unused-vars, quote-props */
import
_
from
'
underscore
'
;
export
const
boardObj
=
{
export
const
boardObj
=
{
id
:
1
,
id
:
1
,
...
@@ -17,8 +15,8 @@ export const listObj = {
...
@@ -17,8 +15,8 @@ export const listObj = {
id
:
5000
,
id
:
5000
,
title
:
'
Testing
'
,
title
:
'
Testing
'
,
color
:
'
red
'
,
color
:
'
red
'
,
description
:
'
testing;
'
description
:
'
testing;
'
,
}
}
,
};
};
export
const
listObjDuplicate
=
{
export
const
listObjDuplicate
=
{
...
@@ -30,39 +28,43 @@ export const listObjDuplicate = {
...
@@ -30,39 +28,43 @@ export const listObjDuplicate = {
id
:
listObj
.
label
.
id
,
id
:
listObj
.
label
.
id
,
title
:
'
Testing
'
,
title
:
'
Testing
'
,
color
:
'
red
'
,
color
:
'
red
'
,
description
:
'
testing;
'
description
:
'
testing;
'
,
}
}
,
};
};
export
const
BoardsMockData
=
{
export
const
BoardsMockData
=
{
'
GET
'
:
{
GET
:
{
'
/test/-/boards/1/lists/300/issues?id=300&page=1&=
'
:
{
'
/test/-/boards/1/lists/300/issues?id=300&page=1&=
'
:
{
issues
:
[{
issues
:
[
{
title
:
'
Testing
'
,
title
:
'
Testing
'
,
id
:
1
,
id
:
1
,
iid
:
1
,
iid
:
1
,
confidential
:
false
,
confidential
:
false
,
labels
:
[],
labels
:
[],
assignees
:
[],
assignees
:
[],
}],
},
},
'
/test/issue-boards/milestones.json
'
:
[{
],
},
'
/test/issue-boards/milestones.json
'
:
[
{
id
:
1
,
id
:
1
,
title
:
'
test
'
,
title
:
'
test
'
,
}],
},
},
'
POST
'
:
{
],
'
/test/-/boards/1/lists
'
:
listObj
},
POST
:
{
'
/test/-/boards/1/lists
'
:
listObj
,
},
PUT
:
{
'
/test/issue-boards/board/1/lists{/id}
'
:
{},
},
},
'
PUT
'
:
{
DELETE
:
{
'
/test/issue-boards/board/1/lists{/id}
'
:
{}
'
/test/issue-boards/board/1/lists{/id}
'
:
{}
,
},
},
'
DELETE
'
:
{
'
/test/issue-boards/board/1/lists{/id}
'
:
{}
}
};
};
export
const
boardsMockInterceptor
=
(
config
)
=>
{
export
const
boardsMockInterceptor
=
config
=>
{
const
body
=
BoardsMockData
[
config
.
method
.
toUpperCase
()][
config
.
url
];
const
body
=
BoardsMockData
[
config
.
method
.
toUpperCase
()][
config
.
url
];
return
[
200
,
body
];
return
[
200
,
body
];
};
};
...
...
spec/javascripts/droplab/constants_spec.js
View file @
6736efc4
/* eslint-disable */
import
*
as
constants
from
'
~/droplab/constants
'
;
import
*
as
constants
from
'
~/droplab/constants
'
;
describe
(
'
constants
'
,
function
()
{
describe
(
'
constants
'
,
function
()
{
describe
(
'
DATA_TRIGGER
'
,
function
()
{
describe
(
'
DATA_TRIGGER
'
,
function
()
{
it
(
'
should be `data-dropdown-trigger`
'
,
function
()
{
it
(
'
should be `data-dropdown-trigger`
'
,
function
()
{
expect
(
constants
.
DATA_TRIGGER
).
toBe
(
'
data-dropdown-trigger
'
);
expect
(
constants
.
DATA_TRIGGER
).
toBe
(
'
data-dropdown-trigger
'
);
});
});
});
});
describe
(
'
DATA_DROPDOWN
'
,
function
()
{
describe
(
'
DATA_DROPDOWN
'
,
function
()
{
it
(
'
should be `data-dropdown`
'
,
function
()
{
it
(
'
should be `data-dropdown`
'
,
function
()
{
expect
(
constants
.
DATA_DROPDOWN
).
toBe
(
'
data-dropdown
'
);
expect
(
constants
.
DATA_DROPDOWN
).
toBe
(
'
data-dropdown
'
);
});
});
});
});
describe
(
'
SELECTED_CLASS
'
,
function
()
{
describe
(
'
SELECTED_CLASS
'
,
function
()
{
it
(
'
should be `droplab-item-selected`
'
,
function
()
{
it
(
'
should be `droplab-item-selected`
'
,
function
()
{
expect
(
constants
.
SELECTED_CLASS
).
toBe
(
'
droplab-item-selected
'
);
expect
(
constants
.
SELECTED_CLASS
).
toBe
(
'
droplab-item-selected
'
);
});
});
});
});
describe
(
'
ACTIVE_CLASS
'
,
function
()
{
describe
(
'
ACTIVE_CLASS
'
,
function
()
{
it
(
'
should be `droplab-item-active`
'
,
function
()
{
it
(
'
should be `droplab-item-active`
'
,
function
()
{
expect
(
constants
.
ACTIVE_CLASS
).
toBe
(
'
droplab-item-active
'
);
expect
(
constants
.
ACTIVE_CLASS
).
toBe
(
'
droplab-item-active
'
);
});
});
});
});
describe
(
'
TEMPLATE_REGEX
'
,
function
()
{
describe
(
'
TEMPLATE_REGEX
'
,
function
()
{
it
(
'
should be a handlebars templating syntax regex
'
,
function
()
{
it
(
'
should be a handlebars templating syntax regex
'
,
function
()
{
expect
(
constants
.
TEMPLATE_REGEX
).
toEqual
(
/
\{\{(
.+
?)\}\}
/g
);
expect
(
constants
.
TEMPLATE_REGEX
).
toEqual
(
/
\{\{(
.+
?)\}\}
/g
);
});
});
});
});
describe
(
'
IGNORE_CLASS
'
,
function
()
{
describe
(
'
IGNORE_CLASS
'
,
function
()
{
it
(
'
should be `droplab-item-ignore`
'
,
function
()
{
it
(
'
should be `droplab-item-ignore`
'
,
function
()
{
expect
(
constants
.
IGNORE_CLASS
).
toBe
(
'
droplab-item-ignore
'
);
expect
(
constants
.
IGNORE_CLASS
).
toBe
(
'
droplab-item-ignore
'
);
});
});
...
...
spec/javascripts/notes/mock_data.js
View file @
6736efc4
This diff is collapsed.
Click to expand it.
spec/javascripts/pipelines/graph/mock_data.js
View file @
6736efc4
This diff is collapsed.
Click to expand it.
spec/javascripts/sidebar/mock_data.js
View file @
6736efc4
/* eslint-disable quote-props*/
const
RESPONSE_MAP
=
{
const
RESPONSE_MAP
=
{
'
GET
'
:
{
GET
:
{
'
/gitlab-org/gitlab-shell/issues/5.json
'
:
{
'
/gitlab-org/gitlab-shell/issues/5.json
'
:
{
id
:
45
,
id
:
45
,
iid
:
5
,
iid
:
5
,
...
@@ -27,7 +25,8 @@ const RESPONSE_MAP = {
...
@@ -27,7 +25,8 @@ const RESPONSE_MAP = {
username
:
'
user0
'
,
username
:
'
user0
'
,
id
:
22
,
id
:
22
,
state
:
'
active
'
,
state
:
'
active
'
,
avatar_url
:
'
https://www.gravatar.com/avatar/52e4ce24a915fb7e51e1ad3b57f4b00a?s=80
\
u0026d=identicon
'
,
avatar_url
:
'
https://www.gravatar.com/avatar/52e4ce24a915fb7e51e1ad3b57f4b00a?s=80
\
u0026d=identicon
'
,
web_url
:
'
http: //localhost:3001/user0
'
,
web_url
:
'
http: //localhost:3001/user0
'
,
},
},
{
{
...
@@ -35,7 +34,8 @@ const RESPONSE_MAP = {
...
@@ -35,7 +34,8 @@ const RESPONSE_MAP = {
username
:
'
tajuana
'
,
username
:
'
tajuana
'
,
id
:
18
,
id
:
18
,
state
:
'
active
'
,
state
:
'
active
'
,
avatar_url
:
'
https://www.gravatar.com/avatar/4852a41fb41616bf8f140d3701673f53?s=80
\
u0026d=identicon
'
,
avatar_url
:
'
https://www.gravatar.com/avatar/4852a41fb41616bf8f140d3701673f53?s=80
\
u0026d=identicon
'
,
web_url
:
'
http: //localhost:3001/tajuana
'
,
web_url
:
'
http: //localhost:3001/tajuana
'
,
},
},
{
{
...
@@ -43,7 +43,8 @@ const RESPONSE_MAP = {
...
@@ -43,7 +43,8 @@ const RESPONSE_MAP = {
username
:
'
michaele.will
'
,
username
:
'
michaele.will
'
,
id
:
16
,
id
:
16
,
state
:
'
active
'
,
state
:
'
active
'
,
avatar_url
:
'
https://www.gravatar.com/avatar/e301827eb03be955c9c172cb9a8e4e8a?s=80
\
u0026d=identicon
'
,
avatar_url
:
'
https://www.gravatar.com/avatar/e301827eb03be955c9c172cb9a8e4e8a?s=80
\
u0026d=identicon
'
,
web_url
:
'
http: //localhost:3001/michaele.will
'
,
web_url
:
'
http: //localhost:3001/michaele.will
'
,
},
},
],
],
...
@@ -72,7 +73,8 @@ const RESPONSE_MAP = {
...
@@ -72,7 +73,8 @@ const RESPONSE_MAP = {
username
:
'
user0
'
,
username
:
'
user0
'
,
id
:
22
,
id
:
22
,
state
:
'
active
'
,
state
:
'
active
'
,
avatar_url
:
'
https://www.gravatar.com/avatar/52e4ce24a915fb7e51e1ad3b57f4b00a?s=80
\
u0026d=identicon
'
,
avatar_url
:
'
https://www.gravatar.com/avatar/52e4ce24a915fb7e51e1ad3b57f4b00a?s=80
\
u0026d=identicon
'
,
web_url
:
'
http://localhost:3001/user0
'
,
web_url
:
'
http://localhost:3001/user0
'
,
},
},
{
{
...
@@ -80,7 +82,8 @@ const RESPONSE_MAP = {
...
@@ -80,7 +82,8 @@ const RESPONSE_MAP = {
username
:
'
tajuana
'
,
username
:
'
tajuana
'
,
id
:
18
,
id
:
18
,
state
:
'
active
'
,
state
:
'
active
'
,
avatar_url
:
'
https://www.gravatar.com/avatar/4852a41fb41616bf8f140d3701673f53?s=80
\
u0026d=identicon
'
,
avatar_url
:
'
https://www.gravatar.com/avatar/4852a41fb41616bf8f140d3701673f53?s=80
\
u0026d=identicon
'
,
web_url
:
'
http://localhost:3001/tajuana
'
,
web_url
:
'
http://localhost:3001/tajuana
'
,
},
},
{
{
...
@@ -88,7 +91,8 @@ const RESPONSE_MAP = {
...
@@ -88,7 +91,8 @@ const RESPONSE_MAP = {
username
:
'
michaele.will
'
,
username
:
'
michaele.will
'
,
id
:
16
,
id
:
16
,
state
:
'
active
'
,
state
:
'
active
'
,
avatar_url
:
'
https://www.gravatar.com/avatar/e301827eb03be955c9c172cb9a8e4e8a?s=80
\
u0026d=identicon
'
,
avatar_url
:
'
https://www.gravatar.com/avatar/e301827eb03be955c9c172cb9a8e4e8a?s=80
\
u0026d=identicon
'
,
web_url
:
'
http://localhost:3001/michaele.will
'
,
web_url
:
'
http://localhost:3001/michaele.will
'
,
},
},
],
],
...
@@ -100,7 +104,8 @@ const RESPONSE_MAP = {
...
@@ -100,7 +104,8 @@ const RESPONSE_MAP = {
username
:
'
user0
'
,
username
:
'
user0
'
,
id
:
22
,
id
:
22
,
state
:
'
active
'
,
state
:
'
active
'
,
avatar_url
:
'
https://www.gravatar.com/avatar/52e4ce24a915fb7e51e1ad3b57f4b00a?s=80
\
u0026d=identicon
'
,
avatar_url
:
'
https://www.gravatar.com/avatar/52e4ce24a915fb7e51e1ad3b57f4b00a?s=80
\
u0026d=identicon
'
,
web_url
:
'
http://localhost:3001/user0
'
,
web_url
:
'
http://localhost:3001/user0
'
,
},
},
{
{
...
@@ -108,7 +113,8 @@ const RESPONSE_MAP = {
...
@@ -108,7 +113,8 @@ const RESPONSE_MAP = {
username
:
'
tajuana
'
,
username
:
'
tajuana
'
,
id
:
18
,
id
:
18
,
state
:
'
active
'
,
state
:
'
active
'
,
avatar_url
:
'
https://www.gravatar.com/avatar/4852a41fb41616bf8f140d3701673f53?s=80
\
u0026d=identicon
'
,
avatar_url
:
'
https://www.gravatar.com/avatar/4852a41fb41616bf8f140d3701673f53?s=80
\
u0026d=identicon
'
,
web_url
:
'
http://localhost:3001/tajuana
'
,
web_url
:
'
http://localhost:3001/tajuana
'
,
},
},
{
{
...
@@ -116,7 +122,8 @@ const RESPONSE_MAP = {
...
@@ -116,7 +122,8 @@ const RESPONSE_MAP = {
username
:
'
michaele.will
'
,
username
:
'
michaele.will
'
,
id
:
16
,
id
:
16
,
state
:
'
active
'
,
state
:
'
active
'
,
avatar_url
:
'
https://www.gravatar.com/avatar/e301827eb03be955c9c172cb9a8e4e8a?s=80
\
u0026d=identicon
'
,
avatar_url
:
'
https://www.gravatar.com/avatar/e301827eb03be955c9c172cb9a8e4e8a?s=80
\
u0026d=identicon
'
,
web_url
:
'
http://localhost:3001/michaele.will
'
,
web_url
:
'
http://localhost:3001/michaele.will
'
,
},
},
],
],
...
@@ -126,20 +133,21 @@ const RESPONSE_MAP = {
...
@@ -126,20 +133,21 @@ const RESPONSE_MAP = {
},
},
'
/autocomplete/projects?project_id=15
'
:
[
'
/autocomplete/projects?project_id=15
'
:
[
{
{
'
id
'
:
0
,
id
:
0
,
'
name_with_namespace
'
:
'
No project
'
,
name_with_namespace
:
'
No project
'
,
},
{
},
'
id
'
:
20
,
{
'
name_with_namespace
'
:
'
foo / bar
'
,
id
:
20
,
name_with_namespace
:
'
foo / bar
'
,
},
},
],
],
},
},
'
PUT
'
:
{
PUT
:
{
'
/gitlab-org/gitlab-shell/issues/5.json
'
:
{
'
/gitlab-org/gitlab-shell/issues/5.json
'
:
{
data
:
{},
data
:
{},
},
},
},
},
'
POST
'
:
{
POST
:
{
'
/gitlab-org/gitlab-shell/issues/5/move
'
:
{
'
/gitlab-org/gitlab-shell/issues/5/move
'
:
{
id
:
123
,
id
:
123
,
iid
:
5
,
iid
:
5
,
...
@@ -182,7 +190,8 @@ const mockData = {
...
@@ -182,7 +190,8 @@ const mockData = {
id
:
1
,
id
:
1
,
name
:
'
Administrator
'
,
name
:
'
Administrator
'
,
username
:
'
root
'
,
username
:
'
root
'
,
avatar_url
:
'
https://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon
'
,
avatar_url
:
'
https://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon
'
,
},
},
rootPath
:
'
/
'
,
rootPath
:
'
/
'
,
fullPath
:
'
/gitlab-org/gitlab-shell
'
,
fullPath
:
'
/gitlab-org/gitlab-shell
'
,
...
@@ -201,12 +210,14 @@ const mockData = {
...
@@ -201,12 +210,14 @@ const mockData = {
},
},
};
};
mockData
.
sidebarMockInterceptor
=
function
(
request
,
next
)
{
mockData
.
sidebarMockInterceptor
=
function
(
request
,
next
)
{
const
body
=
this
.
responseMap
[
request
.
method
.
toUpperCase
()][
request
.
url
];
const
body
=
this
.
responseMap
[
request
.
method
.
toUpperCase
()][
request
.
url
];
next
(
request
.
respondWith
(
JSON
.
stringify
(
body
),
{
next
(
request
.
respondWith
(
JSON
.
stringify
(
body
),
{
status
:
200
,
status
:
200
,
}));
}),
);
}.
bind
(
mockData
);
}.
bind
(
mockData
);
export
default
mockData
;
export
default
mockData
;
spec/javascripts/vue_mr_widget/mock_data.js
View file @
6736efc4
This diff is collapsed.
Click to expand it.
spec/javascripts/vue_shared/components/mock_data.js
View file @
6736efc4
/* eslint-disable */
export
const
mockMetrics
=
[
export
const
mockMetrics
=
[
[
1493716685
,
'
4.30859375
'
],
[
1493716685
,
'
4.30859375
'
],
[
1493716745
,
'
4.30859375
'
],
[
1493716745
,
'
4.30859375
'
],
...
...
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