Skip to content

Refactor approvals_list_spec to not use js-

ee/spec/frontend/vue_mr_widget/components/approvals/approvals_list_spec.js

Update to use the preferred way of querying DOM elements (from js- to data instead). Will also need to delete all the js- classes (but watch out, some are being used by feature specs, so we want to keep those)

https://docs.gitlab.com/ee/development/testing_guide/frontend_testing.html#how-to-query-dom-elements

It is not recommended that you add .js-* classes just for testing purposes. Only do this if there are no other feasible options available.

Note

  • js-commented-by can be removed
  • Please check if the other js- can also be safely removed
Edited by Samantha Ming