Skip to content

Conversation

philprime
Copy link
Member

📜 Description

Adds additional unit tests for masking SwiftUI views.

💡 Motivation and Context

This pull request extends masking tests introduced with #6292 and intends to cover all of the SwiftUI components masked by default in our SDK.

💚 How did you test it?

Created Unit Tests

📝 Checklist

You have to check all boxes before merging:

  • I added tests to verify the changes.
  • No new PII added or SDK only sends newly added PII if sendDefaultPII is enabled.
  • I updated the docs if needed.
  • I updated the wizard if needed.
  • Review from the native team if needed.
  • No breaking change or entry added to the changelog.
  • No breaking change for hybrid SDKs or communicated to hybrid SDKs.

@philprime philprime changed the base branch from main to philprime/fix-masking October 15, 2025 08:30
@philprime philprime self-assigned this Oct 15, 2025
Copy link

codecov bot commented Oct 15, 2025

❌ 41 Tests Failed:

Tests completed Failed Passed Skipped
4046 41 4005 11
View the top 3 failed test(s) by shortest run time
SentryTests.SentryUIRedactBuilderTests_Common::testAddIgnoreClasses_arrayAPI_shouldNotRedactViews
Stack Traces | 0s run time
.../SentryTests/ViewCapture/SentryUIRedactBuilderTests+Common.swift:1010 - failed - No reference was found on disk. Automatically recorded snapshot: …
SentryTests.SentryUIRedactBuilderTests_Common::testDefaultIgnoredControls_shouldNotRedactUISlider
Stack Traces | 0s run time
.../SentryTests/ViewCapture/SentryUIRedactBuilderTests+Common.swift:1094 - failed - No reference was found on disk. Automatically recorded snapshot: …
SentryTests.SentryUIRedactBuilderTests_Common::testDefaultIgnoredControls_shouldNotRedactUISwitch
Stack Traces | 0s run time
.../SentryTests/ViewCapture/SentryUIRedactBuilderTests+Common.swift:1124 - failed - No reference was found on disk. Automatically recorded snapshot: …
SentryTests.SentryUIRedactBuilderTests_Common::testOptions_unmaskedViewClasses_shouldIgnoreCustomLabel
Stack Traces | 0s run time
.../SentryTests/ViewCapture/SentryUIRedactBuilderTests+Common.swift:888 - failed - No reference was found on disk. Automatically recorded snapshot: …
SentryTests.SentryUIRedactBuilderTests_Common::testUnmaskView_withSensitiveView_shouldNotRedactView
Stack Traces | 0s run time
.../SentryTests/ViewCapture/SentryUIRedactBuilderTests+Common.swift:637 - failed - No reference was found on disk. Automatically recorded snapshot: …
SentryTests.SentryUIRedactBuilderTests_Common::testUnmaskView_withSensitiveView_withViewExtension_shouldNotRedactView
Stack Traces | 0s run time
.../SentryTests/ViewCapture/SentryUIRedactBuilderTests+Common.swift:725 - failed - No reference was found on disk. Automatically recorded snapshot: …
SentryTests.SentryUIRedactBuilderTests_SpecialViews::testRedact_withPDFView_withMaskingDisabled_shouldBeRedacted
Stack Traces | 0s run time
.../SentryTests/ViewCapture/SentryUIRedactBuilderTests+SpecialViews.swift:84 - failed - Snapshot does not match reference.
SentryTests.SentryUIRedactBuilderTests_SpecialViews::testRedact_withPDFView_withMaskingEnabled_shouldBeRedacted
Stack Traces | 0s run time
.../SentryTests/ViewCapture/SentryUIRedactBuilderTests+SpecialViews.swift:56 - failed - Snapshot does not match reference.
SentryTests.SentryUIRedactBuilderTests_SpecialViews::testRedact_withSFSafariView_withMaskingDisabled_shouldRedactView
Stack Traces | 0s run time
.../SentryTests/ViewCapture/SentryUIRedactBuilderTests+SpecialViews.swift:333 - failed - No reference was found on disk. Automatically recorded snapshot: …
SentryTests.SentryUIRedactBuilderTests_SpecialViews::testRedact_withSFSafariView_withMaskingEnabled_shouldRedactViewHierarchy
Stack Traces | 0s run time
.../SentryTests/ViewCapture/SentryUIRedactBuilderTests+SpecialViews.swift:315 - failed - No reference was found on disk. Automatically recorded snapshot: …
SentryTests.SentryUIRedactBuilderTests_SwiftUI::testCollectionViewListBackgroundDecorationView_isIgnoredSubtree_redactsAndDoesNotClipOut
Stack Traces | 0s run time
.../SentryTests/ViewCapture/SentryUIRedactBuilderTests+SwiftUI.swift:602 - failed - No reference was found on disk. Automatically recorded snapshot: …
SentryTests.SentryUIRedactBuilderTests_SwiftUI::testRedact_withSwiftUIButton_withMaskAllTextEnabled_withMaskAllImagesEnabled_shouldRedactView
Stack Traces | 0s run time
.../SentryTests/ViewCapture/SentryUIRedactBuilderTests+SwiftUI.swift:846 - failed - No reference was found on disk. Automatically recorded snapshot: …
SentryTests.SentryUIRedactBuilderTests_SwiftUI::testRedact_withSwiftUIImage_withMaskAllImagesDisabled_shouldNotRedactView
Stack Traces | 0s run time
.../SentryTests/ViewCapture/SentryUIRedactBuilderTests+SwiftUI.swift:678 - failed - No reference was found on disk. Automatically recorded snapshot: …
SentryTests.SentryUIRedactBuilderTests_SwiftUI::testRedact_withSwiftUIImage_withMaskAllImagesEnabled_shouldRedactView
Stack Traces | 0s run time
.../SentryTests/ViewCapture/SentryUIRedactBuilderTests+SwiftUI.swift:663 - failed - No reference was found on disk. Automatically recorded snapshot: …
SentryTests.SentryUIRedactBuilderTests_SwiftUI::testRedact_withSwiftUIImage_withMaskAllTextDisabled_shouldRedactView
Stack Traces | 0s run time
.../SentryTests/ViewCapture/SentryUIRedactBuilderTests+SwiftUI.swift:693 - failed - No reference was found on disk. Automatically recorded snapshot: …
SentryTests.SentryUIRedactBuilderTests_SwiftUI::testRedact_withSwiftUIImage_withUIImage_withMaskAllImagesDisabled_shouldNotRedactView
Stack Traces | 0s run time
.../SentryTests/ViewCapture/SentryUIRedactBuilderTests+SwiftUI.swift:774 - failed - No reference was found on disk. Automatically recorded snapshot: …
SentryTests.SentryUIRedactBuilderTests_SwiftUI::testRedact_withSwiftUIImage_withUIImage_withMaskAllImagesEnabled_shouldRedactView
Stack Traces | 0s run time
.../SentryTests/ViewCapture/SentryUIRedactBuilderTests+SwiftUI.swift:759 - failed - No reference was found on disk. Automatically recorded snapshot: …
SentryTests.SentryUIRedactBuilderTests_SwiftUI::testRedact_withSwiftUIImage_withUIImage_withMaskAllTextDisabled_shouldRedactView
Stack Traces | 0s run time
.../SentryTests/ViewCapture/SentryUIRedactBuilderTests+SwiftUI.swift:789 - failed - No reference was found on disk. Automatically recorded snapshot: …
SentryTests.SentryUIRedactBuilderTests_SwiftUI::testRedact_withSwiftUILabel_withMaskAllTextDisabled_withMaskAllImagesDisabled_shouldRedactText
Stack Traces | 0s run time
.../SentryTests/ViewCapture/SentryUIRedactBuilderTests+SwiftUI.swift:306 - failed - No reference was found on disk. Automatically recorded snapshot: …
SentryTests.SentryUIRedactBuilderTests_SwiftUI::testRedact_withSwiftUILabel_withMaskAllTextDisabled_withMaskAllImagesEnabled_shouldRedactImage
Stack Traces | 0s run time
.../SentryTests/ViewCapture/SentryUIRedactBuilderTests+SwiftUI.swift:290 - failed - No reference was found on disk. Automatically recorded snapshot: …
SentryTests.SentryUIRedactBuilderTests_SwiftUI::testRedact_withSwiftUILabel_withMaskAllTextEnabled_withMaskAllImagesDisabled_shouldRedactText
Stack Traces | 0s run time
.../SentryTests/ViewCapture/SentryUIRedactBuilderTests+SwiftUI.swift:274 - failed - No reference was found on disk. Automatically recorded snapshot: …
SentryTests.SentryUIRedactBuilderTests_SwiftUI::testRedact_withSwiftUILabel_withMaskAllTextEnabled_withMaskAllImagesEnabled_shouldRedactTextAndImage
Stack Traces | 0s run time
.../SentryTests/ViewCapture/SentryUIRedactBuilderTests+SwiftUI.swift:258 - failed - No reference was found on disk. Automatically recorded snapshot: …
SentryTests.SentryUIRedactBuilderTests_SwiftUI::testRedact_withSwiftUIList_withMaskAllTextDisabled_withMaskAllImagesDisabled_shouldNotRedactView
Stack Traces | 0s run time
.../SentryTests/ViewCapture/SentryUIRedactBuilderTests+SwiftUI.swift:561 - failed - No reference was found on disk. Automatically recorded snapshot: …
SentryTests.SentryUIRedactBuilderTests_SwiftUI::testRedact_withSwiftUIList_withMaskAllTextDisabled_withMaskAllImagesEnabled_shouldNotRedactView
Stack Traces | 0s run time
.../SentryTests/ViewCapture/SentryUIRedactBuilderTests+SwiftUI.swift:531 - failed - No reference was found on disk. Automatically recorded snapshot: …
SentryTests.SentryUIRedactBuilderTests_SwiftUI::testRedact_withSwiftUIList_withMaskAllTextEnabled_shouldRedactView
Stack Traces | 0s run time
.../SentryTests/ViewCapture/SentryUIRedactBuilderTests+SwiftUI.swift:516 - failed - No reference was found on disk. Automatically recorded snapshot: …
SentryTests.SentryUIRedactBuilderTests_SwiftUI::testRedact_withSwiftUIList_withMaskAllTextEnabled_withMaskAllImagesDisabled_shouldNotRedactView
Stack Traces | 0s run time
.../SentryTests/ViewCapture/SentryUIRedactBuilderTests+SwiftUI.swift:546 - failed - No reference was found on disk. Automatically recorded snapshot: …
SentryTests.SentryUIRedactBuilderTests_SwiftUI::testRedact_withSwiftUIText_withMaskAllImagesDisabled_shouldRedactView
Stack Traces | 0s run time
.../SentryTests/ViewCapture/SentryUIRedactBuilderTests+SwiftUI.swift:161 - failed - Snapshot does not match reference.
SentryTests.SentryUIRedactBuilderTests_SwiftUI::testRedact_withSwiftUIText_withMaskAllTextDisabled_shouldNotRedactView
Stack Traces | 0s run time
.../SentryTests/ViewCapture/SentryUIRedactBuilderTests+SwiftUI.swift:134 - failed - Snapshot does not match reference.
SentryTests.SentryUIRedactBuilderTests_SwiftUI::testRedact_withSwiftUIText_withMaskAllTextEnabled_shouldRedactView
Stack Traces | 0s run time
.../SentryTests/ViewCapture/SentryUIRedactBuilderTests+SwiftUI.swift:119 - failed - No reference was found on disk. Automatically recorded snapshot: …
SentryTests.SentryUIRedactBuilderTests_UIKit::testRedact_withUITextView_withMaskAllTextDisabled_shouldNotRedactView
Stack Traces | 0s run time
.../SentryTests/ViewCapture/SentryUIRedactBuilderTests+UIKit.swift:200 - XCTAssertEqual failed: ("(15.0, 40.0)") is not equal to ("(40.0, 40.0)")
SentryUIRedactBuilderTests_SwiftUI::testRedact_withSwiftUIImage_withMaskAllImagesDisabled_shouldNotRedactView
Stack Traces | 0s run time
Restarting after unexpected exit, crash, or test timeout in SentryUIRedactBuilderTests_SwiftUI.testRedact_withSwiftUIImage_withMaskAllImagesDisabled_shouldNotRedactView(); summary will include totals from previous launches.
SentryUIRedactBuilderTests_SwiftUI::testRedact_withSwiftUIImage_withMaskAllTextDisabled_shouldRedactView
Stack Traces | 0s run time
Restarting after unexpected exit, crash, or test timeout in SentryUIRedactBuilderTests_SwiftUI.testRedact_withSwiftUIImage_withMaskAllTextDisabled_shouldRedactView(); summary will include totals from previous launches.
SentryUIRedactBuilderTests_SwiftUI::testRedact_withSwiftUIImage_withUIImage_withMaskAllImagesEnabled_shouldRedactView
Stack Traces | 0s run time
Restarting after unexpected exit, crash, or test timeout in SentryUIRedactBuilderTests_SwiftUI.testRedact_withSwiftUIImage_withUIImage_withMaskAllImagesEnabled_shouldRedactView(); summary will include totals from previous launches.
SentryUIRedactBuilderTests_SwiftUI::testRedact_withSwiftUILabel_withMaskAllTextDisabled_withMaskAllImagesDisabled_shouldRedactText
Stack Traces | 0s run time
Restarting after unexpected exit, crash, or test timeout in SentryUIRedactBuilderTests_SwiftUI.testRedact_withSwiftUILabel_withMaskAllTextDisabled_withMaskAllImagesDisabled_shouldRedactText(); summary will include totals from previous launches.
SentryUIRedactBuilderTests_SwiftUI::testRedact_withSwiftUILabel_withMaskAllTextEnabled_withMaskAllImagesDisabled_shouldRedactText
Stack Traces | 0s run time
Restarting after unexpected exit, crash, or test timeout in SentryUIRedactBuilderTests_SwiftUI.testRedact_withSwiftUILabel_withMaskAllTextEnabled_withMaskAllImagesDisabled_shouldRedactText(); summary will include totals from previous launches.
SentryUIRedactBuilderTests_SwiftUI::testRedact_withSwiftUIList_withMaskAllTextDisabled_withMaskAllImagesDisabled_shouldNotRedactView
Stack Traces | 0s run time
Restarting after unexpected exit, crash, or test timeout in SentryUIRedactBuilderTests_SwiftUI.testRedact_withSwiftUIList_withMaskAllTextDisabled_withMaskAllImagesDisabled_shouldNotRedactView(); summary will include totals from previous launches.
SentryUIRedactBuilderTests_SwiftUI::testRedact_withSwiftUIList_withMaskAllTextDisabled_withMaskAllImagesEnabled_shouldNotRedactView
Stack Traces | 0s run time
Restarting after unexpected exit, crash, or test timeout in SentryUIRedactBuilderTests_SwiftUI.testRedact_withSwiftUIList_withMaskAllTextDisabled_withMaskAllImagesEnabled_shouldNotRedactView(); summary will include totals from previous launches.
SentryUIRedactBuilderTests_SwiftUI::testRedact_withSwiftUIList_withMaskAllTextEnabled_shouldRedactView
Stack Traces | 0s run time
Restarting after unexpected exit, crash, or test timeout in SentryUIRedactBuilderTests_SwiftUI.testRedact_withSwiftUIList_withMaskAllTextEnabled_shouldRedactView(); summary will include totals from previous launches.
SentryUIRedactBuilderTests_SwiftUI::testRedact_withSwiftUIList_withMaskAllTextEnabled_withMaskAllImagesDisabled_shouldNotRedactView
Stack Traces | 0s run time
Restarting after unexpected exit, crash, or test timeout in SentryUIRedactBuilderTests_SwiftUI.testRedact_withSwiftUIList_withMaskAllTextEnabled_withMaskAllImagesDisabled_shouldNotRedactView(); summary will include totals from previous launches.
SentryUIRedactBuilderTests_SwiftUI::testRedact_withSwiftUIText_withMaskAllImagesDisabled_shouldRedactView
Stack Traces | 0s run time
Restarting after unexpected exit, crash, or test timeout in SentryUIRedactBuilderTests_SwiftUI.testRedact_withSwiftUIText_withMaskAllImagesDisabled_shouldRedactView(); summary will include totals from previous launches.
SentryUIRedactBuilderTests_SwiftUI::testRedact_withSwiftUIText_withMaskAllTextDisabled_shouldNotRedactView
Stack Traces | 0s run time
Restarting after unexpected exit, crash, or test timeout in SentryUIRedactBuilderTests_SwiftUI.testRedact_withSwiftUIText_withMaskAllTextDisabled_shouldNotRedactView(); summary will include totals from previous launches.
SentryUIRedactBuilderTests_SwiftUI::testRedact_withSwiftUIText_withMaskAllTextEnabled_shouldRedactView
Stack Traces | 0s run time
Restarting after unexpected exit, crash, or test timeout in SentryUIRedactBuilderTests_SwiftUI.testRedact_withSwiftUIText_withMaskAllTextEnabled_shouldRedactView(); summary will include totals from previous launches.
iOS_SwiftUI_UITests.FeedbackUITests::testWidgetDisplayInSwiftUIApp
Stack Traces | 0s run time
.../iOS-SwiftUI/iOS-SwiftUI-UITests/FeedbackUITests.swift:14 - Failed to get matching snapshots: Timed out while evaluating UI query.
iOS_Swift_UITests.ProfilingUITests::testProfilingGPUInfo
Stack Traces | 0s run time
.../iOS-Swift/iOS-Swift-UITests/UITestHelpers.swift:5 - Failed to get matching snapshots: Timed out while evaluating UI query.

To view more test analytics, go to the Test Analytics Dashboard
📋 Got 3 mins? Take this short survey to help us improve Test Analytics.

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