Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
李少辉-开发者
gitlab-foss
提交
b60a39f2
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,体验更适合开发者的 AI 搜索 >>
提交
b60a39f2
编写于
2月 09, 2018
作者:
E
Eric Eastwood
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Default CI variables to unprotected
See
https://gitlab.com/gitlab-org/gitlab-ce/issues/42928
上级
dbb934c8
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
7 addition
and
7 deletion
+7
-7
app/assets/javascripts/ci_variable_list/ci_variable_list.js
app/assets/javascripts/ci_variable_list/ci_variable_list.js
+1
-1
app/views/ci/variables/_variable_row.html.haml
app/views/ci/variables/_variable_row.html.haml
+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/support/features/variable_list_shared_examples.rb
spec/support/features/variable_list_shared_examples.rb
+4
-4
未找到文件。
app/assets/javascripts/ci_variable_list/ci_variable_list.js
浏览文件 @
b60a39f2
...
...
@@ -39,7 +39,7 @@ export default class VariableList {
},
protected
:
{
selector
:
'
.js-ci-variable-input-protected
'
,
default
:
'
tru
e
'
,
default
:
'
fals
e
'
,
},
environment_scope
:
{
// We can't use a `.js-` class here because
...
...
app/views/ci/variables/_variable_row.html.haml
浏览文件 @
b60a39f2
...
...
@@ -5,7 +5,7 @@
-
id
=
variable
&
.
id
-
key
=
variable
&
.
key
-
value
=
variable
&
.
value
-
is_protected
=
variable
&&
!
only_key_value
?
variable
.
protected
:
tru
e
-
is_protected
=
variable
&&
!
only_key_value
?
variable
.
protected
:
fals
e
-
id_input_name
=
"
#{
form_field
}
[variables_attributes][][id]"
-
destroy_input_name
=
"
#{
form_field
}
[variables_attributes][][_destroy]"
...
...
spec/javascripts/ci_variable_list/ci_variable_list_spec.js
浏览文件 @
b60a39f2
...
...
@@ -126,7 +126,7 @@ describe('VariableList', () => {
// Check for the correct default in the new row
const
$protectedInput
=
$wrapper
.
find
(
'
.js-row:last-child
'
).
find
(
'
.js-ci-variable-input-protected
'
);
expect
(
$protectedInput
.
val
()).
toBe
(
'
tru
e
'
);
expect
(
$protectedInput
.
val
()).
toBe
(
'
fals
e
'
);
})
.
then
(
done
)
.
catch
(
done
.
fail
);
...
...
spec/support/features/variable_list_shared_examples.rb
浏览文件 @
b60a39f2
...
...
@@ -41,13 +41,13 @@ shared_examples 'variable list' do
end
end
it
'adds new
un
protected variable'
do
it
'adds new protected variable'
do
page
.
within
(
'.js-ci-variable-list-section .js-row:last-child'
)
do
find
(
'.js-ci-variable-input-key'
).
set
(
'key'
)
find
(
'.js-ci-variable-input-value'
).
set
(
'key value'
)
find
(
'.ci-variable-protected-item .js-project-feature-toggle'
).
click
expect
(
find
(
'.js-ci-variable-input-protected'
,
visible:
false
).
value
).
to
eq
(
'
fals
e'
)
expect
(
find
(
'.js-ci-variable-input-protected'
,
visible:
false
).
value
).
to
eq
(
'
tru
e'
)
end
click_button
(
'Save variables'
)
...
...
@@ -59,7 +59,7 @@ shared_examples 'variable list' do
page
.
within
(
'.js-ci-variable-list-section .js-row:nth-child(1)'
)
do
expect
(
find
(
'.js-ci-variable-input-key'
).
value
).
to
eq
(
'key'
)
expect
(
find
(
'.js-ci-variable-input-value'
,
visible:
false
).
value
).
to
eq
(
'key value'
)
expect
(
find
(
'.js-ci-variable-input-protected'
,
visible:
false
).
value
).
to
eq
(
'
fals
e'
)
expect
(
find
(
'.js-ci-variable-input-protected'
,
visible:
false
).
value
).
to
eq
(
'
tru
e'
)
end
end
...
...
@@ -143,7 +143,6 @@ shared_examples 'variable list' do
page
.
within
(
'.js-ci-variable-list-section .js-row:last-child'
)
do
find
(
'.js-ci-variable-input-key'
).
set
(
'unprotected_key'
)
find
(
'.js-ci-variable-input-value'
).
set
(
'unprotected_value'
)
find
(
'.ci-variable-protected-item .js-project-feature-toggle'
).
click
expect
(
find
(
'.js-ci-variable-input-protected'
,
visible:
false
).
value
).
to
eq
(
'false'
)
end
...
...
@@ -178,6 +177,7 @@ shared_examples 'variable list' do
page
.
within
(
'.js-ci-variable-list-section .js-row:last-child'
)
do
find
(
'.js-ci-variable-input-key'
).
set
(
'protected_key'
)
find
(
'.js-ci-variable-input-value'
).
set
(
'protected_value'
)
find
(
'.ci-variable-protected-item .js-project-feature-toggle'
).
click
expect
(
find
(
'.js-ci-variable-input-protected'
,
visible:
false
).
value
).
to
eq
(
'true'
)
end
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录