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
a33f7050
Commit
a33f7050
authored
Jan 26, 2018
by
Gabriel Mazetto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Backport QA changes from EE
parent
10d8026f
Changes
8
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
87 additions
and
11 deletions
+87
-11
qa/qa.rb
qa/qa.rb
+7
-5
qa/qa/page/dashboard/projects.rb
qa/qa/page/dashboard/projects.rb
+11
-0
qa/qa/page/menu/side.rb
qa/qa/page/menu/side.rb
+6
-0
qa/qa/page/project/settings/advanced.rb
qa/qa/page/project/settings/advanced.rb
+33
-0
qa/qa/page/project/settings/common.rb
qa/qa/page/project/settings/common.rb
+5
-2
qa/qa/page/project/settings/main.rb
qa/qa/page/project/settings/main.rb
+21
-0
qa/qa/page/project/settings/repository.rb
qa/qa/page/project/settings/repository.rb
+2
-2
qa/qa/runtime/browser.rb
qa/qa/runtime/browser.rb
+2
-2
No files found.
qa/qa.rb
View file @
a33f7050
...
@@ -107,18 +107,20 @@ module QA
...
@@ -107,18 +107,20 @@ module QA
autoload
:New
,
'qa/page/project/new'
autoload
:New
,
'qa/page/project/new'
autoload
:Show
,
'qa/page/project/show'
autoload
:Show
,
'qa/page/project/show'
module
Pipeline
autoload
:Index
,
'qa/page/project/pipeline/index'
autoload
:Show
,
'qa/page/project/pipeline/show'
end
module
Settings
module
Settings
autoload
:Common
,
'qa/page/project/settings/common'
autoload
:Common
,
'qa/page/project/settings/common'
autoload
:Advanced
,
'qa/page/project/settings/advanced'
autoload
:Main
,
'qa/page/project/settings/main'
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
:Runners
,
'qa/page/project/settings/runners'
autoload
:Runners
,
'qa/page/project/settings/runners'
end
end
module
Pipeline
autoload
:Index
,
'qa/page/project/pipeline/index'
autoload
:Show
,
'qa/page/project/pipeline/show'
end
end
end
module
Profile
module
Profile
...
...
qa/qa/page/dashboard/projects.rb
View file @
a33f7050
...
@@ -3,10 +3,21 @@ module QA
...
@@ -3,10 +3,21 @@ module QA
module
Dashboard
module
Dashboard
class
Projects
<
Page
::
Base
class
Projects
<
Page
::
Base
view
'app/views/dashboard/projects/index.html.haml'
view
'app/views/dashboard/projects/index.html.haml'
view
'app/views/shared/projects/_search_form.html.haml'
do
element
:form_filter_by_name
,
/form_tag.+id: 'project-filter-form'/
end
def
go_to_project
(
name
)
def
go_to_project
(
name
)
filter_by_name
(
name
)
find_link
(
text:
name
).
click
find_link
(
text:
name
).
click
end
end
def
filter_by_name
(
name
)
page
.
within
(
'form#project-filter-form'
)
do
fill_in
:name
,
with:
name
end
end
end
end
end
end
end
end
...
...
qa/qa/page/menu/side.rb
View file @
a33f7050
...
@@ -31,6 +31,12 @@ module QA
...
@@ -31,6 +31,12 @@ module QA
end
end
end
end
def
go_to_settings
within_sidebar
do
click_on
'Settings'
end
end
private
private
def
hover_settings
def
hover_settings
...
...
qa/qa/page/project/settings/advanced.rb
0 → 100644
View file @
a33f7050
module
QA
module
Page
module
Project
module
Settings
class
Advanced
<
Page
::
Base
view
'app/views/projects/edit.html.haml'
do
element
:project_path_field
,
'f.text_field :path'
element
:project_name_field
,
'f.text_field :name'
element
:rename_project_button
,
"f.submit 'Rename project'"
end
def
rename_to
(
path
)
fill_project_name
(
path
)
fill_project_path
(
path
)
rename_project!
end
def
fill_project_path
(
path
)
fill_in
:project_path
,
with:
path
end
def
fill_project_name
(
name
)
fill_in
:project_name
,
with:
name
end
def
rename_project!
click_on
'Rename project'
end
end
end
end
end
end
qa/qa/page/project/settings/common.rb
View file @
a33f7050
...
@@ -11,12 +11,15 @@ module QA
...
@@ -11,12 +11,15 @@ module QA
end
end
end
end
# Click the Expand button present in the specified section
#
# @param [String] name present in the container in the DOM
def
expand_section
(
name
)
def
expand_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'
click_button
(
'Expand'
)
yield
yield
if
block_given?
end
end
end
end
end
end
...
...
qa/qa/page/project/settings/main.rb
0 → 100644
View file @
a33f7050
module
QA
module
Page
module
Project
module
Settings
class
Main
<
Page
::
Base
include
Common
view
'app/views/projects/edit.html.haml'
do
element
:advanced_settings_section
,
'Advanced settings'
end
def
expand_advanced_settings
(
&
block
)
expand_section
(
'Advanced settings'
)
do
Advanced
.
perform
(
&
block
)
end
end
end
end
end
end
end
qa/qa/page/project/settings/repository.rb
View file @
a33f7050
...
@@ -6,11 +6,11 @@ module QA
...
@@ -6,11 +6,11 @@ module QA
include
Common
include
Common
view
'app/views/projects/deploy_keys/_index.html.haml'
do
view
'app/views/projects/deploy_keys/_index.html.haml'
do
element
:
expand_deploy_keys
element
:
deploy_keys_section
,
'Deploy Keys'
end
end
def
expand_deploy_keys
(
&
block
)
def
expand_deploy_keys
(
&
block
)
expand
(
:expand_deploy_keys
)
do
expand
_section
(
'Deploy Keys'
)
do
DeployKeys
.
perform
(
&
block
)
DeployKeys
.
perform
(
&
block
)
end
end
end
end
...
...
qa/qa/runtime/browser.rb
View file @
a33f7050
...
@@ -23,11 +23,11 @@ module QA
...
@@ -23,11 +23,11 @@ module QA
# In case of an address that is a symbol we will try to guess address
# In case of an address that is a symbol we will try to guess address
# based on `Runtime::Scenario#something_address`.
# based on `Runtime::Scenario#something_address`.
#
#
def
visit
(
address
,
page
,
&
block
)
def
visit
(
address
,
page
=
nil
,
&
block
)
Browser
::
Session
.
new
(
address
,
page
).
perform
(
&
block
)
Browser
::
Session
.
new
(
address
,
page
).
perform
(
&
block
)
end
end
def
self
.
visit
(
address
,
page
,
&
block
)
def
self
.
visit
(
address
,
page
=
nil
,
&
block
)
new
.
visit
(
address
,
page
,
&
block
)
new
.
visit
(
address
,
page
,
&
block
)
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