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
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
autoload
:Show
,
'qa/page/project/show'
module
Settings
autoload
:Common
,
'qa/page/project/settings/common'
autoload
:Repository
,
'qa/page/project/settings/repository'
autoload
:DeployKeys
,
'qa/page/project/settings/deploy_keys'
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
module
Project
module
Settings
class
Repository
<
Page
::
Base
include
Common
def
expand_deploy_keys
(
&
block
)
expand
(
'.qa-expand-deploy-keys'
)
do
DeployKeys
.
perform
(
&
block
)
end
end
private
def
expand
(
selector
)
page
.
within
(
'#content-body'
)
do
find
(
selector
).
click
yield
end
end
end
end
end
...
...
qa/qa/specs/features/project/add_deploy_key_spec.rb
View file @
7945878d
module
QA
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
)
Page
::
Main
::
Login
.
act
{
sign_in_using_credentials
}
...
...
@@ -8,12 +11,7 @@ module QA
deploy_key
.
title
=
deploy_key_title
deploy_key
.
key
=
deploy_key_value
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
|
setting
.
expand_deploy_keys
do
|
page
|
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