E2E: Consolidate Group and Project Members Page Objects
What does this MR do and why?
Closes gitlab-org/quality/quality-engineering/team-tasks#1646 (closed)
Many shared Vue components, such as the members table, are used within both the group and project members pages. This MR decomposes several data-qa-selector
elements and methods into smaller page components that can now be shared between qa/qa/page/project/members.rb
and qa/qa/page/group/members.rb
.
This helps keep our code DRY and will unblock adding a new E2E spec project_member_access_request_spec
as part of https://gitlab.com/gitlab-org/gitlab/-/issues/382896+. Without this, several pieces of functionality around group and project member access requests would need to be duplicated between these pages.
New components:
-
qa/qa/page/component/members/members_table.rb
- This component represents page elements and methods related to the members table, including the different members tabs, performing member actions (like updating access or removing members) and filtering members
-
qa/qa/page/component/members/remove_member_modal.rb
- This represents the confirmation modal that displays when removing a member
-
qa/qa/page/component/members/remove_group_modal.rb
- This represents the confirmation modal that displays when removing a group shared to a group or project
-
remove_member_modal
,remove_group_modal
andmembers_filter
are included intomembers_table
rather than the group or project members pages, since the modals are generated from actions taken within the table, and the filter is responsible for filtering members in that table.
How to set up and validate locally
Any tests that use qa/qa/page/project/members.rb
or qa/qa/page/group/members.rb
should still work as expected.
For example, to run group_member_access_request_spec
locally, you can use the following command:
GITLAB_INITIAL_ROOT_PASSWORD=<gdk password> QA_GITLAB_URL=<gdk url> bundle exec rspec qa/specs/features/ee/browser_ui/1_manage/group/group_member_access_request_spec.rb
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.