Add data attribute for suggested reviewers
What does this MR do and why?
This clearly identifies suggested users to automated tests (previously the only indicator was relative position, which is less reliable).
To be used in !100890 (merged)
Part of gitlab-org/quality/testcases#3245 (closed)
Screenshots or screen recordings
No visible UI change.
How to set up and validate locally
- Ensure a SaaS (Gitlab.com) environment
- One way of doing this is to add a
env.runitfile to the root GDK folder with the following snippet exportGITLAB_SIMULATE_SAAS=1
- One way of doing this is to add a
- Set ultimate license on a group http://gdk.test:3000/admin/groups
- Create a project in the ultimate group
- Set the feature flags on rails console
bin/rails c
project = Project.find(id-of-your-project) in the rail console
Feature.enable(:suggested_reviewers, project)
Feature.enable(:suggested_reviewers_control, project)
- Enable the Suggested Reviewers feature via Project > Settings > Merge Requests > Enable suggested reviewers
- Create a merge request on the project
- Add some members to the group. Let's say a user
ronnie - Add some suggestions on rails console
bin/rails c
mr = project.merge_requests.first
mr.build_predictions
mr.predictions.update!(suggested_reviewers: { reviewers: ['ronnie'] })
- Go to the merge request and click the reviewers. You should see ronnie as suggested
- Use developer tools to inspect the DOM. Only the
lielement for ronnie should have adata-user-suggested="true"attribute.
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.
Edited by Mark Lapierre

