diff options
author | Rémy Coutable <remy@rymai.me> | 2018-01-26 14:21:59 +0300 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2018-01-26 14:21:59 +0300 |
commit | 4a85dfd0b23dae6dd38aa6fe850e3e69361cf8f9 (patch) | |
tree | e0998a0ac9957b2af534aa211891527258d03f06 | |
parent | ab6f4ad4c738df5387dd01302622cc67f78952d7 (diff) | |
parent | e48054d3e4d074bf6f3820820400bd10a69a0cfe (diff) |
Merge branch 'filipefreire_155' into 'master'
gitlab-qa !155 - push creates event on activity page
See merge request gitlab-org/gitlab-ce!16423
-rw-r--r-- | qa/qa.rb | 1 | ||||
-rw-r--r-- | qa/qa/page/menu/side.rb | 7 | ||||
-rw-r--r-- | qa/qa/page/project/activity.rb | 15 | ||||
-rw-r--r-- | qa/qa/specs/features/project/activity_spec.rb | 20 |
4 files changed, 43 insertions, 0 deletions
@@ -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' diff --git a/qa/qa/page/menu/side.rb b/qa/qa/page/menu/side.rb index 239f2872228..8978f2fa0fd 100644 --- a/qa/qa/page/menu/side.rb +++ b/qa/qa/page/menu/side.rb @@ -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 diff --git a/qa/qa/page/project/activity.rb b/qa/qa/page/project/activity.rb new file mode 100644 index 00000000000..0196922c889 --- /dev/null +++ b/qa/qa/page/project/activity.rb @@ -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 diff --git a/qa/qa/specs/features/project/activity_spec.rb b/qa/qa/specs/features/project/activity_spec.rb new file mode 100644 index 00000000000..ba94ce8cf28 --- /dev/null +++ b/qa/qa/specs/features/project/activity_spec.rb @@ -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 |