Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
李少辉-开发者
gitlab-foss
提交
5ae46fe7
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 搜索 >>
未验证
提交
5ae46fe7
编写于
2月 20, 2019
作者:
D
ddavison
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Add smoke test for autodevops
Add tag validation on pipeline page
上级
45927684
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
68 addition
and
8 deletion
+68
-8
app/views/projects/pipelines/_info.html.haml
app/views/projects/pipelines/_info.html.haml
+1
-1
app/views/shared/_auto_devops_implicitly_enabled_banner.html.haml
...s/shared/_auto_devops_implicitly_enabled_banner.html.haml
+1
-1
qa/qa.rb
qa/qa.rb
+4
-0
qa/qa/page/alert/auto_devops_alert.rb
qa/qa/page/alert/auto_devops_alert.rb
+13
-0
qa/qa/page/project/pipeline/show.rb
qa/qa/page/project/pipeline/show.rb
+10
-0
qa/qa/specs/features/browser_ui/7_configure/auto_devops/create_project_with_auto_devops_spec.rb
...igure/auto_devops/create_project_with_auto_devops_spec.rb
+39
-6
未找到文件。
app/views/projects/pipelines/_info.html.haml
浏览文件 @
5ae46fe7
...
...
@@ -23,7 +23,7 @@
-
if
@pipeline
.
queued_duration
=
"(queued for
#{
time_interval_in_words
(
@pipeline
.
queued_duration
)
}
)"
.well-segment
.well-segment
.qa-pipeline-badges
.icon-container
=
sprite_icon
(
'flag'
)
-
if
@pipeline
.
latest?
...
...
app/views/shared/_auto_devops_implicitly_enabled_banner.html.haml
浏览文件 @
5ae46fe7
-
if
show_auto_devops_implicitly_enabled_banner?
(
project
,
current_user
)
.auto-devops-implicitly-enabled-banner.alert.alert-warning
.
qa-auto-devops-banner.
auto-devops-implicitly-enabled-banner.alert.alert-warning
-
more_information_link
=
link_to
_
(
'More information'
),
help_page_path
(
'topics/autodevops/index.md'
),
target:
'_blank'
,
class:
'alert-link'
-
auto_devops_message
=
s_
(
"AutoDevOps|The Auto DevOps pipeline has been enabled and will be used if no alternative CI configuration file is found. %{more_information_link}"
)
%
{
more_information_link:
more_information_link
}
=
auto_devops_message
.
html_safe
...
...
qa/qa.rb
浏览文件 @
5ae46fe7
...
...
@@ -260,6 +260,10 @@ module QA
autoload
:Sidebar
,
'qa/page/issuable/sidebar'
end
module
Alert
autoload
:AutoDevopsAlert
,
'qa/page/alert/auto_devops_alert'
end
module
Layout
autoload
:Banner
,
'qa/page/layout/banner'
end
...
...
qa/qa/page/alert/auto_devops_alert.rb
0 → 100644
浏览文件 @
5ae46fe7
# frozen_string_literal: true
module
QA
module
Page
module
Alert
class
AutoDevopsAlert
<
Page
::
Base
view
'app/views/shared/_auto_devops_implicitly_enabled_banner.html.haml'
do
element
:auto_devops_banner
end
end
end
end
end
qa/qa/page/project/pipeline/show.rb
浏览文件 @
5ae46fe7
...
...
@@ -18,6 +18,10 @@ module QA::Page
element
:status_icon
,
'ci-status-icon-${status}'
# rubocop:disable QA/ElementWithPattern
end
view
'app/views/projects/pipelines/_info.html.haml'
do
element
:pipeline_badges
end
def
running?
within
(
'.ci-header-container'
)
do
page
.
has_content?
(
'running'
)
...
...
@@ -32,6 +36,12 @@ module QA::Page
end
end
def
has_tag?
(
tag_name
)
within_element
(
:pipeline_badges
)
do
has_selector?
(
'.badge'
,
text:
tag_name
)
end
end
def
go_to_job
(
job_name
)
find_element
(
:job_link
,
job_name
).
click
end
...
...
qa/qa/specs/features/browser_ui/7_configure/auto_devops/create_project_with_auto_devops_spec.rb
浏览文件 @
5ae46fe7
...
...
@@ -4,13 +4,13 @@ require 'pathname'
module
QA
# Transient failure issue: https://gitlab.com/gitlab-org/quality/nightly/issues/68
context
'Configure'
,
:orchestrated
,
:kubernetes
,
:quarantine
do
describe
'Auto DevOps support'
do
def
login
Runtime
::
Browser
.
visit
(
:gitlab
,
Page
::
Main
::
Login
)
Page
::
Main
::
Login
.
perform
(
&
:sign_in_using_credentials
)
end
context
'Configure'
do
def
login
Runtime
::
Browser
.
visit
(
:gitlab
,
Page
::
Main
::
Login
)
Page
::
Main
::
Login
.
perform
(
&
:sign_in_using_credentials
)
end
describe
'Auto DevOps support'
,
:orchestrated
,
:kubernetes
,
:quarantine
do
[
true
,
false
].
each
do
|
rbac
|
context
"when rbac is
#{
rbac
?
'enabled'
:
'disabled'
}
"
do
before
(
:all
)
do
...
...
@@ -185,5 +185,38 @@ module QA
end
end
end
describe
'Auto DevOps'
,
:smoke
do
it
'enables AutoDevOps by default'
do
login
project
=
Resource
::
Project
.
fabricate!
do
|
p
|
p
.
name
=
Runtime
::
Env
.
auto_devops_project_name
||
'project-with-autodevops'
p
.
description
=
'Project with AutoDevOps'
end
project
.
visit!
Page
::
Alert
::
AutoDevopsAlert
.
perform
do
|
alert
|
expect
(
alert
).
to
have_text
(
/.*The Auto DevOps pipeline has been enabled.*/
)
end
# Create AutoDevOps repo
Resource
::
Repository
::
ProjectPush
.
fabricate!
do
|
push
|
push
.
project
=
project
push
.
directory
=
Pathname
.
new
(
__dir__
)
.
join
(
'../../../../../fixtures/auto_devops_rack'
)
push
.
commit_message
=
'Create AutoDevOps compatible Project'
end
Page
::
Project
::
Menu
.
perform
(
&
:click_ci_cd_pipelines
)
Page
::
Project
::
Pipeline
::
Index
.
perform
(
&
:go_to_latest_pipeline
)
Page
::
Project
::
Pipeline
::
Show
.
perform
do
|
pipeline
|
expect
(
pipeline
).
to
have_tag
(
'Auto DevOps'
)
end
end
end
end
end
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录