Commit d7caa2f8 authored by Filipe Freire's avatar Filipe Freire

improvements after CR

+ move activity click to side.rb
+ add element check on activity.rb
+ minor fixes
parent 67f6fd46
...@@ -100,7 +100,6 @@ module QA ...@@ -100,7 +100,6 @@ module QA
module Project module Project
autoload :New, 'qa/page/project/new' autoload :New, 'qa/page/project/new'
autoload :Show, 'qa/page/project/show' autoload :Show, 'qa/page/project/show'
autoload :Sidebar, 'qa/page/project/sidebar'
autoload :Activity, 'qa/page/project/activity' autoload :Activity, 'qa/page/project/activity'
module Settings module Settings
......
...@@ -6,6 +6,7 @@ module QA ...@@ -6,6 +6,7 @@ module QA
element :settings_item element :settings_item
element :repository_link, "title: 'Repository'" element :repository_link, "title: 'Repository'"
element :top_level_items, '.sidebar-top-level-items' element :top_level_items, '.sidebar-top-level-items'
element :activity_link, "title: 'Activity'"
end end
def click_repository_setting def click_repository_setting
...@@ -29,6 +30,10 @@ module QA ...@@ -29,6 +30,10 @@ module QA
yield yield
end end
end end
def go_to_activity
click_on class: 'shortcuts-project-activity'
end
end end
end end
end end
......
...@@ -2,12 +2,13 @@ module QA ...@@ -2,12 +2,13 @@ module QA
module Page module Page
module Project module Project
class Activity < Page::Base class Activity < Page::Base
## view 'app/views/shared/_event_filter.html.haml' do
# TODO, define all selectors required by this page object ##
# # TODO, This needs improvement, _event_filter.html.haml
# See gitlab-org/gitlab-qa#155 # doesn't have proper elements defined
# #
view 'app/views/shared/_event_filter.html.haml' element :push_events, '.event-filter'
end
def go_to_push_events def go_to_push_events
click_on 'Push events' click_on 'Push events'
......
module QA
module Page
module Project
class Sidebar < Page::Base
##
# TODO, define all selectors required by this page object
#
# See gitlab-org/gitlab-qa#155
#
view 'app/views/layouts/nav/sidebar/_project.html.haml'
def go_to_activity
click_on class: 'shortcuts-project-activity'
end
end
end
end
end
...@@ -10,12 +10,11 @@ module QA ...@@ -10,12 +10,11 @@ module QA
push.commit_message = 'Add README.md' push.commit_message = 'Add README.md'
end end
Page::Project::Sidebar.act { go_to_activity } Page::Menu::Side.act { go_to_activity }
Page::Project::Activity.act { go_to_push_events } Page::Project::Activity.act { go_to_push_events }
expect(page).to have_content('Add README.md') expect(page).to have_content('pushed new branch master')
expect(page).to have_content('pushed to branch master')
end end
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