feat(Pagination,FileUpload): add data-testid support for interactive elements - #1236
Merged
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
Adds data-testid support to interactive UI elements so consumers can attach stable selectors in tests, focusing on Pagination controls, FileUpload’s “Browse” CTA, and Select options.
Changes:
- Add
testIdPrefixsupport toSelectoption rendering to compose per-optiondata-testidvalues. - Add a
'data-testid'prefix prop toPaginationand propagate composed IDs to internal buttons and the page-sizeSelect. - Add a
'data-testid'prefix prop toFileUploadand apply it to the “Browse” span; update Storybook controls/examples.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
| src/Select/Select.component.tsx | Adds testIdPrefix and uses it to generate per-option data-testid values. |
| src/Pagination/PaginationButtons.tsx | Accepts and forwards data-testid to pagination icon button elements. |
| src/Pagination/Pagination.stories.tsx | Exposes a Storybook control/example for the pagination test-id prefix. |
| src/Pagination/Pagination.component.tsx | Introduces a prefix-based testId() helper and wires IDs to internal controls. |
| src/FileUpload/FileUpload.stories.tsx | Exposes a Storybook control/example for the file upload test-id prefix. |
| src/FileUpload/FileUpload.component.tsx | Adds data-testid prefix support and applies it to the “Browse” CTA. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…n based on review feedback
|
Looks good from my end |
Abhishek Khanna (abhishek-6193)
approved these changes
Jul 15, 2026
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.
No description provided.