Skip to content

Phase out `data-qa-selector` and replace it with `data-testid`

Phase out data-qa-selector and replace it with data-testid attributes

As per #1741 (closed) task from issue #1735 (closed)

Here is a small MR showing example changes including using an existing testid - gitlab-org/gitlab!122910 (diffs)

There is also an example in the change MR itself - gitlab-org/gitlab!121266 (diffs) (see security_configuration vue files)

I’m here to help/review etc. The plan is to deprecate and remove data-qa-selector entirely.

Details:

  • Use kebab-case for testid testid="kebab-case-attribute"
  • Use strings for page elements - element :push_the_button becomes element 'push-the-button'

Remaining selector codebase directories:

Remaining selectors by location:

Edited by Will Meek