Skip to content

Removes localized testid from badge

Miguel Rincon requested to merge 423029-remove-localized-ci-badge-testid into master

What does this MR do and why?

This change removes the localized testid in the status badge as the text can be translated and it's not a reliable identifier of a badge.

For example, in lib/gitlab/ci/status/failed.rb we have a text value of s_('CiStatusText|failed'), which means this text is relatively arbitrary and may change according to localization, making it unsuitable to use as testid.

Tests are fixed to replace this dependency and use text instead.

How is this related to #423029 (closed)?

Once we have selectors based on text: we will be able to easily update the tests to locate the right text values instead of the testid.

Screenshots or screen recordings

NA

How to set up and validate locally

A pipeline passing!

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #423029 (closed)

Edited by Miguel Rincon

Merge request reports