Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
8586391e
Commit
8586391e
authored
Jan 25, 2018
by
Lin Jen-Shin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Respect the latest changes from master
Basically using the new expand_section
parent
209c4c5e
Changes
8
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
30 additions
and
48 deletions
+30
-48
app/views/projects/settings/ci_cd/show.html.haml
app/views/projects/settings/ci_cd/show.html.haml
+2
-2
qa/qa.rb
qa/qa.rb
+0
-1
qa/qa/factory/resource/secret_variable.rb
qa/qa/factory/resource/secret_variable.rb
+1
-3
qa/qa/page/menu/side.rb
qa/qa/page/menu/side.rb
+7
-3
qa/qa/page/project/settings/ci_cd.rb
qa/qa/page/project/settings/ci_cd.rb
+7
-0
qa/qa/page/project/settings/cicd.rb
qa/qa/page/project/settings/cicd.rb
+0
-21
qa/qa/page/project/settings/common.rb
qa/qa/page/project/settings/common.rb
+9
-2
qa/qa/page/project/settings/secret_variables.rb
qa/qa/page/project/settings/secret_variables.rb
+4
-16
No files found.
app/views/projects/settings/ci_cd/show.html.haml
View file @
8586391e
...
...
@@ -26,12 +26,12 @@
.settings-content
=
render
'projects/runners/index'
%section
.settings.no-animate
.qa-secret-variables
{
class:
(
'expanded'
if
expanded
)
}
%section
.settings.no-animate
{
class:
(
'expanded'
if
expanded
)
}
.settings-header
%h4
Secret variables
=
link_to
icon
(
'question-circle'
),
help_page_path
(
'ci/variables/README'
,
anchor:
'secret-variables'
),
target:
'_blank'
%button
.btn.js-settings-toggle
.qa-expand-secret-variables
%button
.btn.js-settings-toggle
=
expanded
?
'Collapse'
:
'Expand'
%p
=
render
"ci/variables/content"
...
...
qa/qa.rb
View file @
8586391e
...
...
@@ -112,7 +112,6 @@ module QA
autoload
:Repository
,
'qa/page/project/settings/repository'
autoload
:CICD
,
'qa/page/project/settings/ci_cd'
autoload
:DeployKeys
,
'qa/page/project/settings/deploy_keys'
autoload
:CICD
,
'qa/page/project/settings/cicd'
autoload
:SecretVariables
,
'qa/page/project/settings/secret_variables'
autoload
:Runners
,
'qa/page/project/settings/runners'
end
...
...
qa/qa/factory/resource/secret_variable.rb
View file @
8586391e
...
...
@@ -24,9 +24,7 @@ module QA
def
fabricate!
project
.
visit!
Page
::
Menu
::
Side
.
act
do
click_ci_cd_settings
end
Page
::
Menu
::
Side
.
act
{
click_ci_cd_settings
}
Page
::
Project
::
Settings
::
CICD
.
perform
do
|
setting
|
setting
.
expand_secret_variables
do
|
page
|
...
...
qa/qa/page/menu/side.rb
View file @
8586391e
...
...
@@ -29,17 +29,21 @@ module QA
end
end
def
click_ci_cd_pipelines
within_sidebar
do
click_link
(
'CI / CD'
)
end
end
private
def
hover_settings
within_sidebar
do
find
(
'.qa-settings-item'
).
hover
within_fly_out
do
yield
end
end
end
def
within_sidebar
page
.
within
(
'.sidebar-top-level-items'
)
do
...
...
qa/qa/page/project/settings/ci_cd.rb
View file @
8586391e
...
...
@@ -7,6 +7,7 @@ module QA
view
'app/views/projects/settings/ci_cd/show.html.haml'
do
element
:runners_settings
,
'Runners settings'
element
:secret_variables
,
'Secret variables'
end
def
expand_runners_settings
(
&
block
)
...
...
@@ -14,6 +15,12 @@ module QA
Settings
::
Runners
.
perform
(
&
block
)
end
end
def
expand_secret_variables
(
&
block
)
expand_section
(
'Secret variables'
)
do
Settings
::
SecretVariables
.
perform
(
&
block
)
end
end
end
end
end
...
...
qa/qa/page/project/settings/cicd.rb
deleted
100644 → 0
View file @
209c4c5e
module
QA
module
Page
module
Project
module
Settings
class
CICD
<
Page
::
Base
include
Common
view
'app/views/projects/settings/ci_cd/show.html.haml'
do
element
:expand_secret_variables
end
def
expand_secret_variables
(
&
block
)
expand
(
:expand_secret_variables
)
do
SecretVariables
.
perform
(
&
block
)
end
end
end
end
end
end
end
qa/qa/page/project/settings/common.rb
View file @
8586391e
...
...
@@ -12,10 +12,17 @@ module QA
end
def
expand_section
(
name
)
within_section
(
name
)
do
# Don't expand if it's already expanded
click_button
'Expand'
unless
first
(
'button'
,
text:
'Collapse'
)
yield
end
end
def
within_section
(
name
)
page
.
within
(
'#content-body'
)
do
page
.
within
(
'section'
,
text:
name
)
do
click_button
'Expand'
yield
end
end
...
...
qa/qa/page/project/settings/secret_variables.rb
View file @
8586391e
...
...
@@ -3,15 +3,13 @@ module QA
module
Project
module
Settings
class
SecretVariables
<
Page
::
Base
include
Common
view
'app/views/ci/variables/_table.html.haml'
do
element
:variable_key
,
'.variable-key'
element
:variable_value
,
'.variable-value'
end
view
'app/views/projects/settings/ci_cd/show.html.haml'
do
element
:secret_variable
end
def
fill_variable_key
(
key
)
fill_in
'variable_key'
,
with:
key
end
...
...
@@ -36,19 +34,10 @@ module QA
private
def
within_section
page
.
within
(
'.qa-secret-variables'
)
do
yield
end
end
def
reveal_value
within_section
do
click_button
(
'Reveal value'
)
end
yield
.
tap
do
within_section
do
click_button
(
'Hide value'
)
end
end
...
...
@@ -56,5 +45,4 @@ module QA
end
end
end
end
end
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment