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
0
Merge Requests
0
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
Boxiang Sun
gitlab-ce
Commits
7a3e6053
Commit
7a3e6053
authored
Oct 17, 2018
by
Mike Greiling
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Resolve eslint violations
parent
024c31fe
Changes
31
Hide whitespace changes
Inline
Side-by-side
Showing
31 changed files
with
86 additions
and
40 deletions
+86
-40
spec/javascripts/bootstrap_linked_tabs_spec.js
spec/javascripts/bootstrap_linked_tabs_spec.js
+4
-4
spec/javascripts/ci_variable_list/native_form_variable_list_spec.js
...cripts/ci_variable_list/native_form_variable_list_spec.js
+1
-0
spec/javascripts/clusters/components/application_row_spec.js
spec/javascripts/clusters/components/application_row_spec.js
+2
-0
spec/javascripts/environments/environment_actions_spec.js
spec/javascripts/environments/environment_actions_spec.js
+1
-0
spec/javascripts/filtered_search/filtered_search_visual_tokens_spec.js
...pts/filtered_search/filtered_search_visual_tokens_spec.js
+1
-0
spec/javascripts/image_diff/replaced_image_diff_spec.js
spec/javascripts/image_diff/replaced_image_diff_spec.js
+4
-0
spec/javascripts/integrations/integration_settings_form_spec.js
...avascripts/integrations/integration_settings_form_spec.js
+2
-0
spec/javascripts/issue_show/components/app_spec.js
spec/javascripts/issue_show/components/app_spec.js
+4
-1
spec/javascripts/issue_show/components/description_spec.js
spec/javascripts/issue_show/components/description_spec.js
+2
-1
spec/javascripts/jobs/components/trigger_block_spec.js
spec/javascripts/jobs/components/trigger_block_spec.js
+2
-0
spec/javascripts/monitoring/dashboard_state_spec.js
spec/javascripts/monitoring/dashboard_state_spec.js
+4
-0
spec/javascripts/new_branch_spec.js
spec/javascripts/new_branch_spec.js
+29
-31
spec/javascripts/notebook/cells/output/html_sanitize_tests.js
.../javascripts/notebook/cells/output/html_sanitize_tests.js
+1
-1
spec/javascripts/oauth_remember_me_spec.js
spec/javascripts/oauth_remember_me_spec.js
+1
-0
spec/javascripts/pipelines/empty_state_spec.js
spec/javascripts/pipelines/empty_state_spec.js
+1
-0
spec/javascripts/pipelines/pipelines_spec.js
spec/javascripts/pipelines/pipelines_spec.js
+3
-0
spec/javascripts/pipelines/pipelines_table_spec.js
spec/javascripts/pipelines/pipelines_table_spec.js
+3
-0
spec/javascripts/pipelines_spec.js
spec/javascripts/pipelines_spec.js
+2
-2
spec/javascripts/prometheus_metrics/prometheus_metrics_spec.js
...javascripts/prometheus_metrics/prometheus_metrics_spec.js
+1
-0
spec/javascripts/reports/components/modal_spec.js
spec/javascripts/reports/components/modal_spec.js
+1
-0
spec/javascripts/signin_tabs_memoizer_spec.js
spec/javascripts/signin_tabs_memoizer_spec.js
+1
-0
spec/javascripts/toggle_buttons_spec.js
spec/javascripts/toggle_buttons_spec.js
+2
-0
spec/javascripts/vue_mr_widget/components/deployment_spec.js
spec/javascripts/vue_mr_widget/components/deployment_spec.js
+2
-0
spec/javascripts/vue_mr_widget/components/mr_widget_author_time_spec.js
...ts/vue_mr_widget/components/mr_widget_author_time_spec.js
+1
-0
spec/javascripts/vue_mr_widget/components/mr_widget_header_spec.js
...scripts/vue_mr_widget/components/mr_widget_header_spec.js
+2
-0
spec/javascripts/vue_mr_widget/components/mr_widget_merge_help_spec.js
...pts/vue_mr_widget/components/mr_widget_merge_help_spec.js
+2
-0
spec/javascripts/vue_mr_widget/components/states/mr_widget_merge_when_pipeline_succeeds_spec.js
...nts/states/mr_widget_merge_when_pipeline_succeeds_spec.js
+2
-0
spec/javascripts/vue_mr_widget/components/states/mr_widget_nothing_to_merge_spec.js
...dget/components/states/mr_widget_nothing_to_merge_spec.js
+1
-0
spec/javascripts/vue_mr_widget/components/states/mr_widget_unresolved_discussions_spec.js
...omponents/states/mr_widget_unresolved_discussions_spec.js
+2
-0
spec/javascripts/vue_shared/components/panel_resizer_spec.js
spec/javascripts/vue_shared/components/panel_resizer_spec.js
+1
-0
spec/javascripts/vue_shared/components/sidebar/labels_select/dropdown_create_label_spec.js
...nents/sidebar/labels_select/dropdown_create_label_spec.js
+1
-0
No files found.
spec/javascripts/bootstrap_linked_tabs_spec.js
View file @
7a3e6053
...
...
@@ -13,8 +13,8 @@ describe('Linked Tabs', () => {
});
it
(
'
should activate the tab correspondent to the given action
'
,
()
=>
{
const
linkedTabs
=
new
LinkedTabs
({
// eslint-disable-line
// eslint-disable-next-line no-new
new
LinkedTabs
({
action
:
'
tab1
'
,
defaultAction
:
'
tab1
'
,
parentEl
:
'
.linked-tabs
'
,
...
...
@@ -24,8 +24,8 @@ describe('Linked Tabs', () => {
});
it
(
'
should active the default tab action when the action is show
'
,
()
=>
{
const
linkedTabs
=
new
LinkedTabs
({
// eslint-disable-line
// eslint-disable-next-line no-new
new
LinkedTabs
({
action
:
'
show
'
,
defaultAction
:
'
tab1
'
,
parentEl
:
'
.linked-tabs
'
,
...
...
spec/javascripts/ci_variable_list/native_form_variable_list_spec.js
View file @
7a3e6053
...
...
@@ -23,6 +23,7 @@ describe('NativeFormVariableList', () => {
expect
(
$row
.
find
(
'
.js-ci-variable-input-key
'
).
attr
(
'
name
'
)).
toBe
(
'
schedule[variables_attributes][][key]
'
,
);
expect
(
$row
.
find
(
'
.js-ci-variable-input-value
'
).
attr
(
'
name
'
)).
toBe
(
'
schedule[variables_attributes][][secret_value]
'
,
);
...
...
spec/javascripts/clusters/components/application_row_spec.js
View file @
7a3e6053
...
...
@@ -239,6 +239,7 @@ describe('Application Row', () => {
expect
(
generalErrorMessage
.
textContent
.
trim
()).
toEqual
(
`Something went wrong while installing
${
DEFAULT_APPLICATION_STATE
.
title
}
`
,
);
expect
(
statusErrorMessage
.
textContent
.
trim
()).
toEqual
(
statusReason
);
});
...
...
@@ -260,6 +261,7 @@ describe('Application Row', () => {
expect
(
generalErrorMessage
.
textContent
.
trim
()).
toEqual
(
`Something went wrong while installing
${
DEFAULT_APPLICATION_STATE
.
title
}
`
,
);
expect
(
requestErrorMessage
.
textContent
.
trim
()).
toEqual
(
requestReason
);
});
});
...
...
spec/javascripts/environments/environment_actions_spec.js
View file @
7a3e6053
...
...
@@ -43,6 +43,7 @@ describe('Actions Component', () => {
expect
(
component
.
$el
.
querySelector
(
'
.dropdown-new
'
).
getAttribute
(
'
data-original-title
'
),
).
toEqual
(
'
Deploy to...
'
);
expect
(
component
.
$el
.
querySelector
(
'
.dropdown-new
'
).
getAttribute
(
'
aria-label
'
)).
toEqual
(
'
Deploy to...
'
,
);
...
...
spec/javascripts/filtered_search/filtered_search_visual_tokens_spec.js
View file @
7a3e6053
...
...
@@ -138,6 +138,7 @@ describe('Filtered Search Visual Tokens', () => {
expect
(
subject
.
getEndpointWithQueryParams
(
endpoint
,
singleQueryParams
)).
toBe
(
`
${
endpoint
}
?foo=true`
,
);
expect
(
subject
.
getEndpointWithQueryParams
(
endpoint
,
multipleQueryParams
)).
toBe
(
`
${
endpoint
}
?foo=true&bar=true`
,
);
...
...
spec/javascripts/image_diff/replaced_image_diff_spec.js
View file @
7a3e6053
...
...
@@ -90,9 +90,11 @@ describe('ReplacedImageDiff', () => {
expect
(
imageFrameEls
[
viewTypes
.
TWO_UP
]).
toEqual
(
element
.
querySelector
(
'
.two-up .js-image-frame
'
),
);
expect
(
imageFrameEls
[
viewTypes
.
SWIPE
]).
toEqual
(
element
.
querySelector
(
'
.swipe .js-image-frame
'
),
);
expect
(
imageFrameEls
[
viewTypes
.
ONION_SKIN
]).
toEqual
(
element
.
querySelector
(
'
.onion-skin .js-image-frame
'
),
);
...
...
@@ -105,9 +107,11 @@ describe('ReplacedImageDiff', () => {
expect
(
viewModesEls
[
viewTypes
.
TWO_UP
]).
toEqual
(
element
.
querySelector
(
'
.view-modes-menu .two-up
'
),
);
expect
(
viewModesEls
[
viewTypes
.
SWIPE
]).
toEqual
(
element
.
querySelector
(
'
.view-modes-menu .swipe
'
),
);
expect
(
viewModesEls
[
viewTypes
.
ONION_SKIN
]).
toEqual
(
element
.
querySelector
(
'
.view-modes-menu .onion-skin
'
),
);
...
...
spec/javascripts/integrations/integration_settings_form_spec.js
View file @
7a3e6053
...
...
@@ -164,6 +164,7 @@ describe('IntegrationSettingsForm', () => {
.
text
()
.
trim
(),
).
toEqual
(
'
Test failed. some error
'
);
expect
(
$flashContainer
.
find
(
'
.flash-action
'
)).
toBeDefined
();
expect
(
$flashContainer
...
...
@@ -197,6 +198,7 @@ describe('IntegrationSettingsForm', () => {
.
text
()
.
trim
(),
).
toEqual
(
'
Validations failed. some error
'
);
expect
(
$flashContainer
.
find
(
'
.flash-action
'
)).
toBeDefined
();
expect
(
$flashContainer
...
...
spec/javascripts/issue_show/components/app_spec.js
View file @
7a3e6053
...
...
@@ -74,6 +74,7 @@ describe('Issuable output', () => {
expect
(
vm
.
$el
.
querySelector
(
'
.js-task-list-field
'
).
value
).
toContain
(
'
this is a description
'
,
);
expect
(
formatText
(
editedText
.
innerText
)).
toMatch
(
/Edited
[\s\S]
+
?
by Some User/
);
expect
(
editedText
.
querySelector
(
'
.author-link
'
).
href
).
toMatch
(
/
\/
some_user$/
);
expect
(
editedText
.
querySelector
(
'
time
'
)).
toBeTruthy
();
...
...
@@ -91,6 +92,7 @@ describe('Issuable output', () => {
expect
(
formatText
(
vm
.
$el
.
querySelector
(
'
.edited-text
'
).
innerText
)).
toMatch
(
/Edited
[\s\S]
+
?
by Other User/
,
);
expect
(
editedText
.
querySelector
(
'
.author-link
'
).
href
).
toMatch
(
/
\/
other_user$/
);
expect
(
editedText
.
querySelector
(
'
time
'
)).
toBeTruthy
();
})
...
...
@@ -294,8 +296,9 @@ describe('Issuable output', () => {
it
(
'
opens recaptcha modal if update rejected as spam
'
,
done
=>
{
function
mockScriptSrc
()
{
const
recaptchaChild
=
vm
.
$children
.
find
(
// eslint-disable-next-line no-underscore-dangle
child
=>
child
.
$options
.
_componentTag
===
'
recaptcha-modal
'
,
);
// eslint-disable-line no-underscore-dangle
);
recaptchaChild
.
scriptSrc
=
'
//scriptsrc
'
;
}
...
...
spec/javascripts/issue_show/components/description_spec.js
View file @
7a3e6053
...
...
@@ -54,8 +54,9 @@ describe('Description component', () => {
it
(
'
opens recaptcha dialog if update rejected as spam
'
,
done
=>
{
let
modal
;
const
recaptchaChild
=
vm
.
$children
.
find
(
// eslint-disable-next-line no-underscore-dangle
child
=>
child
.
$options
.
_componentTag
===
'
recaptcha-modal
'
,
);
// eslint-disable-line no-underscore-dangle
);
recaptchaChild
.
scriptSrc
=
'
//scriptsrc
'
;
...
...
spec/javascripts/jobs/components/trigger_block_spec.js
View file @
7a3e6053
...
...
@@ -51,10 +51,12 @@ describe('Trigger block', () => {
expect
(
vm
.
$el
.
querySelector
(
'
.js-build-variables
'
).
textContent
).
toContain
(
'
UPLOAD_TO_GCS
'
,
);
expect
(
vm
.
$el
.
querySelector
(
'
.js-build-variables
'
).
textContent
).
toContain
(
'
false
'
);
expect
(
vm
.
$el
.
querySelector
(
'
.js-build-variables
'
).
textContent
).
toContain
(
'
UPLOAD_TO_S3
'
,
);
expect
(
vm
.
$el
.
querySelector
(
'
.js-build-variables
'
).
textContent
).
toContain
(
'
true
'
);
})
.
then
(
done
)
...
...
spec/javascripts/monitoring/dashboard_state_spec.js
View file @
7a3e6053
...
...
@@ -59,9 +59,11 @@ describe('EmptyState', () => {
expect
(
getTextFromNode
(
component
,
'
.state-title
'
)).
toEqual
(
component
.
states
.
gettingStarted
.
title
,
);
expect
(
getTextFromNode
(
component
,
'
.state-description
'
)).
toEqual
(
component
.
states
.
gettingStarted
.
description
,
);
expect
(
getTextFromNode
(
component
,
'
.btn-success
'
)).
toEqual
(
component
.
states
.
gettingStarted
.
buttonText
,
);
...
...
@@ -77,6 +79,7 @@ describe('EmptyState', () => {
expect
(
getTextFromNode
(
component
,
'
.state-description
'
)).
toEqual
(
component
.
states
.
loading
.
description
,
);
expect
(
getTextFromNode
(
component
,
'
.btn-success
'
)).
toEqual
(
component
.
states
.
loading
.
buttonText
);
});
...
...
@@ -89,6 +92,7 @@ describe('EmptyState', () => {
expect
(
getTextFromNode
(
component
,
'
.state-title
'
)).
toEqual
(
component
.
states
.
unableToConnect
.
title
,
);
expect
(
component
.
$el
.
querySelector
(
'
.state-description a
'
)).
toBeDefined
();
expect
(
getTextFromNode
(
component
,
'
.btn-success
'
)).
toEqual
(
component
.
states
.
unableToConnect
.
buttonText
,
...
...
spec/javascripts/new_branch_spec.js
View file @
7a3e6053
/* eslint-disable one-var, no-var, no-return-assign */
import
$
from
'
jquery
'
;
import
NewBranchForm
from
'
~/new_branch_form
'
;
describe
(
'
Branch
'
,
function
()
{
describe
(
'
create a new branch
'
,
function
()
{
var
expectToHaveError
,
fillNameWith
;
preloadFixtures
(
'
branches/new_branch.html.raw
'
);
fillNameWith
=
function
(
value
)
{
return
$
(
'
.js-branch-name
'
)
function
fillNameWith
(
value
)
{
$
(
'
.js-branch-name
'
)
.
val
(
value
)
.
trigger
(
'
blur
'
);
};
expectToHaveError
=
function
(
error
)
{
}
function
expectToHaveError
(
error
)
{
expect
(
$
(
'
.js-branch-name-error span
'
).
text
()).
toEqual
(
error
);
};
}
beforeEach
(
function
()
{
loadFixtures
(
'
branches/new_branch.html.raw
'
);
$
(
'
form
'
).
on
(
'
submit
'
,
function
(
e
)
{
return
e
.
preventDefault
();
});
return
(
this
.
form
=
new
NewBranchForm
(
$
(
'
.js-create-branch-form
'
),
[])
);
this
.
form
=
new
NewBranchForm
(
$
(
'
.js-create-branch-form
'
),
[]
);
});
it
(
"
can't start with a dot
"
,
function
()
{
fillNameWith
(
'
.foo
'
);
return
expectToHaveError
(
"
can't start with '.'
"
);
expectToHaveError
(
"
can't start with '.'
"
);
});
it
(
"
can't start with a slash
"
,
function
()
{
fillNameWith
(
'
/foo
'
);
return
expectToHaveError
(
"
can't start with '/'
"
);
expectToHaveError
(
"
can't start with '/'
"
);
});
it
(
"
can't have two consecutive dots
"
,
function
()
{
fillNameWith
(
'
foo..bar
'
);
return
expectToHaveError
(
"
can't contain '..'
"
);
expectToHaveError
(
"
can't contain '..'
"
);
});
it
(
"
can't have spaces anywhere
"
,
function
()
{
...
...
@@ -44,7 +44,7 @@ describe('Branch', function() {
fillNameWith
(
'
foo bar
'
);
expectToHaveError
(
"
can't contain spaces
"
);
fillNameWith
(
'
foo
'
);
return
expectToHaveError
(
"
can't contain spaces
"
);
expectToHaveError
(
"
can't contain spaces
"
);
});
it
(
"
can't have ~ anywhere
"
,
function
()
{
...
...
@@ -53,7 +53,7 @@ describe('Branch', function() {
fillNameWith
(
'
foo~bar
'
);
expectToHaveError
(
"
can't contain '~'
"
);
fillNameWith
(
'
foo~
'
);
return
expectToHaveError
(
"
can't contain '~'
"
);
expectToHaveError
(
"
can't contain '~'
"
);
});
it
(
"
can't have tilde anwhere
"
,
function
()
{
...
...
@@ -62,7 +62,7 @@ describe('Branch', function() {
fillNameWith
(
'
foo~bar
'
);
expectToHaveError
(
"
can't contain '~'
"
);
fillNameWith
(
'
foo~
'
);
return
expectToHaveError
(
"
can't contain '~'
"
);
expectToHaveError
(
"
can't contain '~'
"
);
});
it
(
"
can't have caret anywhere
"
,
function
()
{
...
...
@@ -71,7 +71,7 @@ describe('Branch', function() {
fillNameWith
(
'
foo^bar
'
);
expectToHaveError
(
"
can't contain '^'
"
);
fillNameWith
(
'
foo^
'
);
return
expectToHaveError
(
"
can't contain '^'
"
);
expectToHaveError
(
"
can't contain '^'
"
);
});
it
(
"
can't have : anywhere
"
,
function
()
{
...
...
@@ -80,7 +80,7 @@ describe('Branch', function() {
fillNameWith
(
'
foo:bar
'
);
expectToHaveError
(
"
can't contain ':'
"
);
fillNameWith
(
'
:foo
'
);
return
expectToHaveError
(
"
can't contain ':'
"
);
expectToHaveError
(
"
can't contain ':'
"
);
});
it
(
"
can't have question mark anywhere
"
,
function
()
{
...
...
@@ -89,7 +89,7 @@ describe('Branch', function() {
fillNameWith
(
'
foo?bar
'
);
expectToHaveError
(
"
can't contain '?'
"
);
fillNameWith
(
'
foo?
'
);
return
expectToHaveError
(
"
can't contain '?'
"
);
expectToHaveError
(
"
can't contain '?'
"
);
});
it
(
"
can't have asterisk anywhere
"
,
function
()
{
...
...
@@ -98,7 +98,7 @@ describe('Branch', function() {
fillNameWith
(
'
foo*bar
'
);
expectToHaveError
(
"
can't contain '*'
"
);
fillNameWith
(
'
foo*
'
);
return
expectToHaveError
(
"
can't contain '*'
"
);
expectToHaveError
(
"
can't contain '*'
"
);
});
it
(
"
can't have open bracket anywhere
"
,
function
()
{
...
...
@@ -107,7 +107,7 @@ describe('Branch', function() {
fillNameWith
(
'
foo[bar
'
);
expectToHaveError
(
"
can't contain '['
"
);
fillNameWith
(
'
foo[
'
);
return
expectToHaveError
(
"
can't contain '['
"
);
expectToHaveError
(
"
can't contain '['
"
);
});
it
(
"
can't have a backslash anywhere
"
,
function
()
{
...
...
@@ -116,7 +116,7 @@ describe('Branch', function() {
fillNameWith
(
'
foo
\\
bar
'
);
expectToHaveError
(
"
can't contain '
\\
'
"
);
fillNameWith
(
'
foo
\\
'
);
return
expectToHaveError
(
"
can't contain '
\\
'
"
);
expectToHaveError
(
"
can't contain '
\\
'
"
);
});
it
(
"
can't contain a sequence @{ anywhere
"
,
function
()
{
...
...
@@ -125,44 +125,42 @@ describe('Branch', function() {
fillNameWith
(
'
foo@{bar
'
);
expectToHaveError
(
"
can't contain '@{'
"
);
fillNameWith
(
'
foo@{
'
);
return
expectToHaveError
(
"
can't contain '@{'
"
);
expectToHaveError
(
"
can't contain '@{'
"
);
});
it
(
"
can't have consecutive slashes
"
,
function
()
{
fillNameWith
(
'
foo//bar
'
);
return
expectToHaveError
(
"
can't contain consecutive slashes
"
);
expectToHaveError
(
"
can't contain consecutive slashes
"
);
});
it
(
"
can't end with a slash
"
,
function
()
{
fillNameWith
(
'
foo/
'
);
return
expectToHaveError
(
"
can't end in '/'
"
);
expectToHaveError
(
"
can't end in '/'
"
);
});
it
(
"
can't end with a dot
"
,
function
()
{
fillNameWith
(
'
foo.
'
);
return
expectToHaveError
(
"
can't end in '.'
"
);
expectToHaveError
(
"
can't end in '.'
"
);
});
it
(
"
can't end with .lock
"
,
function
()
{
fillNameWith
(
'
foo.lock
'
);
return
expectToHaveError
(
"
can't end in '.lock'
"
);
expectToHaveError
(
"
can't end in '.lock'
"
);
});
it
(
"
can't be the single character @
"
,
function
()
{
fillNameWith
(
'
@
'
);
return
expectToHaveError
(
"
can't be '@'
"
);
expectToHaveError
(
"
can't be '@'
"
);
});
it
(
'
concatenates all error messages
'
,
function
()
{
fillNameWith
(
'
/foo bar?~.
'
);
return
expectToHaveError
(
"
can't start with '/', can't contain spaces, '?', '~', can't end in '.'
"
,
);
expectToHaveError
(
"
can't start with '/', can't contain spaces, '?', '~', can't end in '.'
"
);
});
it
(
"
doesn't duplicate error messages
"
,
function
()
{
fillNameWith
(
'
?foo?bar?zoo?
'
);
return
expectToHaveError
(
"
can't contain '?'
"
);
expectToHaveError
(
"
can't contain '?'
"
);
});
it
(
'
removes the error message when is a valid name
'
,
function
()
{
...
...
spec/javascripts/notebook/cells/output/html_sanitize_tests.js
View file @
7a3e6053
...
...
@@ -50,7 +50,7 @@ export default {
output
:
'
<a>foo</a>
'
,
},
'
protocol-based JS injection: invalid URL char
'
:
{
input
:
'
<img src=javascript:alert("XSS")>
'
,
// eslint-disable-line no-useless-escape
input
:
'
<img src=javascript:alert("XSS")>
'
,
output
:
'
<img>
'
,
},
'
protocol-based JS injection: Unicode
'
:
{
...
...
spec/javascripts/oauth_remember_me_spec.js
View file @
7a3e6053
...
...
@@ -16,6 +16,7 @@ describe('OAuthRememberMe', () => {
expect
(
$
(
'
#oauth-container .oauth-login.twitter
'
).
attr
(
'
href
'
)).
toBe
(
'
http://example.com/?remember_me=1
'
,
);
expect
(
$
(
'
#oauth-container .oauth-login.github
'
).
attr
(
'
href
'
)).
toBe
(
'
http://example.com/?remember_me=1
'
,
);
...
...
spec/javascripts/pipelines/empty_state_spec.js
View file @
7a3e6053
...
...
@@ -50,6 +50,7 @@ describe('Pipelines Empty State', () => {
expect
(
component
.
$el
.
querySelector
(
'
.js-get-started-pipelines
'
).
getAttribute
(
'
href
'
)).
toEqual
(
'
foo
'
,
);
expect
(
component
.
$el
.
querySelector
(
'
.js-get-started-pipelines
'
).
textContent
).
toContain
(
'
Get started with Pipelines
'
,
);
...
...
spec/javascripts/pipelines/pipelines_spec.js
View file @
7a3e6053
...
...
@@ -171,6 +171,7 @@ describe('Pipelines', () => {
expect
(
vm
.
$el
.
querySelector
(
'
.js-empty-state h4
'
).
textContent
.
trim
()).
toEqual
(
'
Build with confidence
'
,
);
expect
(
vm
.
$el
.
querySelector
(
'
.js-get-started-pipelines
'
).
getAttribute
(
'
href
'
)).
toEqual
(
paths
.
helpPagePath
,
);
...
...
@@ -207,6 +208,7 @@ describe('Pipelines', () => {
expect
(
vm
.
$el
.
querySelector
(
'
.js-run-pipeline
'
).
getAttribute
(
'
href
'
)).
toEqual
(
paths
.
newPipelinePath
,
);
expect
(
vm
.
$el
.
querySelector
(
'
.js-ci-lint
'
).
getAttribute
(
'
href
'
)).
toEqual
(
paths
.
ciLintPath
);
expect
(
vm
.
$el
.
querySelector
(
'
.js-clear-cache
'
).
textContent
.
trim
()).
toEqual
(
'
Clear Runner Caches
'
,
...
...
@@ -324,6 +326,7 @@ describe('Pipelines', () => {
expect
(
vm
.
$el
.
querySelector
(
'
.js-empty-state
'
).
textContent
.
trim
()).
toEqual
(
'
This project is not currently set up to run pipelines.
'
,
);
expect
(
vm
.
$el
.
querySelector
(
'
.js-get-started-pipelines
'
)).
toBeNull
();
});
...
...
spec/javascripts/pipelines/pipelines_table_spec.js
View file @
7a3e6053
...
...
@@ -41,12 +41,15 @@ describe('Pipelines Table', () => {
expect
(
component
.
$el
.
querySelector
(
'
.table-section.js-pipeline-status
'
).
textContent
.
trim
(),
).
toEqual
(
'
Status
'
);
expect
(
component
.
$el
.
querySelector
(
'
.table-section.js-pipeline-info
'
).
textContent
.
trim
(),
).
toEqual
(
'
Pipeline
'
);
expect
(
component
.
$el
.
querySelector
(
'
.table-section.js-pipeline-commit
'
).
textContent
.
trim
(),
).
toEqual
(
'
Commit
'
);
expect
(
component
.
$el
.
querySelector
(
'
.table-section.js-pipeline-stages
'
).
textContent
.
trim
(),
).
toEqual
(
'
Stages
'
);
...
...
spec/javascripts/pipelines_spec.js
View file @
7a3e6053
...
...
@@ -13,7 +13,7 @@ describe('Pipelines', () => {
it
(
'
should create a `Pipelines` instance without options
'
,
()
=>
{
expect
(()
=>
{
new
Pipelines
();
}).
not
.
toThrow
();
//eslint-disable-line
new
Pipelines
();
// eslint-disable-line no-new
}).
not
.
toThrow
();
});
});
spec/javascripts/prometheus_metrics/prometheus_metrics_spec.js
View file @
7a3e6053
...
...
@@ -88,6 +88,7 @@ describe('PrometheusMetrics', () => {
expect
(
prometheusMetrics
.
$monitoredMetricsCount
.
text
()).
toEqual
(
'
3 exporters with 12 metrics were found
'
,
);
expect
(
$metricsListLi
.
length
).
toEqual
(
metrics
.
length
);
expect
(
$metricsListLi
...
...
spec/javascripts/reports/components/modal_spec.js
View file @
7a3e6053
...
...
@@ -36,6 +36,7 @@ describe('Grouped Test Reports Modal', () => {
expect
(
vm
.
$el
.
querySelector
(
'
.js-modal-link
'
).
getAttribute
(
'
href
'
)).
toEqual
(
modalDataStructure
.
class
.
value
,
);
expect
(
trimText
(
vm
.
$el
.
querySelector
(
'
.js-modal-link
'
).
textContent
)).
toEqual
(
modalDataStructure
.
class
.
value
,
);
...
...
spec/javascripts/signin_tabs_memoizer_spec.js
View file @
7a3e6053
...
...
@@ -63,6 +63,7 @@ describe('SigninTabsMemoizer', () => {
[
'
ul.new-session-tabs a[href="#bogus"]
'
],
[
'
ul.new-session-tabs a
'
],
]);
expect
(
fakeTab
.
click
).
toHaveBeenCalled
();
});
...
...
spec/javascripts/toggle_buttons_spec.js
View file @
7a3e6053
...
...
@@ -27,6 +27,7 @@ describe('ToggleButtons', () => {
expect
(
wrapper
.
querySelector
(
'
.js-project-feature-toggle
'
).
classList
.
contains
(
'
is-checked
'
),
).
toEqual
(
true
);
expect
(
wrapper
.
querySelector
(
'
.js-project-feature-toggle-input
'
).
value
).
toEqual
(
'
true
'
);
});
...
...
@@ -53,6 +54,7 @@ describe('ToggleButtons', () => {
expect
(
wrapper
.
querySelector
(
'
.js-project-feature-toggle
'
).
classList
.
contains
(
'
is-checked
'
),
).
toEqual
(
false
);
expect
(
wrapper
.
querySelector
(
'
.js-project-feature-toggle-input
'
).
value
).
toEqual
(
'
false
'
);
});
...
...
spec/javascripts/vue_mr_widget/components/deployment_spec.js
View file @
7a3e6053
...
...
@@ -152,6 +152,7 @@ describe('Deployment component', () => {
expect
(
el
.
querySelector
(
'
.js-deploy-meta
'
).
getAttribute
(
'
href
'
)).
toEqual
(
deploymentMockData
.
url
,
);
expect
(
el
.
querySelector
(
'
.js-deploy-meta
'
).
innerText
).
toContain
(
deploymentMockData
.
name
);
});
...
...
@@ -159,6 +160,7 @@ describe('Deployment component', () => {
expect
(
el
.
querySelector
(
'
.js-deploy-url
'
).
getAttribute
(
'
href
'
)).
toEqual
(
deploymentMockData
.
external_url
,
);
expect
(
el
.
querySelector
(
'
.js-deploy-url
'
).
innerText
).
toContain
(
'
View app
'
);
});
...
...
spec/javascripts/vue_mr_widget/components/mr_widget_author_time_spec.js
View file @
7a3e6053
...
...
@@ -38,6 +38,7 @@ describe('MrWidgetAuthorTime', () => {
expect
(
vm
.
$el
.
querySelector
(
'
time
'
).
getAttribute
(
'
data-original-title
'
)).
toEqual
(
'
2017-03-23T23:02:00.807Z
'
,
);
expect
(
vm
.
$el
.
querySelector
(
'
time
'
).
textContent
.
trim
()).
toEqual
(
'
12 hours ago
'
);
});
});
spec/javascripts/vue_mr_widget/components/mr_widget_header_spec.js
View file @
7a3e6053
...
...
@@ -304,9 +304,11 @@ describe('MRWidgetHeader', () => {
expect
(
vm
.
$el
.
querySelector
(
'
.diverged-commits-count
'
).
textContent
).
toEqual
(
'
The source branch is 12 commits behind the target branch
'
,
);
expect
(
vm
.
$el
.
querySelector
(
'
.diverged-commits-count a
'
).
textContent
).
toEqual
(
'
12 commits behind
'
,
);
expect
(
vm
.
$el
.
querySelector
(
'
.diverged-commits-count a
'
)).
toHaveAttr
(
'
href
'
,
vm
.
mr
.
targetBranchPath
,
...
...
spec/javascripts/vue_mr_widget/components/mr_widget_merge_help_spec.js
View file @
7a3e6053
...
...
@@ -36,6 +36,7 @@ describe('MRWidgetMergeHelp', () => {
expect
(
vm
.
$el
.
querySelector
(
'
.js-open-modal-help
'
).
getAttribute
(
'
data-target
'
)).
toEqual
(
'
#modal_merge_info
'
,
);
expect
(
vm
.
$el
.
querySelector
(
'
.js-open-modal-help
'
).
getAttribute
(
'
data-toggle
'
)).
toEqual
(
'
modal
'
,
);
...
...
@@ -60,6 +61,7 @@ describe('MRWidgetMergeHelp', () => {
expect
(
vm
.
$el
.
querySelector
(
'
.js-open-modal-help
'
).
getAttribute
(
'
data-target
'
)).
toEqual
(
'
#modal_merge_info
'
,
);
expect
(
vm
.
$el
.
querySelector
(
'
.js-open-modal-help
'
).
getAttribute
(
'
data-toggle
'
)).
toEqual
(
'
modal
'
,
);
...
...
spec/javascripts/vue_mr_widget/components/states/mr_widget_merge_when_pipeline_succeeds_spec.js
View file @
7a3e6053
...
...
@@ -125,10 +125,12 @@ describe('MRWidgetMergeWhenPipelineSucceeds', () => {
expect
(
vm
.
$el
.
querySelector
(
'
.js-cancel-auto-merge
'
).
innerText
).
toContain
(
'
Cancel automatic merge
'
,
);
expect
(
vm
.
$el
.
querySelector
(
'
.js-cancel-auto-merge
'
).
getAttribute
(
'
disabled
'
)).
toBeFalsy
();
expect
(
vm
.
$el
.
querySelector
(
'
.js-remove-source-branch
'
).
innerText
).
toContain
(
'
Remove source branch
'
,
);
expect
(
vm
.
$el
.
querySelector
(
'
.js-remove-source-branch
'
).
getAttribute
(
'
disabled
'
)).
toBeFalsy
();
});
...
...
spec/javascripts/vue_mr_widget/components/states/mr_widget_nothing_to_merge_spec.js
View file @
7a3e6053
...
...
@@ -18,6 +18,7 @@ describe('NothingToMerge', () => {
expect
(
vm
.
$el
.
innerText
).
toContain
(
"
Currently there are no changes in this merge request's source branch
"
,
);
expect
(
vm
.
$el
.
innerText
).
toContain
(
'
Please push new commits or use a different branch.
'
);
});
...
...
spec/javascripts/vue_mr_widget/components/states/mr_widget_unresolved_discussions_spec.js
View file @
7a3e6053
...
...
@@ -23,6 +23,7 @@ describe('UnresolvedDiscussions', () => {
expect
(
vm
.
$el
.
innerText
).
toContain
(
'
There are unresolved discussions. Please resolve these discussions
'
,
);
expect
(
vm
.
$el
.
innerText
).
toContain
(
'
Create an issue to resolve them later
'
);
expect
(
vm
.
$el
.
querySelector
(
'
.js-create-issue
'
).
getAttribute
(
'
href
'
)).
toEqual
(
gl
.
TEST_HOST
);
});
...
...
@@ -37,6 +38,7 @@ describe('UnresolvedDiscussions', () => {
expect
(
vm
.
$el
.
innerText
).
toContain
(
'
There are unresolved discussions. Please resolve these discussions
'
,
);
expect
(
vm
.
$el
.
querySelector
(
'
.js-create-issue
'
)).
toEqual
(
null
);
});
});
...
...
spec/javascripts/vue_shared/components/panel_resizer_spec.js
View file @
7a3e6053
...
...
@@ -74,6 +74,7 @@ describe('Panel Resizer component', () => {
[
'
update:size
'
,
100
],
[
'
resize-end
'
,
100
],
]);
expect
(
vm
.
size
).
toBe
(
100
);
});
});
spec/javascripts/vue_shared/components/sidebar/labels_select/dropdown_create_label_spec.js
View file @
7a3e6053
...
...
@@ -92,6 +92,7 @@ describe('DropdownCreateLabelComponent', () => {
expect
(
vm
.
$el
.
querySelector
(
'
.dropdown-label-color-preview.js-dropdown-label-color-preview
'
),
).
not
.
toBe
(
null
);
expect
(
vm
.
$el
.
querySelector
(
'
input#new_label_color.default-dropdown-input
'
)).
not
.
toBe
(
null
);
});
...
...
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