summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--qa/qa/page/activity/activity.rb18
-rw-r--r--qa/qa/specs/features/activity/activity_spec.rb24
2 files changed, 42 insertions, 0 deletions
diff --git a/qa/qa/page/activity/activity.rb b/qa/qa/page/activity/activity.rb
new file mode 100644
index 00000000000..fc885deedf1
--- /dev/null
+++ b/qa/qa/page/activity/activity.rb
@@ -0,0 +1,18 @@
+module QA
+ module Page
+ module Activity
+ class Activity < Page::Base
+ ##
+ # TODO, define all selectors required by this page object
+ #
+ # See gitlab-org/gitlab-qa#155
+ #
+ view 'app/views/projects/activity.html.haml'
+
+ def go_to_push_events
+ click_button 'Push events'
+ end
+ end
+ end
+ end
+end
diff --git a/qa/qa/specs/features/activity/activity_spec.rb b/qa/qa/specs/features/activity/activity_spec.rb
new file mode 100644
index 00000000000..5eab95c95f3
--- /dev/null
+++ b/qa/qa/specs/features/activity/activity_spec.rb
@@ -0,0 +1,24 @@
+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::Resource::Project.fabricate! do |project|
+ project.name = 'awesome-project'
+ project.description = 'create awesome project test'
+ end
+
+ 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::Activity::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