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
f53cf3c4
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
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
spec/javascripts/gl_dropdown_spec.js
spec/javascripts/gl_dropdown_spec.js
+3
-3
spec/javascripts/projects_dropdown/store/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() {
search
:
{
fields
:
[
'
name
'
]
},
text
:
project
=>
(
project
.
full_nam
e
||
project
.
name
),
text
:
project
=>
(
project
.
name_with_namespac
e
||
project
.
name
),
id
:
project
=>
project
.
id
,
},
extraOpts
);
this
.
dropdownButtonElement
=
$
(
'
#js-project-dropdown
'
,
this
.
dropdownContainerElement
).
glDropdown
(
options
);
...
...
@@ -76,7 +76,7 @@ describe('glDropdown', function describeDropdown() {
});
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
);
...
...
@@ -88,7 +88,7 @@ describe('glDropdown', function describeDropdown() {
});
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
'
);
initDropDown
.
call
(
this
,
false
,
true
,
{
...
...
spec/javascripts/projects_dropdown/store/projects_store_spec.js
View file @
f53cf3c4
...
...
@@ -24,7 +24,7 @@ describe('ProjectsStore', () => {
const
processedProjects
=
store
.
getSearchedProjects
();
expect
(
processedProjects
.
length
).
toBe
(
1
);
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
].
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