Skip to content

[code-infra] Wait for data-screenshot-pending before regression screenshots - #23772

Merged
Janpot merged 5 commits into
mui:masterfrom
Janpot:regressions-screenshot-pending
Oct 19, 2026
Merged

Janpot merged 5 commits into
mui:masterfrom
Janpot:regressions-screenshot-pending

Conversation

@Janpot

@Janpot Janpot commented Oct 5, 2026 •

Copy link
Copy Markdown
Member

Follow-up to #23748. TailwindChatDemo sometimes got captured as a spinner: TailwindDemoContainer loads Tailwind from the network, and the regression runner only waits for fonts and fake timers.

  • Elements inside a test case can render data-screenshot-pending while they load something the timer flush doesn't cover. navigateToTest waits until none is left.
  • TailwindDemoContainer sets it on its spinner. This replaces the GridToolbarCustom rule.
  • The map image fixtures use it too, instead of their map-images-ready sentinel and two rules.
  • The viewer uses it too, as a hidden child of the test case until it mounted and fonts loaded, instead of aria-busy on the test case. The runner checks one condition: :not(:has([data-screenshot-pending])).

aria-busy isn't used for this: chat messages and the tree view set it on purpose while streaming or lazy loading.

Janpot added 2 commits October 5, 2026 10:50
TailwindDemoContainer shows a spinner until the Tailwind script loads from
the network, which made TailwindChatDemo flaky. It now marks the spinner
with data-screenshot-pending, and navigateToTest waits until no such marker
is left in the test case. Any demo can use it while it loads something the
timer flush doesn't cover. This replaces the GridToolbarCustom rule.
Replaces the map-images-ready sentinel and its two route rules, and the
1x1 visible-div workaround it needed.
@code-infra-dashboard

code-infra-dashboard Bot commented Oct 5, 2026 •

Copy link
Copy Markdown

Deploy preview

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

Bundle size

Bundle Parsed size Gzip size
@mui/x-data-grid 0B(0.00%) 0B(0.00%)
@mui/x-data-grid-pro 0B(0.00%) 0B(0.00%)
@mui/x-data-grid-premium 0B(0.00%) 0B(0.00%)
@mui/x-charts 0B(0.00%) 0B(0.00%)
@mui/x-charts-pro 0B(0.00%) 0B(0.00%)
@mui/x-charts-premium 0B(0.00%) 0B(0.00%)
@mui/x-date-pickers 0B(0.00%) 0B(0.00%)
@mui/x-date-pickers-pro 0B(0.00%) 0B(0.00%)
@mui/x-tree-view 0B(0.00%) 0B(0.00%)
@mui/x-tree-view-pro 0B(0.00%) 0B(0.00%)
@mui/x-scheduler 0B(0.00%) 0B(0.00%)
@mui/x-scheduler-premium 0B(0.00%) 0B(0.00%)
@mui/x-chat 0B(0.00%) 0B(0.00%)
@mui/x-license 0B(0.00%) 0B(0.00%)

Details of bundle changes


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

The test case rendered aria-busy until it mounted and fonts loaded. It now
renders a hidden data-screenshot-pending child instead, so the runner checks
one condition and aria-busy isn't used as a test signal.
@LukasTy LukasTy added test type: enhancement It’s an improvement, but we can’t make up our mind whether it's a bug fix or a new feature. scope: code-infra Involves the code-infra product (https://www.notion.so/mui-org/5562c14178aa42af97bc1fa5114000cd). labels Oct 5, 2026

@LukasTy LukasTy left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM. 👍

@Janpot
Janpot marked this pull request as ready for review October 5, 2026 14:08
@Janpot
Janpot enabled auto-merge (squash) October 5, 2026 14:08
@Janpot
Janpot merged commit 6285b4d into mui:master Oct 19, 2026
22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

scope: code-infra Involves the code-infra product (https://www.notion.so/mui-org/5562c14178aa42af97bc1fa5114000cd). test type: enhancement It’s an improvement, but we can’t make up our mind whether it's a bug fix or a new feature.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants