diff options
author | Walmyr <walmyr@gitlab.com> | 2019-03-18 18:18:06 +0300 |
---|---|---|
committer | Mark Lapierre <mlapierre@gitlab.com> | 2019-03-18 18:18:06 +0300 |
commit | 7561241525f9457e25f7819eb4015e6221e571e5 (patch) | |
tree | 4fbbcb05d1251e243ee54421a45bec9c2a1a79bf /qa | |
parent | f012e93482c93c754efa9b84025cea7ad83acdc9 (diff) |
Use the same standard for method names on project activity and menu
... page objects.
Also, update the affected test case.
I choose `click_...` instead of `go_to_...` since it describes
better what the method really does, which is clicking on something.
I know there are other places in the code where methods start with
`click_` and others where methods start with `go_to_`, with that
I'd like to start a discussion or be pointed to the right issue if
there is already one so that we can address this in the whole
framework.
This contribution could be the start in the direction of using the
standard chosen here.
Diffstat (limited to 'qa')
-rw-r--r-- | qa/qa/page/project/activity.rb | 2 | ||||
-rw-r--r-- | qa/qa/page/project/menu.rb | 2 | ||||
-rw-r--r-- | qa/qa/specs/features/browser_ui/1_manage/project/view_project_activity_spec.rb | 4 |
3 files changed, 4 insertions, 4 deletions
diff --git a/qa/qa/page/project/activity.rb b/qa/qa/page/project/activity.rb index 56fbaa90790..afd4f49a844 100644 --- a/qa/qa/page/project/activity.rb +++ b/qa/qa/page/project/activity.rb @@ -6,7 +6,7 @@ module QA element :push_events, "event_filter_link EventFilter::PUSH, _('Push events')" # rubocop:disable QA/ElementWithPattern end - def go_to_push_events + def click_push_events click_on 'Push events' end end diff --git a/qa/qa/page/project/menu.rb b/qa/qa/page/project/menu.rb index 46dfe87fe25..3fe048f752a 100644 --- a/qa/qa/page/project/menu.rb +++ b/qa/qa/page/project/menu.rb @@ -30,7 +30,7 @@ module QA end end - def go_to_activity + def click_activity within_sidebar do click_element(:activity_link) end diff --git a/qa/qa/specs/features/browser_ui/1_manage/project/view_project_activity_spec.rb b/qa/qa/specs/features/browser_ui/1_manage/project/view_project_activity_spec.rb index d4cedc9362d..fe92fbd3ffe 100644 --- a/qa/qa/specs/features/browser_ui/1_manage/project/view_project_activity_spec.rb +++ b/qa/qa/specs/features/browser_ui/1_manage/project/view_project_activity_spec.rb @@ -14,8 +14,8 @@ module QA end project_push.project.visit! - Page::Project::Menu.perform(&:go_to_activity) - Page::Project::Activity.perform(&:go_to_push_events) + Page::Project::Menu.perform(&:click_activity) + Page::Project::Activity.perform(&:click_push_events) expect(page).to have_content('pushed new branch master') end |