diff options
Diffstat (limited to 'qa/qa')
-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 |
3 files changed, 42 insertions, 0 deletions
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 |