Commit 4a85dfd0 authored by Rémy Coutable's avatar Rémy Coutable

Merge branch 'filipefreire_155' into 'master'

gitlab-qa !155 - push creates event on activity page

See merge request gitlab-org/gitlab-ce!16423
parents ab6f4ad4 e48054d3
...@@ -107,6 +107,7 @@ module QA ...@@ -107,6 +107,7 @@ 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 :Activity, 'qa/page/project/activity'
module Settings module Settings
autoload :Common, 'qa/page/project/settings/common' autoload :Common, 'qa/page/project/settings/common'
......
...@@ -7,6 +7,7 @@ module QA ...@@ -7,6 +7,7 @@ module QA
element :repository_link, "title: 'Repository'" element :repository_link, "title: 'Repository'"
element :pipelines_settings_link, "title: 'CI / CD'" element :pipelines_settings_link, "title: 'CI / CD'"
element :top_level_items, '.sidebar-top-level-items' element :top_level_items, '.sidebar-top-level-items'
element :activity_link, "title: 'Activity'"
end end
view 'app/assets/javascripts/fly_out_nav.js' do view 'app/assets/javascripts/fly_out_nav.js' do
...@@ -51,6 +52,12 @@ module QA ...@@ -51,6 +52,12 @@ module QA
end end
end end
def go_to_activity
within_sidebar do
click_on 'Activity'
end
end
def within_submenu def within_submenu
page.within('.fly-out-list') do page.within('.fly-out-list') do
yield yield
......
module QA
module Page
module Project
class Activity < Page::Base
view 'app/views/shared/_event_filter.html.haml' do
element :push_events, "event_filter_link EventFilter.push, _('Push events')"
end
def go_to_push_events
click_on 'Push events'
end
end
end
end
end
module QA
feature 'activity page', :core do
scenario 'push creates an event in the activity page' do
Runtime::Browser.visit(:gitlab, Page::Main::Login)
Page::Main::Login.act { sign_in_using_credentials }
Factory::Repository::Push.fabricate! do |push|
push.file_name = 'README.md'
push.file_content = '# This is a test project'
push.commit_message = 'Add README.md'
end
Page::Menu::Side.act { go_to_activity }
Page::Project::Activity.act { go_to_push_events }
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