summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFilipe Freire <livrofubia@gmail.com>2018-01-12 09:45:02 +0000
committerFilipe Freire <livrofubia@gmail.com>2018-01-12 09:45:02 +0000
commitae09f8a70a2e848c4a5fc70ac4ccff1bc3874eed (patch)
treebab15c104133c48960abe32703a3ca848ab5296a
parent16e895801e5ba2f27de6d33511c8ac46297048eb (diff)
downloadgitlab-ce-ae09f8a70a2e848c4a5fc70ac4ccff1bc3874eed.tar.gz
gitlab-qa !155 push creates event on activity page
-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