Merge branch 'filipefreire_155' into 'master'

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

See merge request gitlab-org/gitlab-ce!16423
This commit is contained in:
Rémy Coutable 2018-01-26 11:21:59 +00:00
commit 4a85dfd0b2
4 changed files with 43 additions and 0 deletions

View file

@ -107,6 +107,7 @@ module QA
module Project
autoload :New, 'qa/page/project/new'
autoload :Show, 'qa/page/project/show'
autoload :Activity, 'qa/page/project/activity'
module Settings
autoload :Common, 'qa/page/project/settings/common'

View file

@ -7,6 +7,7 @@ module QA
element :repository_link, "title: 'Repository'"
element :pipelines_settings_link, "title: 'CI / CD'"
element :top_level_items, '.sidebar-top-level-items'
element :activity_link, "title: 'Activity'"
end
view 'app/assets/javascripts/fly_out_nav.js' do
@ -51,6 +52,12 @@ module QA
end
end
def go_to_activity
within_sidebar do
click_on 'Activity'
end
end
def within_submenu
page.within('.fly-out-list') do
yield

View file

@ -0,0 +1,15 @@
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

View file

@ -0,0 +1,20 @@
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