Commit bc5552b3 authored by Lin Jen-Shin's avatar Lin Jen-Shin

Introduce Menu::Side

parent c9171836
...@@ -73,6 +73,10 @@ module QA ...@@ -73,6 +73,10 @@ module QA
autoload :OAuth, 'qa/page/main/oauth' autoload :OAuth, 'qa/page/main/oauth'
end end
module Menu
autoload :Side, 'qa/page/menu/side'
end
module Dashboard module Dashboard
autoload :Projects, 'qa/page/dashboard/projects' autoload :Projects, 'qa/page/dashboard/projects'
autoload :Groups, 'qa/page/dashboard/groups' autoload :Groups, 'qa/page/dashboard/groups'
......
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
...@@ -10,12 +10,6 @@ module QA ...@@ -10,12 +10,6 @@ module QA
end end
end end
def click_repository_setting
hover_setting do
click_link('Repository')
end
end
def repository_location def repository_location
find('#project_clone').value find('#project_clone').value
end end
...@@ -24,20 +18,6 @@ module QA ...@@ -24,20 +18,6 @@ module QA
find('.project-title').text find('.project-title').text
end 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 def wait_for_push
sleep 5 sleep 5
end end
......
...@@ -9,7 +9,7 @@ module QA ...@@ -9,7 +9,7 @@ module QA
scenario.description = 'project for adding deploy key test' scenario.description = 'project for adding deploy key test'
end end
Page::Project::Show.act do Page::Menu::Side.act do
click_repository_setting click_repository_setting
end end
end end
......
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