diff options
author | Filipe Freire <livrofubia@gmail.com> | 2018-01-16 23:20:57 +0300 |
---|---|---|
committer | Filipe Freire <livrofubia@gmail.com> | 2018-01-16 23:20:57 +0300 |
commit | d7caa2f8ccf554cdd0763db0cca1dc1c39ba30df (patch) | |
tree | d9754672bf9d6b291c9fd9c807e3b652b655ef04 /qa | |
parent | 67f6fd46501442f9048465e94b8d3e3d5b6a297e (diff) |
improvements after CR
+ move activity click to side.rb
+ add element check on activity.rb
+ minor fixes
Diffstat (limited to 'qa')
-rw-r--r-- | qa/qa.rb | 1 | ||||
-rw-r--r-- | qa/qa/page/menu/side.rb | 5 | ||||
-rw-r--r-- | qa/qa/page/project/activity.rb | 13 | ||||
-rw-r--r-- | qa/qa/page/project/sidebar.rb | 18 | ||||
-rw-r--r-- | qa/qa/specs/features/project/activity_spec.rb | 5 |
5 files changed, 14 insertions, 28 deletions
@@ -100,7 +100,6 @@ 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 diff --git a/qa/qa/page/menu/side.rb b/qa/qa/page/menu/side.rb index 1df4e0c2429..3361fd188cb 100644 --- a/qa/qa/page/menu/side.rb +++ b/qa/qa/page/menu/side.rb @@ -6,6 +6,7 @@ module QA element :settings_item element :repository_link, "title: 'Repository'" element :top_level_items, '.sidebar-top-level-items' + element :activity_link, "title: 'Activity'" end def click_repository_setting @@ -29,6 +30,10 @@ module QA yield end end + + def go_to_activity + click_on class: 'shortcuts-project-activity' + end end end end diff --git a/qa/qa/page/project/activity.rb b/qa/qa/page/project/activity.rb index 47bfca087fb..d766dbfb8f6 100644 --- a/qa/qa/page/project/activity.rb +++ b/qa/qa/page/project/activity.rb @@ -2,12 +2,13 @@ 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' + view 'app/views/shared/_event_filter.html.haml' do + ## + # TODO, This needs improvement, _event_filter.html.haml + # doesn't have proper elements defined + # + element :push_events, '.event-filter' + end def go_to_push_events click_on 'Push events' diff --git a/qa/qa/page/project/sidebar.rb b/qa/qa/page/project/sidebar.rb deleted file mode 100644 index 3e4f783f105..00000000000 --- a/qa/qa/page/project/sidebar.rb +++ /dev/null @@ -1,18 +0,0 @@ -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 8934a61b76b..ba94ce8cf28 100644 --- a/qa/qa/specs/features/project/activity_spec.rb +++ b/qa/qa/specs/features/project/activity_spec.rb @@ -10,12 +10,11 @@ module QA push.commit_message = 'Add README.md' end - Page::Project::Sidebar.act { go_to_activity } + Page::Menu::Side.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') + expect(page).to have_content('pushed new branch master') end end end |