Skip to content

feat(Pagination,FileUpload): add data-testid support for interactive elements - #1236

Merged
versha-tkxs merged 2 commits into
betafrom
feature/data-testid-pagination-file-upload
Jul 15, 2026
Merged

feat(Pagination,FileUpload): add data-testid support for interactive elements#1236
versha-tkxs merged 2 commits into
betafrom
feature/data-testid-pagination-file-upload

Conversation

@shubham-telusagcg

Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI review requested due to automatic review settings July 13, 2026 12:43

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 testIdPrefix support to Select option rendering to compose per-option data-testid values.
  • Add a 'data-testid' prefix prop to Pagination and propagate composed IDs to internal buttons and the page-size Select.
  • Add a 'data-testid' prefix prop to FileUpload and 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.

Comment thread src/FileUpload/FileUpload.component.tsx Outdated
Comment thread src/FileUpload/FileUpload.component.tsx
Comment thread src/Select/Select.component.tsx
Comment thread src/Select/Select.component.tsx Outdated
Comment thread src/Select/Select.component.tsx Outdated
Comment thread src/Pagination/PaginationButtons.tsx
Comment thread src/Pagination/PaginationButtons.tsx
Comment thread src/Pagination/Pagination.component.tsx Outdated
@k-monitelusagcg

Copy link
Copy Markdown

Looks good from my end

@versha-tkxs
versha-tkxs merged commit b6b0035 into beta Jul 15, 2026
3 checks passed
@versha-tkxs
versha-tkxs deleted the feature/data-testid-pagination-file-upload branch July 15, 2026 12:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants