Loading
Migrate navigator.clipboard in candidate detail to copyToClipboard
What does this MR do and why?
Replaces the direct navigator.clipboard.writeText call in the ML experiment candidate detail page with copyToClipboard from ~/lib/utils/copy_to_clipboard. This helper also works on non-secure (http) pages, and it lets us remove the no-restricted-properties eslint-disable comment. The spec now mocks copyToClipboard instead of spying on navigator.clipboard.
Closes #579486 (closed).
References
Part of epic &19827.
Screenshots or screen recordings
Not applicable — no visual change.
How to set up and validate locally
- Run
yarn jest spec/frontend/ml/experiment_tracking/routes/candidates/show/candidate_detail_spec.js.
MR acceptance checklist
Evaluate this MR against the MR acceptance checklist.
This contribution was prepared with the help of an AI assistant. I reviewed the changes and take responsibility for them.