BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
f53cf3c4
Unverified
Commit
f53cf3c4
authored
Mar 05, 2018
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert js changes to name_with_namespace
Signed-off-by:
Dmitriy Zaporozhets
<
dmitriy.zaporozhets@gmail.com
>
parent
a87bd1d4
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
gl_dropdown_spec.js
spec/javascripts/gl_dropdown_spec.js
+3
-3
projects_store_spec.js
...avascripts/projects_dropdown/store/projects_store_spec.js
+1
-1
No files found.
spec/javascripts/gl_dropdown_spec.js
View file @
f53cf3c4
...
@@ -50,7 +50,7 @@ describe('glDropdown', function describeDropdown() {
...
@@ -50,7 +50,7 @@ describe('glDropdown', function describeDropdown() {
search
:
{
search
:
{
fields
:
[
'name'
]
fields
:
[
'name'
]
},
},
text
:
project
=>
(
project
.
full_nam
e
||
project
.
name
),
text
:
project
=>
(
project
.
name_with_namespac
e
||
project
.
name
),
id
:
project
=>
project
.
id
,
id
:
project
=>
project
.
id
,
},
extraOpts
);
},
extraOpts
);
this
.
dropdownButtonElement
=
$
(
'#js-project-dropdown'
,
this
.
dropdownContainerElement
).
glDropdown
(
options
);
this
.
dropdownButtonElement
=
$
(
'#js-project-dropdown'
,
this
.
dropdownContainerElement
).
glDropdown
(
options
);
...
@@ -76,7 +76,7 @@ describe('glDropdown', function describeDropdown() {
...
@@ -76,7 +76,7 @@ describe('glDropdown', function describeDropdown() {
});
});
it
(
'escapes HTML as text'
,
()
=>
{
it
(
'escapes HTML as text'
,
()
=>
{
this
.
projectsData
[
0
].
full_nam
e
=
'<script>alert("testing");</script>'
;
this
.
projectsData
[
0
].
name_with_namespac
e
=
'<script>alert("testing");</script>'
;
initDropDown
.
call
(
this
,
false
);
initDropDown
.
call
(
this
,
false
);
...
@@ -88,7 +88,7 @@ describe('glDropdown', function describeDropdown() {
...
@@ -88,7 +88,7 @@ describe('glDropdown', function describeDropdown() {
});
});
it
(
'should output HTML when highlighting'
,
()
=>
{
it
(
'should output HTML when highlighting'
,
()
=>
{
this
.
projectsData
[
0
].
full_nam
e
=
'testing'
;
this
.
projectsData
[
0
].
name_with_namespac
e
=
'testing'
;
$
(
'.dropdown-input .dropdown-input-field'
).
val
(
'test'
);
$
(
'.dropdown-input .dropdown-input-field'
).
val
(
'test'
);
initDropDown
.
call
(
this
,
false
,
true
,
{
initDropDown
.
call
(
this
,
false
,
true
,
{
...
...
spec/javascripts/projects_dropdown/store/projects_store_spec.js
View file @
f53cf3c4
...
@@ -24,7 +24,7 @@ describe('ProjectsStore', () => {
...
@@ -24,7 +24,7 @@ describe('ProjectsStore', () => {
const
processedProjects
=
store
.
getSearchedProjects
();
const
processedProjects
=
store
.
getSearchedProjects
();
expect
(
processedProjects
.
length
).
toBe
(
1
);
expect
(
processedProjects
.
length
).
toBe
(
1
);
expect
(
processedProjects
[
0
].
id
).
toBe
(
mockRawProject
.
id
);
expect
(
processedProjects
[
0
].
id
).
toBe
(
mockRawProject
.
id
);
expect
(
processedProjects
[
0
].
namespace
).
toBe
(
mockRawProject
.
full_nam
e
);
expect
(
processedProjects
[
0
].
namespace
).
toBe
(
mockRawProject
.
name_with_namespac
e
);
expect
(
processedProjects
[
0
].
webUrl
).
toBe
(
mockRawProject
.
web_url
);
expect
(
processedProjects
[
0
].
webUrl
).
toBe
(
mockRawProject
.
web_url
);
expect
(
processedProjects
[
0
].
avatarUrl
).
toBe
(
mockRawProject
.
avatar_url
);
expect
(
processedProjects
[
0
].
avatarUrl
).
toBe
(
mockRawProject
.
avatar_url
);
});
});
...
...
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