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
d2f8a481
Commit
d2f8a481
authored
Apr 16, 2018
by
Clement Ho
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix karma specs
parent
95eb0ced
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
31 additions
and
32 deletions
+31
-32
app/views/ci/variables/_index.html.haml
app/views/ci/variables/_index.html.haml
+2
-2
app/views/ci/variables/_variable_row.html.haml
app/views/ci/variables/_variable_row.html.haml
+2
-2
app/views/projects/settings/ci_cd/_form.html.haml
app/views/projects/settings/ci_cd/_form.html.haml
+1
-1
spec/javascripts/behaviors/secret_values_spec.js
spec/javascripts/behaviors/secret_values_spec.js
+19
-19
spec/javascripts/boards/board_new_issue_spec.js
spec/javascripts/boards/board_new_issue_spec.js
+1
-1
spec/javascripts/ci_variable_list/ajax_variable_list_spec.js
spec/javascripts/ci_variable_list/ajax_variable_list_spec.js
+1
-1
spec/javascripts/ci_variable_list/ci_variable_list_spec.js
spec/javascripts/ci_variable_list/ci_variable_list_spec.js
+1
-1
spec/javascripts/ide/components/commit_sidebar/radio_group_spec.js
...scripts/ide/components/commit_sidebar/radio_group_spec.js
+1
-1
spec/javascripts/ide/components/repo_commit_section_spec.js
spec/javascripts/ide/components/repo_commit_section_spec.js
+2
-2
spec/javascripts/issue_show/components/edit_actions_spec.js
spec/javascripts/issue_show/components/edit_actions_spec.js
+1
-1
spec/javascripts/projects_dropdown/components/search_spec.js
spec/javascripts/projects_dropdown/components/search_spec.js
+0
-1
No files found.
app/views/ci/variables/_index.html.haml
View file @
d2f8a481
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
.row
.row
.col-lg-12.js-ci-variable-list-section
{
data:
{
save_endpoint:
save_endpoint
}
}
.col-lg-12.js-ci-variable-list-section
{
data:
{
save_endpoint:
save_endpoint
}
}
.
d-none
.alert.alert-danger.js-ci-variable-error-box
.
hidden
.alert.alert-danger.js-ci-variable-error-box
%ul
.ci-variable-list
%ul
.ci-variable-list
-
@variables
.
each
.
each
do
|
variable
|
-
@variables
.
each
.
each
do
|
variable
|
...
@@ -10,7 +10,7 @@
...
@@ -10,7 +10,7 @@
=
render
'ci/variables/variable_row'
,
form_field:
'variables'
=
render
'ci/variables/variable_row'
,
form_field:
'variables'
.prepend-top-20
.prepend-top-20
%button
.btn.btn-success.js-secret-variables-save-button
{
type:
'button'
}
%button
.btn.btn-success.js-secret-variables-save-button
{
type:
'button'
}
%span
.
d-none
.js-secret-variables-save-loading-icon
%span
.
hidden
.js-secret-variables-save-loading-icon
=
icon
(
'spinner spin'
)
=
icon
(
'spinner spin'
)
=
_
(
'Save variables'
)
=
_
(
'Save variables'
)
%button
.btn.btn-info.btn-inverted.prepend-left-10.js-secret-value-reveal-button
{
type:
'button'
,
data:
{
secret_reveal_status:
"#{@variables.size == 0}"
}
}
%button
.btn.btn-info.btn-inverted.prepend-left-10.js-secret-value-reveal-button
{
type:
'button'
,
data:
{
secret_reveal_status:
"#{@variables.size == 0}"
}
}
...
...
app/views/ci/variables/_variable_row.html.haml
View file @
d2f8a481
...
@@ -22,9 +22,9 @@
...
@@ -22,9 +22,9 @@
value:
key
,
value:
key
,
placeholder:
s_
(
'CiVariables|Input variable key'
)
}
placeholder:
s_
(
'CiVariables|Input variable key'
)
}
.ci-variable-body-item
.ci-variable-body-item
.form-control.js-secret-value-placeholder
{
class:
(
'hid
e
'
unless
id
)
}
.form-control.js-secret-value-placeholder
{
class:
(
'hid
den
'
unless
id
)
}
=
'*'
*
20
=
'*'
*
20
%textarea
.js-ci-variable-input-value.js-secret-value.form-control
{
class:
(
'hid
e
'
if
id
),
%textarea
.js-ci-variable-input-value.js-secret-value.form-control
{
class:
(
'hid
den
'
if
id
),
rows:
1
,
rows:
1
,
name:
value_input_name
,
name:
value_input_name
,
placeholder:
s_
(
'CiVariables|Input variable value'
)
}
placeholder:
s_
(
'CiVariables|Input variable value'
)
}
...
...
app/views/projects/settings/ci_cd/_form.html.haml
View file @
d2f8a481
...
@@ -45,7 +45,7 @@
...
@@ -45,7 +45,7 @@
=
f
.
label
:runners_token
,
"Runner token"
,
class:
'label-light'
=
f
.
label
:runners_token
,
"Runner token"
,
class:
'label-light'
.form-control.js-secret-value-placeholder
.form-control.js-secret-value-placeholder
=
'*'
*
20
=
'*'
*
20
=
f
.
text_field
:runners_token
,
class:
"form-control hid
e
js-secret-value"
,
placeholder:
'xEeFCaDAB89'
=
f
.
text_field
:runners_token
,
class:
"form-control hid
den
js-secret-value"
,
placeholder:
'xEeFCaDAB89'
%p
.form-text.text-muted
The secure token used by the Runner to checkout the project
%p
.form-text.text-muted
The secure token used by the Runner to checkout the project
%button
.btn.btn-info.prepend-top-10.js-secret-value-reveal-button
{
type:
'button'
,
data:
{
secret_reveal_status:
'false'
}
}
%button
.btn.btn-info.prepend-top-10.js-secret-value-reveal-button
{
type:
'button'
,
data:
{
secret_reveal_status:
'false'
}
}
=
_
(
'Reveal value'
)
=
_
(
'Reveal value'
)
...
...
spec/javascripts/behaviors/secret_values_spec.js
View file @
d2f8a481
...
@@ -9,7 +9,7 @@ function generateValueMarkup(
...
@@ -9,7 +9,7 @@ function generateValueMarkup(
<div class="
${
placeholderClass
}
">
<div class="
${
placeholderClass
}
">
***
***
</div>
</div>
<div class="hid
e
${
valueClass
}
">
<div class="hid
den
${
valueClass
}
">
${
secret
}
${
secret
}
</div>
</div>
`
;
`
;
...
@@ -77,9 +77,9 @@ describe('setupSecretValues', () => {
...
@@ -77,9 +77,9 @@ describe('setupSecretValues', () => {
const
placeholders
=
wrapper
.
querySelectorAll
(
'
.js-secret-value-placeholder
'
);
const
placeholders
=
wrapper
.
querySelectorAll
(
'
.js-secret-value-placeholder
'
);
expect
(
values
.
length
).
toEqual
(
1
);
expect
(
values
.
length
).
toEqual
(
1
);
expect
(
values
[
0
].
classList
.
contains
(
'
hid
e
'
)).
toEqual
(
true
);
expect
(
values
[
0
].
classList
.
contains
(
'
hid
den
'
)).
toEqual
(
true
);
expect
(
placeholders
.
length
).
toEqual
(
1
);
expect
(
placeholders
.
length
).
toEqual
(
1
);
expect
(
placeholders
[
0
].
classList
.
contains
(
'
hid
e
'
)).
toEqual
(
false
);
expect
(
placeholders
[
0
].
classList
.
contains
(
'
hid
den
'
)).
toEqual
(
false
);
});
});
it
(
'
should toggle value and placeholder
'
,
()
=>
{
it
(
'
should toggle value and placeholder
'
,
()
=>
{
...
@@ -91,16 +91,16 @@ describe('setupSecretValues', () => {
...
@@ -91,16 +91,16 @@ describe('setupSecretValues', () => {
revealButton
.
click
();
revealButton
.
click
();
expect
(
values
.
length
).
toEqual
(
1
);
expect
(
values
.
length
).
toEqual
(
1
);
expect
(
values
[
0
].
classList
.
contains
(
'
hid
e
'
)).
toEqual
(
false
);
expect
(
values
[
0
].
classList
.
contains
(
'
hid
den
'
)).
toEqual
(
false
);
expect
(
placeholders
.
length
).
toEqual
(
1
);
expect
(
placeholders
.
length
).
toEqual
(
1
);
expect
(
placeholders
[
0
].
classList
.
contains
(
'
hid
e
'
)).
toEqual
(
true
);
expect
(
placeholders
[
0
].
classList
.
contains
(
'
hid
den
'
)).
toEqual
(
true
);
revealButton
.
click
();
revealButton
.
click
();
expect
(
values
.
length
).
toEqual
(
1
);
expect
(
values
.
length
).
toEqual
(
1
);
expect
(
values
[
0
].
classList
.
contains
(
'
hid
e
'
)).
toEqual
(
true
);
expect
(
values
[
0
].
classList
.
contains
(
'
hid
den
'
)).
toEqual
(
true
);
expect
(
placeholders
.
length
).
toEqual
(
1
);
expect
(
placeholders
.
length
).
toEqual
(
1
);
expect
(
placeholders
[
0
].
classList
.
contains
(
'
hid
e
'
)).
toEqual
(
false
);
expect
(
placeholders
[
0
].
classList
.
contains
(
'
hid
den
'
)).
toEqual
(
false
);
});
});
});
});
...
@@ -128,11 +128,11 @@ describe('setupSecretValues', () => {
...
@@ -128,11 +128,11 @@ describe('setupSecretValues', () => {
expect
(
values
.
length
).
toEqual
(
3
);
expect
(
values
.
length
).
toEqual
(
3
);
values
.
forEach
((
value
)
=>
{
values
.
forEach
((
value
)
=>
{
expect
(
value
.
classList
.
contains
(
'
hid
e
'
)).
toEqual
(
true
);
expect
(
value
.
classList
.
contains
(
'
hid
den
'
)).
toEqual
(
true
);
});
});
expect
(
placeholders
.
length
).
toEqual
(
3
);
expect
(
placeholders
.
length
).
toEqual
(
3
);
placeholders
.
forEach
((
placeholder
)
=>
{
placeholders
.
forEach
((
placeholder
)
=>
{
expect
(
placeholder
.
classList
.
contains
(
'
hid
e
'
)).
toEqual
(
false
);
expect
(
placeholder
.
classList
.
contains
(
'
hid
den
'
)).
toEqual
(
false
);
});
});
});
});
...
@@ -146,22 +146,22 @@ describe('setupSecretValues', () => {
...
@@ -146,22 +146,22 @@ describe('setupSecretValues', () => {
expect
(
values
.
length
).
toEqual
(
3
);
expect
(
values
.
length
).
toEqual
(
3
);
values
.
forEach
((
value
)
=>
{
values
.
forEach
((
value
)
=>
{
expect
(
value
.
classList
.
contains
(
'
hid
e
'
)).
toEqual
(
false
);
expect
(
value
.
classList
.
contains
(
'
hid
den
'
)).
toEqual
(
false
);
});
});
expect
(
placeholders
.
length
).
toEqual
(
3
);
expect
(
placeholders
.
length
).
toEqual
(
3
);
placeholders
.
forEach
((
placeholder
)
=>
{
placeholders
.
forEach
((
placeholder
)
=>
{
expect
(
placeholder
.
classList
.
contains
(
'
hid
e
'
)).
toEqual
(
true
);
expect
(
placeholder
.
classList
.
contains
(
'
hid
den
'
)).
toEqual
(
true
);
});
});
revealButton
.
click
();
revealButton
.
click
();
expect
(
values
.
length
).
toEqual
(
3
);
expect
(
values
.
length
).
toEqual
(
3
);
values
.
forEach
((
value
)
=>
{
values
.
forEach
((
value
)
=>
{
expect
(
value
.
classList
.
contains
(
'
hid
e
'
)).
toEqual
(
true
);
expect
(
value
.
classList
.
contains
(
'
hid
den
'
)).
toEqual
(
true
);
});
});
expect
(
placeholders
.
length
).
toEqual
(
3
);
expect
(
placeholders
.
length
).
toEqual
(
3
);
placeholders
.
forEach
((
placeholder
)
=>
{
placeholders
.
forEach
((
placeholder
)
=>
{
expect
(
placeholder
.
classList
.
contains
(
'
hid
e
'
)).
toEqual
(
false
);
expect
(
placeholder
.
classList
.
contains
(
'
hid
den
'
)).
toEqual
(
false
);
});
});
});
});
});
});
...
@@ -182,22 +182,22 @@ describe('setupSecretValues', () => {
...
@@ -182,22 +182,22 @@ describe('setupSecretValues', () => {
expect
(
values
.
length
).
toEqual
(
4
);
expect
(
values
.
length
).
toEqual
(
4
);
values
.
forEach
((
value
)
=>
{
values
.
forEach
((
value
)
=>
{
expect
(
value
.
classList
.
contains
(
'
hid
e
'
)).
toEqual
(
false
);
expect
(
value
.
classList
.
contains
(
'
hid
den
'
)).
toEqual
(
false
);
});
});
expect
(
placeholders
.
length
).
toEqual
(
4
);
expect
(
placeholders
.
length
).
toEqual
(
4
);
placeholders
.
forEach
((
placeholder
)
=>
{
placeholders
.
forEach
((
placeholder
)
=>
{
expect
(
placeholder
.
classList
.
contains
(
'
hid
e
'
)).
toEqual
(
true
);
expect
(
placeholder
.
classList
.
contains
(
'
hid
den
'
)).
toEqual
(
true
);
});
});
revealButton
.
click
();
revealButton
.
click
();
expect
(
values
.
length
).
toEqual
(
4
);
expect
(
values
.
length
).
toEqual
(
4
);
values
.
forEach
((
value
)
=>
{
values
.
forEach
((
value
)
=>
{
expect
(
value
.
classList
.
contains
(
'
hid
e
'
)).
toEqual
(
true
);
expect
(
value
.
classList
.
contains
(
'
hid
den
'
)).
toEqual
(
true
);
});
});
expect
(
placeholders
.
length
).
toEqual
(
4
);
expect
(
placeholders
.
length
).
toEqual
(
4
);
placeholders
.
forEach
((
placeholder
)
=>
{
placeholders
.
forEach
((
placeholder
)
=>
{
expect
(
placeholder
.
classList
.
contains
(
'
hid
e
'
)).
toEqual
(
false
);
expect
(
placeholder
.
classList
.
contains
(
'
hid
den
'
)).
toEqual
(
false
);
});
});
});
});
});
});
...
@@ -220,9 +220,9 @@ describe('setupSecretValues', () => {
...
@@ -220,9 +220,9 @@ describe('setupSecretValues', () => {
revealButton
.
click
();
revealButton
.
click
();
expect
(
values
.
length
).
toEqual
(
1
);
expect
(
values
.
length
).
toEqual
(
1
);
expect
(
values
[
0
].
classList
.
contains
(
'
hid
e
'
)).
toEqual
(
false
);
expect
(
values
[
0
].
classList
.
contains
(
'
hid
den
'
)).
toEqual
(
false
);
expect
(
placeholders
.
length
).
toEqual
(
1
);
expect
(
placeholders
.
length
).
toEqual
(
1
);
expect
(
placeholders
[
0
].
classList
.
contains
(
'
hid
e
'
)).
toEqual
(
true
);
expect
(
placeholders
[
0
].
classList
.
contains
(
'
hid
den
'
)).
toEqual
(
true
);
});
});
});
});
});
});
spec/javascripts/boards/board_new_issue_spec.js
View file @
d2f8a481
...
@@ -93,7 +93,7 @@ describe('Issue boards new issue form', () => {
...
@@ -93,7 +93,7 @@ describe('Issue boards new issue form', () => {
});
});
it
(
'
clears title after clicking cancel
'
,
(
done
)
=>
{
it
(
'
clears title after clicking cancel
'
,
(
done
)
=>
{
vm
.
$el
.
querySelector
(
'
.btn-
default
'
).
click
();
vm
.
$el
.
querySelector
(
'
.btn-
secondary
'
).
click
();
Vue
.
nextTick
()
Vue
.
nextTick
()
.
then
(()
=>
{
.
then
(()
=>
{
...
...
spec/javascripts/ci_variable_list/ajax_variable_list_spec.js
View file @
d2f8a481
...
@@ -4,7 +4,7 @@ import axios from '~/lib/utils/axios_utils';
...
@@ -4,7 +4,7 @@ import axios from '~/lib/utils/axios_utils';
import
AjaxFormVariableList
from
'
~/ci_variable_list/ajax_variable_list
'
;
import
AjaxFormVariableList
from
'
~/ci_variable_list/ajax_variable_list
'
;
const
VARIABLE_PATCH_ENDPOINT
=
'
http://test.host/frontend-fixtures/builds-project/variables
'
;
const
VARIABLE_PATCH_ENDPOINT
=
'
http://test.host/frontend-fixtures/builds-project/variables
'
;
const
HIDE_CLASS
=
'
hid
e
'
;
const
HIDE_CLASS
=
'
hid
den
'
;
describe
(
'
AjaxFormVariableList
'
,
()
=>
{
describe
(
'
AjaxFormVariableList
'
,
()
=>
{
preloadFixtures
(
'
projects/ci_cd_settings.html.raw
'
);
preloadFixtures
(
'
projects/ci_cd_settings.html.raw
'
);
...
...
spec/javascripts/ci_variable_list/ci_variable_list_spec.js
View file @
d2f8a481
...
@@ -2,7 +2,7 @@ import $ from 'jquery';
...
@@ -2,7 +2,7 @@ import $ from 'jquery';
import
VariableList
from
'
~/ci_variable_list/ci_variable_list
'
;
import
VariableList
from
'
~/ci_variable_list/ci_variable_list
'
;
import
getSetTimeoutPromise
from
'
spec/helpers/set_timeout_promise_helper
'
;
import
getSetTimeoutPromise
from
'
spec/helpers/set_timeout_promise_helper
'
;
const
HIDE_CLASS
=
'
hid
e
'
;
const
HIDE_CLASS
=
'
hid
den
'
;
describe
(
'
VariableList
'
,
()
=>
{
describe
(
'
VariableList
'
,
()
=>
{
preloadFixtures
(
'
pipeline_schedules/edit.html.raw
'
);
preloadFixtures
(
'
pipeline_schedules/edit.html.raw
'
);
...
...
spec/javascripts/ide/components/commit_sidebar/radio_group_spec.js
View file @
d2f8a481
...
@@ -73,7 +73,7 @@ describe('IDE commit sidebar radio group', () => {
...
@@ -73,7 +73,7 @@ describe('IDE commit sidebar radio group', () => {
vm
.
helpText
=
'
help text
'
;
vm
.
helpText
=
'
help text
'
;
Vue
.
nextTick
(()
=>
{
Vue
.
nextTick
(()
=>
{
const
help
=
vm
.
$el
.
querySelector
(
'
.
form-text.text-muted
'
);
const
help
=
vm
.
$el
.
querySelector
(
'
.
help-block
'
);
expect
(
help
).
not
.
toBeNull
();
expect
(
help
).
not
.
toBeNull
();
expect
(
help
.
getAttribute
(
'
data-original-title
'
)).
toBe
(
'
help text
'
);
expect
(
help
.
getAttribute
(
'
data-original-title
'
)).
toBe
(
'
help text
'
);
...
...
spec/javascripts/ide/components/repo_commit_section_spec.js
View file @
d2f8a481
...
@@ -128,7 +128,7 @@ describe('RepoCommitSection', () => {
...
@@ -128,7 +128,7 @@ describe('RepoCommitSection', () => {
describe
(
'
discard draft button
'
,
()
=>
{
describe
(
'
discard draft button
'
,
()
=>
{
it
(
'
hidden when commitMessage is empty
'
,
()
=>
{
it
(
'
hidden when commitMessage is empty
'
,
()
=>
{
expect
(
expect
(
vm
.
$el
.
querySelector
(
'
.multi-file-commit-form .btn-
default
'
),
vm
.
$el
.
querySelector
(
'
.multi-file-commit-form .btn-
secondary
'
),
).
toBeNull
();
).
toBeNull
();
});
});
...
@@ -137,7 +137,7 @@ describe('RepoCommitSection', () => {
...
@@ -137,7 +137,7 @@ describe('RepoCommitSection', () => {
getSetTimeoutPromise
()
getSetTimeoutPromise
()
.
then
(()
=>
{
.
then
(()
=>
{
vm
.
$el
.
querySelector
(
'
.multi-file-commit-form .btn-
default
'
).
click
();
vm
.
$el
.
querySelector
(
'
.multi-file-commit-form .btn-
secondary
'
).
click
();
})
})
.
then
(
Vue
.
nextTick
)
.
then
(
Vue
.
nextTick
)
.
then
(()
=>
{
.
then
(()
=>
{
...
...
spec/javascripts/issue_show/components/edit_actions_spec.js
View file @
d2f8a481
...
@@ -106,7 +106,7 @@ describe('Edit Actions components', () => {
...
@@ -106,7 +106,7 @@ describe('Edit Actions components', () => {
describe
(
'
closeForm
'
,
()
=>
{
describe
(
'
closeForm
'
,
()
=>
{
it
(
'
emits close.form when clicking cancel
'
,
()
=>
{
it
(
'
emits close.form when clicking cancel
'
,
()
=>
{
vm
.
$el
.
querySelector
(
'
.btn-
default
'
).
click
();
vm
.
$el
.
querySelector
(
'
.btn-
secondary
'
).
click
();
expect
(
expect
(
eventHub
.
$emit
,
eventHub
.
$emit
,
...
...
spec/javascripts/projects_dropdown/components/search_spec.js
View file @
d2f8a481
...
@@ -92,7 +92,6 @@ describe('SearchComponent', () => {
...
@@ -92,7 +92,6 @@ describe('SearchComponent', () => {
const
inputEl
=
vm
.
$el
.
querySelector
(
'
input.form-control
'
);
const
inputEl
=
vm
.
$el
.
querySelector
(
'
input.form-control
'
);
expect
(
vm
.
$el
.
classList
.
contains
(
'
search-input-container
'
)).
toBeTruthy
();
expect
(
vm
.
$el
.
classList
.
contains
(
'
search-input-container
'
)).
toBeTruthy
();
expect
(
vm
.
$el
.
classList
.
contains
(
'
d-none d-sm-block
'
)).
toBeTruthy
();
expect
(
inputEl
).
not
.
toBe
(
null
);
expect
(
inputEl
).
not
.
toBe
(
null
);
expect
(
inputEl
.
getAttribute
(
'
placeholder
'
)).
toBe
(
'
Search your projects
'
);
expect
(
inputEl
.
getAttribute
(
'
placeholder
'
)).
toBe
(
'
Search your projects
'
);
expect
(
vm
.
$el
.
querySelector
(
'
.search-icon
'
)).
toBeDefined
();
expect
(
vm
.
$el
.
querySelector
(
'
.search-icon
'
)).
toBeDefined
();
...
...
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