diff options
author | Lin Jen-Shin <godfat@godfat.org> | 2017-12-29 15:19:58 +0800 |
---|---|---|
committer | Lin Jen-Shin <godfat@godfat.org> | 2018-01-02 22:27:01 +0800 |
commit | bc5552b3594142b6f54a7ac2bc80ee80066c2064 (patch) | |
tree | e68066b6c84d10288e4f1b10c6e76b2c439ac1c9 /qa | |
parent | c91718366d0af94de6d67afe1f2fe35076e20f26 (diff) | |
download | gitlab-ce-bc5552b3594142b6f54a7ac2bc80ee80066c2064.tar.gz |
Introduce Menu::Side
Diffstat (limited to 'qa')
-rw-r--r-- | qa/qa.rb | 4 | ||||
-rw-r--r-- | qa/qa/page/menu/side.rb | 29 | ||||
-rw-r--r-- | qa/qa/page/project/show.rb | 20 | ||||
-rw-r--r-- | qa/qa/specs/features/project/add_deploy_key_spec.rb | 2 |
4 files changed, 34 insertions, 21 deletions
@@ -73,6 +73,10 @@ module QA autoload :OAuth, 'qa/page/main/oauth' end + module Menu + autoload :Side, 'qa/page/menu/side' + end + module Dashboard autoload :Projects, 'qa/page/dashboard/projects' autoload :Groups, 'qa/page/dashboard/groups' diff --git a/qa/qa/page/menu/side.rb b/qa/qa/page/menu/side.rb new file mode 100644 index 00000000000..6c25aba4bac --- /dev/null +++ b/qa/qa/page/menu/side.rb @@ -0,0 +1,29 @@ +module QA + module Page + module Menu + class Side < Page::Base + def click_repository_setting + hover_setting do + click_link('Repository') + end + end + + private + + def hover_setting + within_sidebar do + find('.nav-item-name', text: 'Settings').hover + + yield + end + end + + def within_sidebar + page.within('.sidebar-top-level-items') do + yield + end + end + end + end + end +end diff --git a/qa/qa/page/project/show.rb b/qa/qa/page/project/show.rb index 239fe8efdfd..3b2bac84f3f 100644 --- a/qa/qa/page/project/show.rb +++ b/qa/qa/page/project/show.rb @@ -10,12 +10,6 @@ module QA end end - def click_repository_setting - hover_setting do - click_link('Repository') - end - end - def repository_location find('#project_clone').value end @@ -24,20 +18,6 @@ module QA find('.project-title').text end - def hover_setting - within_sidebar do - find('.nav-item-name', text: 'Settings').hover - - yield - end - end - - def within_sidebar - page.within('.sidebar-top-level-items') do - yield - end - end - def wait_for_push sleep 5 end diff --git a/qa/qa/specs/features/project/add_deploy_key_spec.rb b/qa/qa/specs/features/project/add_deploy_key_spec.rb index 1d1f1c580d1..015b3624c20 100644 --- a/qa/qa/specs/features/project/add_deploy_key_spec.rb +++ b/qa/qa/specs/features/project/add_deploy_key_spec.rb @@ -9,7 +9,7 @@ module QA scenario.description = 'project for adding deploy key test' end - Page::Project::Show.act do + Page::Menu::Side.act do click_repository_setting end end |