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
bf01452c
Commit
bf01452c
authored
Jan 29, 2018
by
Lin Jen-Shin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Define selectors and remove EE only code
parent
229785d5
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
42 additions
and
34 deletions
+42
-34
qa/qa/page/admin/settings.rb
qa/qa/page/admin/settings.rb
+7
-6
qa/qa/page/group/show.rb
qa/qa/page/group/show.rb
+33
-19
qa/qa/page/menu/admin.rb
qa/qa/page/menu/admin.rb
+2
-9
No files found.
qa/qa/page/admin/settings.rb
View file @
bf01452c
...
@@ -2,12 +2,13 @@ module QA
...
@@ -2,12 +2,13 @@ module QA
module
Page
module
Page
module
Admin
module
Admin
class
Settings
<
Page
::
Base
class
Settings
<
Page
::
Base
##
view
'app/views/admin/application_settings/_form.html.haml'
do
# TODO, define all selectors required by this page object
element
:form_actions
,
'.form-actions'
#
element
:submit
,
"submit 'Save'"
# See gitlab-org/gitlab-qa#154
element
:repository_storage
,
'%legend Repository Storage'
#
element
:hashed_storage
,
view
'app/views/admin/application_settings/show.html.haml'
'Create new projects using hashed storage paths'
end
def
enable_hashed_storage
def
enable_hashed_storage
scroll_to
'legend'
,
text:
'Repository Storage'
scroll_to
'legend'
,
text:
'Repository Storage'
...
...
qa/qa/page/group/show.rb
View file @
bf01452c
...
@@ -2,12 +2,25 @@ module QA
...
@@ -2,12 +2,25 @@ module QA
module
Page
module
Page
module
Group
module
Group
class
Show
<
Page
::
Base
class
Show
<
Page
::
Base
##
view
'app/views/groups/show.html.haml'
do
# TODO, define all selectors required by this page object
element
:dropdown_toggle
,
'.dropdown-toggle'
#
element
:new_project_subgroup
,
'.new-project-subgroup'
# See gitlab-org/gitlab-qa#154
#
element
:new_project_toggle
,
view
'app/views/groups/show.html.haml'
/%li.+ data: { value: "new\-project"/
element
:new_project_button
,
/%input.+ data: { action: "new\-project"/
element
:new_subgroup_toggle
,
/%li.+ data: { value: "new\-subgroup"/
# TODO: input[data-action='new-subgroup'] seems to be handled by JS?
# See app/assets/javascripts/groups/new_group_child.js
end
view
'app/views/shared/groups/_search_form.html.haml'
do
element
:filter_by_name
,
"placeholder: s_('GroupsTree|Filter by name...')"
end
def
go_to_subgroup
(
name
)
def
go_to_subgroup
(
name
)
click_link
name
click_link
name
...
@@ -24,31 +37,32 @@ module QA
...
@@ -24,31 +37,32 @@ module QA
end
end
def
go_to_new_subgroup
def
go_to_new_subgroup
within
'.new-project-subgroup'
do
click_new
(
'subgroup'
)
# May need to click again because it is possible to click the button quicker than the JS is bound
wait
(
reload:
false
)
do
find
(
'.dropdown-toggle'
).
click
page
.
has_css?
(
"li[data-value='new-subgroup']"
)
end
find
(
"li[data-value='new-subgroup']"
).
click
end
find
(
"input[data-action='new-subgroup']"
).
click
find
(
"input[data-action='new-subgroup']"
).
click
end
end
def
go_to_new_project
def
go_to_new_project
click_new
(
'project'
)
find
(
"input[data-action='new-project']"
).
click
end
private
def
click_new
(
kind
)
within
'.new-project-subgroup'
do
within
'.new-project-subgroup'
do
css
=
"li[data-value='new-
#{
kind
}
']"
# May need to click again because it is possible to click the button quicker than the JS is bound
# May need to click again because it is possible to click the button quicker than the JS is bound
wait
(
reload:
false
)
do
wait
(
reload:
false
)
do
find
(
'.dropdown-toggle'
).
click
find
(
'.dropdown-toggle'
).
click
page
.
has_css?
(
"li[data-value='new-project']"
)
page
.
has_css?
(
css
)
end
end
find
(
"li[data-value='new-project']"
).
click
end
find
(
"input[data-action='new-project']"
).
click
find
(
css
).
click
end
end
end
end
end
end
end
...
...
qa/qa/page/menu/admin.rb
View file @
bf01452c
...
@@ -2,15 +2,8 @@ module QA
...
@@ -2,15 +2,8 @@ module QA
module
Page
module
Page
module
Menu
module
Menu
class
Admin
<
Page
::
Base
class
Admin
<
Page
::
Base
##
view
'app/views/layouts/nav/sidebar/_admin.html.haml'
do
# TODO, define all selectors required by this page object
element
:settings
,
"_('Settings')"
#
# See gitlab-org/gitlab-qa#154
#
view
'app/views/admin/dashboard/index.html.haml'
def
go_to_license
click_link
'License'
end
end
def
go_to_settings
def
go_to_settings
...
...
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