(test) O3-4968: Add E2E tests for TranslationBuilder component#833
Open
Bharath-K-Shetty wants to merge 30 commits into
Open
(test) O3-4968: Add E2E tests for TranslationBuilder component#833Bharath-K-Shetty wants to merge 30 commits into
Bharath-K-Shetty wants to merge 30 commits into
Conversation
anjula-sack
suggested changes
Aug 17, 2025
Contributor
|
Tests are so important. Thank you so much @Bharath-K-Shetty for your continued work on this really important tooling!! |
NethmiRodrigo
requested changes
Aug 21, 2025
NethmiRodrigo
requested changes
Aug 23, 2025
NethmiRodrigo
left a comment
Collaborator
There was a problem hiding this comment.
Close @Bharath-K-Shetty, a few more changes
Contributor
Author
|
All test workflows works good now. @NethmiRodrigo
|
anjula-sack
suggested changes
Aug 25, 2025
| await addFormResources(api, valueReference, formUuid); | ||
| }); | ||
|
|
||
| test('Manage translations: switch languages, filter, and search', async ({ page }) => { |
Contributor
There was a problem hiding this comment.
Steps should go like this,
When I open the language dropdown
Then I should see the language list
And I should see "English (en)" in the language list
When I select the "All" translations tab
Then the "All" translations tab should be selected
When I select the "Translated" translations tab
Then I should see 0 "translated" entries
When I select the "Untranslated" translations tab
Then the "Untranslated" translations tab should be selected
And I should see at least 1 "untranslated" entry
When I search translations for "Visit Details"
Then the translation search input should contain "Visit Details"
And I should see at least 1 translation result
And the first translation result should be visible
anjula-sack
reviewed
Aug 30, 2025
anjula-sack
reviewed
Aug 30, 2025
anjula-sack
reviewed
Aug 30, 2025
anjula-sack
reviewed
Aug 30, 2025
| await expect(results).not.toHaveCount(0); | ||
| }); | ||
|
|
||
| await test.step('And the first translation result should be visible', async () => { |
Collaborator
There was a problem hiding this comment.
suggestion: Shouldn't this include that the translation result should contain the word visit details?
| labelText={t('translationValue', 'Translated Value')} | ||
| value={newValue} | ||
| onChange={(e) => setNewValue(e.target.value)} | ||
| data-testid="translation-value-input" |
Collaborator
There was a problem hiding this comment.
question: Is the data test id necessary? Can't we target the button from the label text?
| onClick={() => handleEditClick(key)} | ||
| size="md" | ||
| className={styles.deleteButton} | ||
| data-testid="edit-translation-button" |
Collaborator
There was a problem hiding this comment.
Same question here about the label
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.

Requirements
Summary
This PR adds comprehensive end-to-end tests for the TranslationBuilder component to ensure proper functionality and user experience across different workflows.
Test Coverage
Screenshots
Related Issue
https://openmrs.atlassian.net/browse/O3-4968
Other