Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
李少辉-开发者
gitlab-foss
提交
d2f8a481
G
gitlab-foss
项目概览
李少辉-开发者
/
gitlab-foss
通知
15
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
G
gitlab-foss
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
d2f8a481
编写于
4月 16, 2018
作者:
C
Clement Ho
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fix karma specs
上级
95eb0ced
变更
11
隐藏空白更改
内联
并排
Showing
11 changed file
with
31 addition
and
32 deletion
+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
未找到文件。
app/views/ci/variables/_index.html.haml
浏览文件 @
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
浏览文件 @
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
浏览文件 @
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
浏览文件 @
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
浏览文件 @
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
浏览文件 @
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
浏览文件 @
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
浏览文件 @
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
浏览文件 @
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
浏览文件 @
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
浏览文件 @
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
();
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录