summaryrefslogtreecommitdiff
path: root/qa
diff options
context:
space:
mode:
authorFilipe Freire <livrofubia@gmail.com>2018-01-12 17:43:13 +0000
committerFilipe Freire <livrofubia@gmail.com>2018-01-12 17:45:08 +0000
commita1a5d142981379087ca7183d402300a3a3b6ad52 (patch)
tree38eb6dd7cf20098cd39f2243b5b91992aa0f4c9b /qa
parentd0a4ab21f0927fa602e1bab972f545e29d8cf206 (diff)
downloadgitlab-ce-a1a5d142981379087ca7183d402300a3a3b6ad52.tar.gz
improvement after CR
- test reaches Activity page - the actual git push seems to be failing - had problems with defining selectors
Diffstat (limited to 'qa')
-rw-r--r--qa/qa.rb2
-rw-r--r--qa/qa/page/project/activity.rb15
-rw-r--r--qa/qa/page/project/sidebar.rb18
-rw-r--r--qa/qa/specs/features/project/activity_spec.rb2
4 files changed, 29 insertions, 8 deletions
diff --git a/qa/qa.rb b/qa/qa.rb
index 4803432aeee..5562d59abe4 100644
--- a/qa/qa.rb
+++ b/qa/qa.rb
@@ -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
index c343266f01d..47bfca087fb 100644
--- a/qa/qa/page/project/activity.rb
+++ b/qa/qa/page/project/activity.rb
@@ -2,16 +2,15 @@ module QA
module Page
module Project
class Activity < Page::Base
- view 'app/views/shared/_event_filter.html.haml' do
- element :push_events_button, 'Push events'
- end
+ ##
+ # 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_link :push_events_button
- end
-
- def self.path
- '/activity'
+ click_on 'Push events'
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
index 3dd82bb0587..8934a61b76b 100644
--- a/qa/qa/specs/features/project/activity_spec.rb
+++ b/qa/qa/specs/features/project/activity_spec.rb
@@ -10,6 +10,8 @@ module QA
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')