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