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
0
Merge Requests
0
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
Boxiang Sun
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 @@
...
@@ -26,12 +26,12 @@
.settings-content
.settings-content
=
render
'projects/runners/index'
=
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
.settings-header
%h4
%h4
Secret variables
Secret variables
=
link_to
icon
(
'question-circle'
),
help_page_path
(
'ci/variables/README'
,
anchor:
'secret-variables'
),
target:
'_blank'
=
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'
=
expanded
?
'Collapse'
:
'Expand'
%p
%p
=
render
"ci/variables/content"
=
render
"ci/variables/content"
...
...
qa/qa.rb
View file @
8586391e
...
@@ -112,7 +112,6 @@ module QA
...
@@ -112,7 +112,6 @@ module QA
autoload
:Repository
,
'qa/page/project/settings/repository'
autoload
:Repository
,
'qa/page/project/settings/repository'
autoload
:CICD
,
'qa/page/project/settings/ci_cd'
autoload
:CICD
,
'qa/page/project/settings/ci_cd'
autoload
:DeployKeys
,
'qa/page/project/settings/deploy_keys'
autoload
:DeployKeys
,
'qa/page/project/settings/deploy_keys'
autoload
:CICD
,
'qa/page/project/settings/cicd'
autoload
:SecretVariables
,
'qa/page/project/settings/secret_variables'
autoload
:SecretVariables
,
'qa/page/project/settings/secret_variables'
autoload
:Runners
,
'qa/page/project/settings/runners'
autoload
:Runners
,
'qa/page/project/settings/runners'
end
end
...
...
qa/qa/factory/resource/secret_variable.rb
View file @
8586391e
...
@@ -24,9 +24,7 @@ module QA
...
@@ -24,9 +24,7 @@ module QA
def
fabricate!
def
fabricate!
project
.
visit!
project
.
visit!
Page
::
Menu
::
Side
.
act
do
Page
::
Menu
::
Side
.
act
{
click_ci_cd_settings
}
click_ci_cd_settings
end
Page
::
Project
::
Settings
::
CICD
.
perform
do
|
setting
|
Page
::
Project
::
Settings
::
CICD
.
perform
do
|
setting
|
setting
.
expand_secret_variables
do
|
page
|
setting
.
expand_secret_variables
do
|
page
|
...
...
qa/qa/page/menu/side.rb
View file @
8586391e
...
@@ -29,17 +29,21 @@ module QA
...
@@ -29,17 +29,21 @@ module QA
end
end
end
end
def
click_ci_cd_pipelines
within_sidebar
do
click_link
(
'CI / CD'
)
end
end
private
private
def
hover_settings
def
hover_settings
within_sidebar
do
within_sidebar
do
find
(
'.qa-settings-item'
).
hover
find
(
'.qa-settings-item'
).
hover
within_fly_out
do
yield
yield
end
end
end
end
end
def
within_sidebar
def
within_sidebar
page
.
within
(
'.sidebar-top-level-items'
)
do
page
.
within
(
'.sidebar-top-level-items'
)
do
...
...
qa/qa/page/project/settings/ci_cd.rb
View file @
8586391e
...
@@ -7,6 +7,7 @@ module QA
...
@@ -7,6 +7,7 @@ module QA
view
'app/views/projects/settings/ci_cd/show.html.haml'
do
view
'app/views/projects/settings/ci_cd/show.html.haml'
do
element
:runners_settings
,
'Runners settings'
element
:runners_settings
,
'Runners settings'
element
:secret_variables
,
'Secret variables'
end
end
def
expand_runners_settings
(
&
block
)
def
expand_runners_settings
(
&
block
)
...
@@ -14,6 +15,12 @@ module QA
...
@@ -14,6 +15,12 @@ module QA
Settings
::
Runners
.
perform
(
&
block
)
Settings
::
Runners
.
perform
(
&
block
)
end
end
end
end
def
expand_secret_variables
(
&
block
)
expand_section
(
'Secret variables'
)
do
Settings
::
SecretVariables
.
perform
(
&
block
)
end
end
end
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
...
@@ -12,10 +12,17 @@ module QA
end
end
def
expand_section
(
name
)
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
(
'#content-body'
)
do
page
.
within
(
'section'
,
text:
name
)
do
page
.
within
(
'section'
,
text:
name
)
do
click_button
'Expand'
yield
yield
end
end
end
end
...
...
qa/qa/page/project/settings/secret_variables.rb
View file @
8586391e
...
@@ -3,15 +3,13 @@ module QA
...
@@ -3,15 +3,13 @@ module QA
module
Project
module
Project
module
Settings
module
Settings
class
SecretVariables
<
Page
::
Base
class
SecretVariables
<
Page
::
Base
include
Common
view
'app/views/ci/variables/_table.html.haml'
do
view
'app/views/ci/variables/_table.html.haml'
do
element
:variable_key
,
'.variable-key'
element
:variable_key
,
'.variable-key'
element
:variable_value
,
'.variable-value'
element
:variable_value
,
'.variable-value'
end
end
view
'app/views/projects/settings/ci_cd/show.html.haml'
do
element
:secret_variable
end
def
fill_variable_key
(
key
)
def
fill_variable_key
(
key
)
fill_in
'variable_key'
,
with:
key
fill_in
'variable_key'
,
with:
key
end
end
...
@@ -36,19 +34,10 @@ module QA
...
@@ -36,19 +34,10 @@ module QA
private
private
def
within_section
page
.
within
(
'.qa-secret-variables'
)
do
yield
end
end
def
reveal_value
def
reveal_value
within_section
do
click_button
(
'Reveal value'
)
click_button
(
'Reveal value'
)
end
yield
.
tap
do
yield
.
tap
do
within_section
do
click_button
(
'Hide value'
)
click_button
(
'Hide value'
)
end
end
end
end
...
@@ -56,5 +45,4 @@ module QA
...
@@ -56,5 +45,4 @@ module QA
end
end
end
end
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