Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
李少辉-开发者
gitlab-foss
提交
c24bca94
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,发现更多精彩内容 >>
未验证
提交
c24bca94
编写于
6月 11, 2018
作者:
R
Rémy Coutable
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Ensure we look into the correct setion only when expanding a settings' section
Signed-off-by:
N
Rémy Coutable
<
remy@rymai.me
>
上级
fba123a3
变更
12
隐藏空白更改
内联
并排
Showing
12 changed file
with
47 addition
and
43 deletion
+47
-43
app/views/admin/application_settings/show.html.haml
app/views/admin/application_settings/show.html.haml
+1
-1
app/views/projects/deploy_keys/_index.html.haml
app/views/projects/deploy_keys/_index.html.haml
+1
-1
app/views/projects/edit.html.haml
app/views/projects/edit.html.haml
+2
-2
app/views/projects/protected_branches/shared/_index.html.haml
...views/projects/protected_branches/shared/_index.html.haml
+1
-1
app/views/projects/settings/ci_cd/show.html.haml
app/views/projects/settings/ci_cd/show.html.haml
+3
-3
qa/qa/page/admin/settings/main.rb
qa/qa/page/admin/settings/main.rb
+2
-2
qa/qa/page/project/settings/advanced.rb
qa/qa/page/project/settings/advanced.rb
+3
-3
qa/qa/page/project/settings/ci_cd.rb
qa/qa/page/project/settings/ci_cd.rb
+10
-8
qa/qa/page/project/settings/main.rb
qa/qa/page/project/settings/main.rb
+2
-2
qa/qa/page/project/settings/merge_request.rb
qa/qa/page/project/settings/merge_request.rb
+6
-6
qa/qa/page/project/settings/repository.rb
qa/qa/page/project/settings/repository.rb
+7
-3
qa/qa/page/settings/common.rb
qa/qa/page/settings/common.rb
+9
-11
未找到文件。
app/views/admin/application_settings/show.html.haml
浏览文件 @
c24bca94
...
...
@@ -169,7 +169,7 @@
.settings-content
=
render
'logging'
%section
.settings.as-repository-storage.no-animate
#js-repository-storage-settings
{
class:
(
'expanded'
if
expanded
)
}
%section
.
qa-repository-storage-settings.
settings.as-repository-storage.no-animate
#js-repository-storage-settings
{
class:
(
'expanded'
if
expanded
)
}
.settings-header
%h4
=
_
(
'Repository storage'
)
...
...
app/views/projects/deploy_keys/_index.html.haml
浏览文件 @
c24bca94
-
expanded
=
Rails
.
env
.
test?
%section
.settings.no-animate
{
class:
(
'expanded'
if
expanded
)
}
%section
.
qa-deploy-keys-settings.
settings.no-animate
{
class:
(
'expanded'
if
expanded
)
}
.settings-header
%h4
Deploy Keys
...
...
app/views/projects/edit.html.haml
浏览文件 @
c24bca94
...
...
@@ -82,7 +82,7 @@
=
render_if_exists
'projects/issues_settings'
%section
.settings.merge-requests-feature.no-animate
{
class:
[(
'expanded'
if
expanded
),
(
'hidden'
if
@project
.
project_feature
.
send
(
:merge_requests_access_level
)
==
0
)]
}
%section
.
qa-merge-request-settings.
settings.merge-requests-feature.no-animate
{
class:
[(
'expanded'
if
expanded
),
(
'hidden'
if
@project
.
project_feature
.
send
(
:merge_requests_access_level
)
==
0
)]
}
.settings-header
%h4
Merge request
...
...
@@ -101,7 +101,7 @@
=
render
'export'
,
project:
@project
%section
.settings.advanced-settings.no-animate
{
class:
(
'expanded'
if
expanded
)
}
%section
.
qa-advanced-settings.
settings.advanced-settings.no-animate
{
class:
(
'expanded'
if
expanded
)
}
.settings-header
%h4
Advanced
...
...
app/views/projects/protected_branches/shared/_index.html.haml
浏览文件 @
c24bca94
-
expanded
=
Rails
.
env
.
test?
%section
.settings.no-animate
{
class:
(
'expanded'
if
expanded
)
}
%section
.
qa-protected-branches-settings.
settings.no-animate
{
class:
(
'expanded'
if
expanded
)
}
.settings-header
%h4
Protected Branches
...
...
app/views/projects/settings/ci_cd/show.html.haml
浏览文件 @
c24bca94
...
...
@@ -16,7 +16,7 @@
.settings-content
=
render
'form'
%section
.settings
#autodevops-settings
.no-animate
{
class:
(
'expanded'
if
expanded
)
}
%section
.
qa-autodevops-settings.
settings
#autodevops-settings
.no-animate
{
class:
(
'expanded'
if
expanded
)
}
.settings-header
%h4
=
s_
(
'CICD|Auto DevOps'
)
...
...
@@ -28,7 +28,7 @@
.settings-content
=
render
'autodevops_form'
%section
.settings.no-animate
{
class:
(
'expanded'
if
expanded
)
}
%section
.
qa-runners-settings.
settings.no-animate
{
class:
(
'expanded'
if
expanded
)
}
.settings-header
%h4
Runners
...
...
@@ -39,7 +39,7 @@
.settings-content
=
render
'projects/runners/index'
%section
.settings.no-animate
{
class:
(
'expanded'
if
expanded
)
}
%section
.
qa-variables-settings.
settings.no-animate
{
class:
(
'expanded'
if
expanded
)
}
.settings-header
%h4
=
_
(
'Variables'
)
...
...
qa/qa/page/admin/settings/main.rb
浏览文件 @
c24bca94
...
...
@@ -6,11 +6,11 @@ module QA
include
QA
::
Page
::
Settings
::
Common
view
'app/views/admin/application_settings/show.html.haml'
do
element
:
advanced_settings_section
,
'Repository storage'
element
:
repository_storage_settings
end
def
expand_repository_storage
(
&
block
)
expand_section
(
'Repository storage'
)
do
expand_section
(
:repository_storage_settings
)
do
RepositoryStorage
.
perform
(
&
block
)
end
end
...
...
qa/qa/page/project/settings/advanced.rb
浏览文件 @
c24bca94
...
...
@@ -4,9 +4,9 @@ module QA
module
Settings
class
Advanced
<
Page
::
Base
view
'app/views/projects/edit.html.haml'
do
element
:project_path_field
,
'
f.
text_field :path'
element
:project_name_field
,
'
f.
text_field :name'
element
:rename_project_button
,
"
f.
submit 'Rename project'"
element
:project_path_field
,
'text_field :path'
element
:project_name_field
,
'text_field :name'
element
:rename_project_button
,
"submit 'Rename project'"
end
def
rename_to
(
path
)
...
...
qa/qa/page/project/settings/ci_cd.rb
浏览文件 @
c24bca94
...
...
@@ -6,31 +6,33 @@ module QA # rubocop:disable Naming/FileName
include
Common
view
'app/views/projects/settings/ci_cd/show.html.haml'
do
element
:
runners_settings
,
'Runners'
element
:
secret_variables
,
'Variables'
element
:
auto_devops_section
,
'Auto DevOps'
element
:
autodevops_settings
element
:
runners_settings
element
:
variables_settings
end
view
'app/views/projects/settings/ci_cd/_autodevops_form.html.haml'
do
element
:enable_auto_devops_button
,
'Enable Auto DevOps'
element
:domain_input
,
'Domain'
element
:enable_auto_devops_field
,
'radio_button :enabled'
element
:domain_field
,
'text_field :domain'
element
:enable_auto_devops_button
,
"%strong= s_('CICD|Enable Auto DevOps')"
element
:domain_input
,
"%strong= _('Domain')"
element
:save_changes_button
,
"submit 'Save changes'"
end
def
expand_runners_settings
(
&
block
)
expand_section
(
'Runners'
)
do
expand_section
(
:runners_settings
)
do
Settings
::
Runners
.
perform
(
&
block
)
end
end
def
expand_secret_variables
(
&
block
)
expand_section
(
'Variables'
)
do
expand_section
(
:variables_settings
)
do
Settings
::
SecretVariables
.
perform
(
&
block
)
end
end
def
enable_auto_devops_with_domain
(
domain
)
expand_section
(
'Auto DevOps'
)
do
expand_section
(
:autodevops_settings
)
do
choose
'Enable Auto DevOps'
fill_in
'Domain'
,
with:
domain
click_on
'Save changes'
...
...
qa/qa/page/project/settings/main.rb
浏览文件 @
c24bca94
...
...
@@ -6,11 +6,11 @@ module QA
include
Common
view
'app/views/projects/edit.html.haml'
do
element
:advanced_settings
_section
,
'Advanced'
element
:advanced_settings
end
def
expand_advanced_settings
(
&
block
)
expand_section
(
'Advanced settings'
)
do
expand_section
(
:advanced_settings
)
do
Advanced
.
perform
(
&
block
)
end
end
...
...
qa/qa/page/project/settings/merge_request.rb
浏览文件 @
c24bca94
...
...
@@ -5,17 +5,17 @@ module QA
class
MergeRequest
<
QA
::
Page
::
Base
include
Common
view
'app/views/projects/_merge_request_merge_method_settings.html.haml'
do
element
:radio_button_merge_ff
end
view
'app/views/projects/edit.html.haml'
do
element
:merge_request_settings
,
'Merge request'
element
:merge_request_settings
element
:save_merge_request_changes
end
view
'app/views/projects/_merge_request_merge_method_settings.html.haml'
do
element
:radio_button_merge_ff
end
def
enable_ff_only
expand_section
(
'Merge request'
)
do
expand_section
(
:merge_request_settings
)
do
click_element
:radio_button_merge_ff
click_element
:save_merge_request_changes
end
...
...
qa/qa/page/project/settings/repository.rb
浏览文件 @
c24bca94
...
...
@@ -6,17 +6,21 @@ module QA
include
Common
view
'app/views/projects/deploy_keys/_index.html.haml'
do
element
:deploy_keys_section
,
'Deploy Keys'
element
:deploy_keys_settings
end
view
'app/views/projects/protected_branches/shared/_index.html.haml'
do
element
:protected_branches_settings
end
def
expand_deploy_keys
(
&
block
)
expand_section
(
'Deploy Keys'
)
do
expand_section
(
:deploy_keys_settings
)
do
DeployKeys
.
perform
(
&
block
)
end
end
def
expand_protected_branches
(
&
block
)
expand_section
(
'Protected Branches'
)
do
expand_section
(
:protected_branches_settings
)
do
ProtectedBranches
.
perform
(
&
block
)
end
end
...
...
qa/qa/page/settings/common.rb
浏览文件 @
c24bca94
...
...
@@ -4,19 +4,17 @@ module QA
module
Common
# Click the Expand button present in the specified section
#
# @param [String] name present in the container in the DOM
def
expand_section
(
name
)
page
.
within
(
'#content-body'
)
do
page
.
within
(
'section'
,
text:
name
)
do
# Because it is possible to click the button before the JS toggle code is bound
wait
(
reload:
false
)
do
click_button
'Expand'
unless
first
(
'button'
,
text:
'Collapse'
)
# @param [Symbol] and `element` name defined in a `view` block
def
expand_section
(
element_name
)
within_element
(
element_name
)
do
# Because it is possible to click the button before the JS toggle code is bound
wait
(
reload:
false
)
do
click_button
'Expand'
unless
first
(
'button'
,
text:
'Collapse'
)
page
.
has_content?
(
'Collapse'
)
end
yield
if
block_given?
page
.
has_content?
(
'Collapse'
)
end
yield
if
block_given?
end
end
end
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录