fix: flaky test Settings - general tab validate "मानक हिन्दी" language on tooltips
#31384
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
In some of the change language specs, we change the language and immediately click the close settings button. This action can have no effect, if we click before the language is changes, as then there's a re-render and we are still in the settings page.
We need to wait until the language has been changed before proceeding with the next action. For that, we add a check to make sure the language has changed, every time we perform a
changeLanguageaction.ci failure: https://app.circleci.com/pipelines/github/MetaMask/metamask-extension/134139/workflows/c284f602-6903-4a81-a0ac-48a05f987ee7/jobs/4696447/tests
Related issues
Fixes:
Manual testing steps
Screenshots/Recordings
See in the failure artifacts, how after clicking close settings, we still remain in the settings page. The click was performed but took no effect, as after that the page was re-rendered with the new language.
Then we try to look for an element from the home page but that can't be found as we are still in settings
Pre-merge author checklist
Pre-merge reviewer checklist