You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Snapshot tests produce transparent images when a NavigationStack toolbar contains a button with .buttonStyle(.borderedProminent). The same view renders correctly in Xcode Previews and the actual app.
This discussion was converted from issue #1038 on December 24, 2025 21:45.
Heading
Bold
Italic
Quote
Code
Link
Numbered list
Unordered list
Task list
Attach files
Mention
Reference
Menu
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Describe the bug
Snapshot tests produce transparent images when a
NavigationStacktoolbar contains a button with.buttonStyle(.borderedProminent). The same view renders correctly in Xcode Previews and the actual app.To Reproduce
Expected behavior
The snapshot should capture the toolbar with the bordered prominent button visible, matching the appearance in Xcode Preview and the actual app.
Screenshots
The generated snapshot image has correct dimensions (1170x2532) but is completely transparent.
Environment
Additional context
Works correctly:
.borderedProminentbutton outside of toolbar.buttonStyle(.borderedProminent))Fails (transparent):
.borderedProminentbutton inside toolbarThe issue is specific to the combination of
NavigationStacktoolbar +.borderedProminentbutton style in snapshot tests.Beta Was this translation helpful? Give feedback.
All reactions