BigW Consortium Gitlab

Commit 6f15678f by Grzegorz Bizon

Merge branch 'qa-define-selectors' into 'master'

Define QA selectors and remove EE only code Closes gitlab-qa#154 See merge request gitlab-org/gitlab-ce!16767
parents 9d53c15c 07557a94
......@@ -2,12 +2,13 @@ module QA
module Page
module Admin
class Settings < Page::Base
##
# TODO, define all selectors required by this page object
#
# See gitlab-org/gitlab-qa#154
#
view 'app/views/admin/application_settings/show.html.haml'
view 'app/views/admin/application_settings/_form.html.haml' do
element :form_actions, '.form-actions'
element :submit, "submit 'Save'"
element :repository_storage, '%legend Repository Storage'
element :hashed_storage,
'Create new projects using hashed storage paths'
end
def enable_hashed_storage
scroll_to 'legend', text: 'Repository Storage'
......
......@@ -28,31 +28,32 @@ module QA
end
def go_to_new_subgroup
within '.new-project-subgroup' do
# 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
click_new('subgroup')
find("input[data-action='new-subgroup']").click
end
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
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
wait(reload: false) do
find('.dropdown-toggle').click
page.has_css?("li[data-value='new-project']")
page.has_css?(css)
end
find("li[data-value='new-project']").click
end
find("input[data-action='new-project']").click
find(css).click
end
end
end
end
......
......@@ -2,15 +2,8 @@ module QA
module Page
module Menu
class Admin < Page::Base
##
# TODO, define all selectors required by this page object
#
# See gitlab-org/gitlab-qa#154
#
view 'app/views/admin/dashboard/index.html.haml'
def go_to_license
click_link 'License'
view 'app/views/layouts/nav/sidebar/_admin.html.haml' do
element :settings, "_('Settings')"
end
def go_to_settings
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment