Refactor environment empty state to use scope
What does this MR do and why?
The empty state reported that you didn't have any environments regardless of scope, which was a bit misleading if you had many available environments and no stopped environments.
I have refactored the component to allow the scope to be injected so the text can change depending on what scope the user is looking at.
I've also refactored the rest of the translations to follow more up-to-date patterns, and rewritten the tests to utilize the testing library's queries for finding things by role.
Changelog: fixed
Screenshots or screen recordings
How to set up and validate locally
- Navigate to Deployments > Environments on a project with no environments
- Change tabs between available and stopped.
- Examine the change.
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.
For #350992 (closed)
Edited by Andrew Fontaine

