Skip to content
GitLab
菜单
为什么选择 GitLab
定价
联系销售
探索
为什么选择 GitLab
定价
联系销售
探索
登录
获取免费试用
主导航
搜索或转到…
项目
GitLab
管理
动态
成员
标记
计划
议题
议题看板
里程碑
迭代
需求
代码
合并请求
仓库
分支
提交
标签
仓库图
比较修订版本
代码片段
锁定的文件
构建
流水线
作业
流水线计划
测试用例
产物
部署
发布
Package registry
Container registry
模型注册表
运维
环境
Terraform 模块
监控
事件
服务台
分析
价值流分析
贡献者分析
CI/CD 分析
仓库分析
代码评审分析
议题分析
洞察
模型实验
效能分析
帮助
帮助
支持
GitLab 文档
比较 GitLab 各版本
社区论坛
为极狐GitLab 提交贡献
提交反馈
隐私声明
快捷键
?
新增功能
4
代码片段
群组
项目
显示更多面包屑
gitlab-cn
GitLab
提交
24f7e157
提交
24f7e157
编辑于
4 years ago
作者:
Tiffany Rea
提交者:
Mark Lapierre
4 years ago
浏览文件
操作
下载
补丁
差异文件
Fix CI Variable spec
Add wait after adding variable Remove extra expanding session action
上级
b2ee2fd6
No related branches found
No related tags found
无相关合并请求
变更
2
隐藏空白变更内容
行内
左右并排
显示
2 个更改的文件
qa/qa/page/project/settings/ci_variables.rb
+4
-0
4 个添加, 0 个删除
qa/qa/page/project/settings/ci_variables.rb
qa/qa/specs/features/browser_ui/4_verify/ci_variable/add_remove_ci_variable_spec.rb
+11
-20
11 个添加, 20 个删除
...er_ui/4_verify/ci_variable/add_remove_ci_variable_spec.rb
有
15 个添加
和
20 个删除
qa/qa/page/project/settings/ci_variables.rb
+
4
−
0
浏览文件 @
24f7e157
...
@@ -26,6 +26,10 @@ def fill_variable(key, value, masked)
...
@@ -26,6 +26,10 @@ def fill_variable(key, value, masked)
within_element
(
:ci_variable_key_field
)
{
find
(
'input'
).
set
key
}
within_element
(
:ci_variable_key_field
)
{
find
(
'input'
).
set
key
}
fill_element
:ci_variable_value_field
,
value
fill_element
:ci_variable_value_field
,
value
click_ci_variable_save_button
click_ci_variable_save_button
wait_until
(
reload:
false
)
do
within_element
(
:ci_variable_table_content
)
{
has_element?
(
:edit_ci_variable_button
)
}
end
end
end
def
click_add_variable
def
click_add_variable
...
...
此差异已折叠。
点击以展开。
qa/qa/specs/features/browser_ui/4_verify/ci_variable/add_remove_ci_variable_spec.rb
+
11
−
20
浏览文件 @
24f7e157
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
module
QA
module
QA
RSpec
.
describe
'Verify'
do
RSpec
.
describe
'Verify'
do
describe
'Add or Remove CI variable via UI'
,
:smoke
do
describe
'Add or Remove CI variable via UI'
,
:smoke
do
let
!
(
:project
)
do
let
(
:project
)
do
Resource
::
Project
.
fabricate_via_api!
do
|
project
|
Resource
::
Project
.
fabricate_via_api!
do
|
project
|
project
.
name
=
'project-with-ci-variables'
project
.
name
=
'project-with-ci-variables'
project
.
description
=
'project with CI variables'
project
.
description
=
'project with CI variables'
...
@@ -12,31 +12,27 @@ module QA
...
@@ -12,31 +12,27 @@ module QA
before
do
before
do
Flow
::
Login
.
sign_in
Flow
::
Login
.
sign_in
project
.
visit!
add_ci_variable
add_ci_variable
open_ci_cd_settings
end
end
it
'user adds a CI variable'
,
testcase:
'https://gitlab.com/gitlab-org/quality/testcases/-/issues/395'
do
it
'user adds a CI variable'
,
testcase:
'https://gitlab.com/gitlab-org/quality/testcases/-/issues/395'
do
Page
::
Project
::
Settings
::
CICD
.
perform
do
|
settings
|
Page
::
Project
::
Settings
::
CiVariables
.
perform
do
|
ci_variable
|
settings
.
expand_ci_variables
do
|
page
|
expect
(
ci_variable
).
to
have_text
(
'VARIABLE_KEY'
)
expect
(
page
).
to
have_text
(
'VARIABLE_KEY'
)
expect
(
ci_variable
).
to
have_no_text
(
'some_CI_variable'
)
expect
(
page
).
not_to
have_text
(
'some_CI_variable'
)
pag
e
.
click_reveal_ci_variable_value_button
ci_variabl
e
.
click_reveal_ci_variable_value_button
expect
(
page
).
to
have_text
(
'some_CI_variable'
)
expect
(
ci_variable
).
to
have_text
(
'some_CI_variable'
)
end
end
end
end
end
it
'user removes a CI variable'
,
testcase:
'https://gitlab.com/gitlab-org/quality/testcases/-/issues/394'
do
it
'user removes a CI variable'
,
testcase:
'https://gitlab.com/gitlab-org/quality/testcases/-/issues/394'
do
Page
::
Project
::
Settings
::
CICD
.
perform
do
|
settings
|
Page
::
Project
::
Settings
::
CiVariables
.
perform
do
|
ci_variable
|
settings
.
expand_ci_variables
do
|
page
|
ci_variable
.
click_edit_ci_variable
page
.
click_edit_ci_variable
ci_variable
.
click_ci_variable_delete_button
page
.
click_ci_variable_delete_button
expect
(
page
).
not_to
have_text
(
'VARIABLE_KEY'
)
expect
(
ci_variable
).
to
have_text
(
'There are no variables yet'
,
wait:
60
)
end
end
end
end
end
...
@@ -50,11 +46,6 @@ def add_ci_variable
...
@@ -50,11 +46,6 @@ def add_ci_variable
ci_variable
.
masked
=
false
ci_variable
.
masked
=
false
end
end
end
end
def
open_ci_cd_settings
project
.
visit!
Page
::
Project
::
Menu
.
perform
(
&
:go_to_ci_cd_settings
)
end
end
end
end
end
end
end
此差异已折叠。
点击以展开。
预览
0%
加载中
请重试
或
添加新附件
.
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
保存评论
取消
想要评论请
注册
或
登录