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
Léo-Paul Géneau
gitlab-ce
Commits
7945878d
Commit
7945878d
authored
Dec 29, 2017
by
Lin Jen-Shin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Introduce common project settings and just put
everything in the scenario without a before block.
parent
9f7fe677
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
24 additions
and
16 deletions
+24
-16
qa/qa.rb
qa/qa.rb
+1
-0
qa/qa/page/project/settings/common.rb
qa/qa/page/project/settings/common.rb
+17
-0
qa/qa/page/project/settings/repository.rb
qa/qa/page/project/settings/repository.rb
+2
-10
qa/qa/specs/features/project/add_deploy_key_spec.rb
qa/qa/specs/features/project/add_deploy_key_spec.rb
+4
-6
No files found.
qa/qa.rb
View file @
7945878d
...
@@ -93,6 +93,7 @@ module QA
...
@@ -93,6 +93,7 @@ module QA
autoload
:Show
,
'qa/page/project/show'
autoload
:Show
,
'qa/page/project/show'
module
Settings
module
Settings
autoload
:Common
,
'qa/page/project/settings/common'
autoload
:Repository
,
'qa/page/project/settings/repository'
autoload
:Repository
,
'qa/page/project/settings/repository'
autoload
:DeployKeys
,
'qa/page/project/settings/deploy_keys'
autoload
:DeployKeys
,
'qa/page/project/settings/deploy_keys'
end
end
...
...
qa/qa/page/project/settings/common.rb
0 → 100644
View file @
7945878d
module
QA
module
Page
module
Project
module
Settings
module
Common
def
expand
(
selector
)
page
.
within
(
'#content-body'
)
do
find
(
selector
).
click
yield
end
end
end
end
end
end
end
qa/qa/page/project/settings/repository.rb
View file @
7945878d
...
@@ -3,21 +3,13 @@ module QA
...
@@ -3,21 +3,13 @@ module QA
module
Project
module
Project
module
Settings
module
Settings
class
Repository
<
Page
::
Base
class
Repository
<
Page
::
Base
include
Common
def
expand_deploy_keys
(
&
block
)
def
expand_deploy_keys
(
&
block
)
expand
(
'.qa-expand-deploy-keys'
)
do
expand
(
'.qa-expand-deploy-keys'
)
do
DeployKeys
.
perform
(
&
block
)
DeployKeys
.
perform
(
&
block
)
end
end
end
end
private
def
expand
(
selector
)
page
.
within
(
'#content-body'
)
do
find
(
selector
).
click
yield
end
end
end
end
end
end
end
end
...
...
qa/qa/specs/features/project/add_deploy_key_spec.rb
View file @
7945878d
module
QA
module
QA
feature
'deploy keys support'
,
:core
do
feature
'deploy keys support'
,
:core
do
before
do
given
(
:deploy_key_title
)
{
'deploy key title'
}
given
(
:deploy_key_value
)
{
Runtime
::
User
.
ssh_key
}
scenario
'user adds a deploy key'
do
Runtime
::
Browser
.
visit
(
:gitlab
,
Page
::
Main
::
Login
)
Runtime
::
Browser
.
visit
(
:gitlab
,
Page
::
Main
::
Login
)
Page
::
Main
::
Login
.
act
{
sign_in_using_credentials
}
Page
::
Main
::
Login
.
act
{
sign_in_using_credentials
}
...
@@ -8,12 +11,7 @@ module QA
...
@@ -8,12 +11,7 @@ module QA
deploy_key
.
title
=
deploy_key_title
deploy_key
.
title
=
deploy_key_title
deploy_key
.
key
=
deploy_key_value
deploy_key
.
key
=
deploy_key_value
end
end
end
given
(
:deploy_key_title
)
{
'deploy key title'
}
given
(
:deploy_key_value
)
{
Runtime
::
User
.
ssh_key
}
scenario
'user adds a deploy key'
do
Page
::
Project
::
Settings
::
Repository
.
perform
do
|
setting
|
Page
::
Project
::
Settings
::
Repository
.
perform
do
|
setting
|
setting
.
expand_deploy_keys
do
|
page
|
setting
.
expand_deploy_keys
do
|
page
|
expect
(
page
).
to
have_key_title
(
deploy_key_title
)
expect
(
page
).
to
have_key_title
(
deploy_key_title
)
...
...
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