diff options
-rw-r--r-- | qa/qa.rb | 2 | ||||
-rw-r--r-- | qa/qa/page/project/activity.rb | 18 | ||||
-rw-r--r-- | qa/qa/page/project/sidebar.rb | 18 | ||||
-rw-r--r-- | qa/qa/specs/features/project/activity_spec.rb | 21 |
4 files changed, 59 insertions, 0 deletions
@@ -100,6 +100,8 @@ 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 autoload :Common, 'qa/page/project/settings/common' diff --git a/qa/qa/page/project/activity.rb b/qa/qa/page/project/activity.rb new file mode 100644 index 00000000000..47bfca087fb --- /dev/null +++ b/qa/qa/page/project/activity.rb @@ -0,0 +1,18 @@ +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' + + def go_to_push_events + click_on 'Push events' + end + end + end + end +end diff --git a/qa/qa/page/project/sidebar.rb b/qa/qa/page/project/sidebar.rb new file mode 100644 index 00000000000..3e4f783f105 --- /dev/null +++ b/qa/qa/page/project/sidebar.rb @@ -0,0 +1,18 @@ +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 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..8934a61b76b --- /dev/null +++ b/qa/qa/specs/features/project/activity_spec.rb @@ -0,0 +1,21 @@ +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::Project::Sidebar.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') + end + end +end |