Commit 4f0854c5 authored by Jan Provaznik's avatar Jan Provaznik

Add missing new lines

Otherwise jasmine/new-line-before-expect is failing
parent e600d6b4
...@@ -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}`);
......
...@@ -39,16 +39,19 @@ describe('isSafeUrl', () => { ...@@ -39,16 +39,19 @@ describe('isSafeUrl', () => {
'&#0000106&#0000097&#0000118&#0000097&#0000115&#0000099&#0000114&#0000105&#0000112&#0000116&#0000058&#0000097&#0000108&#0000101&#0000114&#0000116&#0000040&#0000039&#0000088&#0000083&#0000083&#0000039&#0000041', '&#0000106&#0000097&#0000118&#0000097&#0000115&#0000099&#0000114&#0000105&#0000112&#0000116&#0000058&#0000097&#0000108&#0000101&#0000114&#0000116&#0000040&#0000039&#0000088&#0000083&#0000083&#0000039&#0000041',
), ),
).toBe(false); ).toBe(false);
expect( expect(
isSafeURL( isSafeURL(
'javascript:alert('XSS')', 'javascript:alert('XSS')',
), ),
).toBe(false); ).toBe(false);
expect( expect(
isSafeURL( isSafeURL(
'&#x6A&#x61&#x76&#x61&#x73&#x63&#x72&#x69&#x70&#x74&#x3A&#x61&#x6C&#x65&#x72&#x74&#x28&#x27&#x58&#x53&#x53&#x27&#x29', '&#x6A&#x61&#x76&#x61&#x73&#x63&#x72&#x69&#x70&#x74&#x3A&#x61&#x6C&#x65&#x72&#x74&#x28&#x27&#x58&#x53&#x53&#x27&#x29',
), ),
).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', () => {
'&#0000106&#0000097&#0000118&#0000097&#0000115&#0000099&#0000114&#0000105&#0000112&#0000116&#0000058&#0000097&#0000108&#0000101&#0000114&#0000116&#0000040&#0000039&#0000088&#0000083&#0000083&#0000039&#0000041', '&#0000106&#0000097&#0000118&#0000097&#0000115&#0000099&#0000114&#0000105&#0000112&#0000116&#0000058&#0000097&#0000108&#0000101&#0000114&#0000116&#0000040&#0000039&#0000088&#0000083&#0000083&#0000039&#0000041',
), ),
).toBe(false); ).toBe(false);
expect( expect(
isSafeURL( isSafeURL(
'javascript:alert('XSS')', 'javascript:alert('XSS')',
), ),
).toBe(false); ).toBe(false);
expect( expect(
isSafeURL( isSafeURL(
'&#x6A&#x61&#x76&#x61&#x73&#x63&#x72&#x69&#x70&#x74&#x3A&#x61&#x6C&#x65&#x72&#x74&#x28&#x27&#x58&#x53&#x53&#x27&#x29', '&#x6A&#x61&#x76&#x61&#x73&#x63&#x72&#x69&#x70&#x74&#x3A&#x61&#x6C&#x65&#x72&#x74&#x28&#x27&#x58&#x53&#x53&#x27&#x29',
), ),
).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',
......
...@@ -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);
}); });
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment