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
4f0854c5
Commit
4f0854c5
authored
Oct 30, 2018
by
Jan Provaznik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add missing new lines
Otherwise jasmine/new-line-before-expect is failing
parent
e600d6b4
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
0 deletions
+11
-0
ee/spec/javascripts/license_management/components/set_approval_status_modal_spec.js
...e_management/components/set_approval_status_modal_spec.js
+1
-0
ee/spec/javascripts/vue_shared/components/is_safe_url_spec.js
...pec/javascripts/vue_shared/components/is_safe_url_spec.js
+6
-0
ee/spec/javascripts/vue_shared/security_reports/components/modal_spec.js
...ipts/vue_shared/security_reports/components/modal_spec.js
+4
-0
No files found.
ee/spec/javascripts/license_management/components/set_approval_status_modal_spec.js
View file @
4f0854c5
...
@@ -318,6 +318,7 @@ describe('SetApprovalModal', () => {
...
@@ -318,6 +318,7 @@ describe('SetApprovalModal', () => {
Vue
.
nextTick
()
Vue
.
nextTick
()
.
then
(()
=>
{
.
then
(()
=>
{
const
licenseName
=
vm
.
$el
.
querySelector
(
'
.js-license-url
'
);
const
licenseName
=
vm
.
$el
.
querySelector
(
'
.js-license-url
'
);
expect
(
licenseName
).
not
.
toBeNull
();
expect
(
licenseName
).
not
.
toBeNull
();
expect
(
trimText
(
licenseName
.
innerText
)).
toBe
(
`URL:
${
badURL
}
`
);
expect
(
trimText
(
licenseName
.
innerText
)).
toBe
(
`URL:
${
badURL
}
`
);
...
...
ee/spec/javascripts/vue_shared/components/is_safe_url_spec.js
View file @
4f0854c5
...
@@ -39,16 +39,19 @@ describe('isSafeUrl', () => {
...
@@ -39,16 +39,19 @@ describe('isSafeUrl', () => {
'
javascript:alert('XSS')
'
,
'
javascript:alert('XSS')
'
,
),
),
).
toBe
(
false
);
).
toBe
(
false
);
expect
(
expect
(
isSafeURL
(
isSafeURL
(
'
javascript:alert('XSS')
'
,
'
javascript:alert('XSS')
'
,
),
),
).
toBe
(
false
);
).
toBe
(
false
);
expect
(
expect
(
isSafeURL
(
isSafeURL
(
'
javascript:alert('XSS')
'
,
'
javascript:alert('XSS')
'
,
),
),
).
toBe
(
false
);
).
toBe
(
false
);
expect
(
expect
(
isSafeURL
(
isSafeURL
(
'
\\
u006A
\\
u0061
\\
u0076
\\
u0061
\\
u0073
\\
u0063
\\
u0072
\\
u0069
\\
u0070
\\
u0074
\\
u003A
\\
u0061
\\
u006C
\\
u0065
\\
u0072
\\
u0074
\\
u0028
\\
u0027
\\
u0058
\\
u0053
\\
u0053
\\
u0027
\\
u0029
'
,
'
\\
u006A
\\
u0061
\\
u0076
\\
u0061
\\
u0073
\\
u0063
\\
u0072
\\
u0069
\\
u0070
\\
u0074
\\
u003A
\\
u0061
\\
u006C
\\
u0065
\\
u0072
\\
u0074
\\
u0028
\\
u0027
\\
u0058
\\
u0053
\\
u0053
\\
u0027
\\
u0029
'
,
...
@@ -100,16 +103,19 @@ describe('isSafeUrl', () => {
...
@@ -100,16 +103,19 @@ describe('isSafeUrl', () => {
'
javascript:alert('XSS')
'
,
'
javascript:alert('XSS')
'
,
),
),
).
toBe
(
false
);
).
toBe
(
false
);
expect
(
expect
(
isSafeURL
(
isSafeURL
(
'
javascript:alert('XSS')
'
,
'
javascript:alert('XSS')
'
,
),
),
).
toBe
(
false
);
).
toBe
(
false
);
expect
(
expect
(
isSafeURL
(
isSafeURL
(
'
javascript:alert('XSS')
'
,
'
javascript:alert('XSS')
'
,
),
),
).
toBe
(
false
);
).
toBe
(
false
);
expect
(
expect
(
isSafeURL
(
isSafeURL
(
'
\\
u006A
\\
u0061
\\
u0076
\\
u0061
\\
u0073
\\
u0063
\\
u0072
\\
u0069
\\
u0070
\\
u0074
\\
u003A
\\
u0061
\\
u006C
\\
u0065
\\
u0072
\\
u0074
\\
u0028
\\
u0027
\\
u0058
\\
u0053
\\
u0053
\\
u0027
\\
u0029
'
,
'
\\
u006A
\\
u0061
\\
u0076
\\
u0061
\\
u0073
\\
u0063
\\
u0072
\\
u0069
\\
u0070
\\
u0074
\\
u003A
\\
u0061
\\
u006C
\\
u0065
\\
u0072
\\
u0074
\\
u0028
\\
u0027
\\
u0058
\\
u0053
\\
u0053
\\
u0027
\\
u0029
'
,
...
...
ee/spec/javascripts/vue_shared/security_reports/components/modal_spec.js
View file @
4f0854c5
...
@@ -245,24 +245,28 @@ describe('Security Reports modal', () => {
...
@@ -245,24 +245,28 @@ describe('Security Reports modal', () => {
it
(
'
for the link field
'
,
()
=>
{
it
(
'
for the link field
'
,
()
=>
{
const
linkEl
=
vm
.
$el
.
querySelector
(
'
.js-link-links
'
);
const
linkEl
=
vm
.
$el
.
querySelector
(
'
.js-link-links
'
);
expect
(
linkEl
.
tagName
).
not
.
toBe
(
'
A
'
);
expect
(
linkEl
.
tagName
).
not
.
toBe
(
'
A
'
);
expect
(
trimText
(
linkEl
.
textContent
)).
toBe
(
badUrl
);
expect
(
trimText
(
linkEl
.
textContent
)).
toBe
(
badUrl
);
});
});
it
(
'
for the identifiers field
'
,
()
=>
{
it
(
'
for the identifiers field
'
,
()
=>
{
const
linkEl
=
vm
.
$el
.
querySelector
(
'
.js-link-identifiers
'
);
const
linkEl
=
vm
.
$el
.
querySelector
(
'
.js-link-identifiers
'
);
expect
(
linkEl
.
tagName
).
not
.
toBe
(
'
A
'
);
expect
(
linkEl
.
tagName
).
not
.
toBe
(
'
A
'
);
expect
(
trimText
(
linkEl
.
textContent
)).
toBe
(
'
BAD_URL
'
);
expect
(
trimText
(
linkEl
.
textContent
)).
toBe
(
'
BAD_URL
'
);
});
});
it
(
'
for the file field
'
,
()
=>
{
it
(
'
for the file field
'
,
()
=>
{
const
linkEl
=
vm
.
$el
.
querySelector
(
'
.js-link-file
'
);
const
linkEl
=
vm
.
$el
.
querySelector
(
'
.js-link-file
'
);
expect
(
linkEl
.
tagName
).
not
.
toBe
(
'
A
'
);
expect
(
linkEl
.
tagName
).
not
.
toBe
(
'
A
'
);
expect
(
trimText
(
linkEl
.
textContent
)).
toBe
(
'
badFile.lock
'
);
expect
(
trimText
(
linkEl
.
textContent
)).
toBe
(
'
badFile.lock
'
);
});
});
it
(
'
for the instances field
'
,
()
=>
{
it
(
'
for the instances field
'
,
()
=>
{
const
linkEl
=
vm
.
$el
.
querySelector
(
'
.report-block-list-issue-description-link .break-link
'
);
const
linkEl
=
vm
.
$el
.
querySelector
(
'
.report-block-list-issue-description-link .break-link
'
);
expect
(
linkEl
.
tagName
).
not
.
toBe
(
'
A
'
);
expect
(
linkEl
.
tagName
).
not
.
toBe
(
'
A
'
);
expect
(
trimText
(
linkEl
.
textContent
)).
toBe
(
badUrl
);
expect
(
trimText
(
linkEl
.
textContent
)).
toBe
(
badUrl
);
});
});
...
...
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