Skip to content

[material-ui][Pagination] Add tests for page links near the edges - #49120

Draft
Janpot wants to merge 1 commit into
mui:masterfrom
Janpot:test/pagination-edge-page-links
Draft

[material-ui][Pagination] Add tests for page links near the edges#49120
Janpot wants to merge 1 commit into
mui:masterfrom
Janpot:test/pagination-edge-page-links

Conversation

@Janpot

@Janpot Janpot commented Sep 9, 2026

Copy link
Copy Markdown
Member

With boundaryCount={0} siblingCount={0} we lose a page link when the current page is one of the first two or last two. On an 11-page pagination, page 1 loses the link to page 2. It happens at every count from 4 up. These tests pass on master and fail on #49090.

Two of them matter most: the edge invariant here and the button-count test in Pagination.test.js. They also pass under a fix that just strips the ellipses and keeps the links, so they don't assume one implementation. The three deep-equal tests pin the ellipses too, so any version of this feature will need to update them.

Draft because it may be easier to fold these into #49090.

@code-infra-dashboard

Copy link
Copy Markdown

Deploy preview

https://deploy-preview-49120--material-ui.netlify.app/
QR code for https://deploy-preview-49120--material-ui.netlify.app/

Bundle size

Bundle Parsed size Gzip size
@mui/material 0B(0.00%) 0B(0.00%)
@mui/lab 0B(0.00%) 0B(0.00%)
@mui/private-theming 0B(0.00%) 0B(0.00%)
@mui/system 0B(0.00%) 0B(0.00%)
@mui/utils 0B(0.00%) 0B(0.00%)

Details of bundle changes


Check out the code infra dashboard for more information about this PR.

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.

1 participant