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
@codecov
Copy link

codecov bot commented Oct 15, 2025

❌ 13 Tests Failed:

Tests completed Failed Passed Skipped
3893 13 3880 23
View the top 3 failed test(s) by shortest run time
SentryTests.SentryUIRedactBuilderTests_SwiftUI::testRedact_withSwiftUIButton_withMaskAllTextEnabled_withMaskAllImagesEnabled_shouldRedactView
Stack Traces | 0s run time
.../SentryTests/ViewCapture/SentryUIRedactBuilderTests+SwiftUI.swift:932 - XCTAssertEqualWithAccuracy failed: ("55.666666666666664") is not equal to ("18.666") +/- ("0.01") - Width should be the same: 55.666666666666664 != 18.666 (+- 0.01)
SentryTests.SentryUIRedactBuilderTests_SwiftUI::testRedact_withSwiftUIImage_withMaskAllImagesEnabled_shouldRedactView
Stack Traces | 0s run time
.../SentryTests/ViewCapture/SentryUIRedactBuilderTests+SwiftUI.swift:746 - XCTAssertEqualWithAccuracy failed: ("192.0") is not equal to ("190.666") +/- ("0.01") - Transformation y-translation should be the same: 192.0 != 190.666 (+- 0.01)
SentryTests.SentryUIRedactBuilderTests_SwiftUI::testRedact_withSwiftUIImage_withMaskAllTextDisabled_shouldRedactView
Stack Traces | 0s run time
.../SentryTests/ViewCapture/SentryUIRedactBuilderTests+SwiftUI.swift:746 - XCTAssertEqualWithAccuracy failed: ("192.0") is not equal to ("190.666") +/- ("0.01") - Transformation y-translation should be the same: 192.0 != 190.666 (+- 0.01)
SentryTests.SentryUIRedactBuilderTests_SwiftUI::testRedact_withSwiftUIImage_withUIImage_withMaskAllImagesEnabled_shouldRedactView
Stack Traces | 0s run time
.../SentryTests/ViewCapture/SentryUIRedactBuilderTests+SwiftUI.swift:843 - XCTAssertEqualWithAccuracy failed: ("40.0") is not equal to ("18.666") +/- ("0.01") - Width should be the same: 40.0 != 18.666 (+- 0.01)
SentryTests.SentryUIRedactBuilderTests_SwiftUI::testRedact_withSwiftUIImage_withUIImage_withMaskAllTextDisabled_shouldRedactView
Stack Traces | 0s run time
.../SentryTests/ViewCapture/SentryUIRedactBuilderTests+SwiftUI.swift:843 - XCTAssertEqualWithAccuracy failed: ("40.0") is not equal to ("18.666") +/- ("0.01") - Width should be the same: 40.0 != 18.666 (+- 0.01)
SentryTests.SentryUIRedactBuilderTests_SwiftUI::testRedact_withSwiftUILabel_withMaskAllTextDisabled_withMaskAllImagesEnabled_shouldRedactImage
Stack Traces | 0s run time
.../SentryTests/ViewCapture/SentryUIRedactBuilderTests+SwiftUI.swift:230 - XCTAssertEqualWithAccuracy failed: ("172.33333333333331") is not equal to ("170.333") +/- ("0.01") - Transformation y-translation should be the same: 172.33333333333331 != 170.333 (+- 0.01)
SentryTests.SentryUIRedactBuilderTests_SwiftUI::testRedact_withSwiftUILabel_withMaskAllTextEnabled_withMaskAllImagesDisabled_shouldRedactText
Stack Traces | 0s run time
.../SentryTests/ViewCapture/SentryUIRedactBuilderTests+SwiftUI.swift:211 - XCTAssertEqualWithAccuracy failed: ("171.0") is not equal to ("169.333") +/- ("0.01") - Transformation y-translation should be the same: 171.0 != 169.333 (+- 0.01)
SentryTests.SentryUIRedactBuilderTests_SwiftUI::testRedact_withSwiftUILabel_withMaskAllTextEnabled_withMaskAllImagesEnabled_shouldRedactTextAndImage
Stack Traces | 0s run time
.../SentryTests/ViewCapture/SentryUIRedactBuilderTests+SwiftUI.swift:211 - XCTAssertEqualWithAccuracy failed: ("171.0") is not equal to ("169.333") +/- ("0.01") - Transformation y-translation should be the same: 171.0 != 169.333 (+- 0.01)
SentryTests.SentryUIRedactBuilderTests_SwiftUI::testRedact_withSwiftUIList_withMaskAllTextDisabled_withMaskAllImagesDisabled_shouldNotRedactView
Stack Traces | 0s run time
.../SentryTests/ViewCapture/SentryUIRedactBuilderTests+SwiftUI.swift:413 - XCTAssertEqualWithAccuracy failed: ("180.0") is not equal to ("177.0") +/- ("0.01") - Transformation y-translation should be the same: 180.0 != 177.0 (+- 0.01)
SentryTests.SentryUIRedactBuilderTests_SwiftUI::testRedact_withSwiftUIList_withMaskAllTextDisabled_withMaskAllImagesEnabled_shouldNotRedactView
Stack Traces | 0s run time
.../SentryTests/ViewCapture/SentryUIRedactBuilderTests+SwiftUI.swift:413 - XCTAssertEqualWithAccuracy failed: ("180.0") is not equal to ("177.0") +/- ("0.01") - Transformation y-translation should be the same: 180.0 != 177.0 (+- 0.01)
SentryTests.SentryUIRedactBuilderTests_SwiftUI::testRedact_withSwiftUIList_withMaskAllTextEnabled_shouldRedactView
Stack Traces | 0s run time
.../SentryTests/ViewCapture/SentryUIRedactBuilderTests+SwiftUI.swift:493 - XCTAssertEqual failed: ("redact") is not equal to ("clipBegin")
SentryTests.SentryUIRedactBuilderTests_SwiftUI::testRedact_withSwiftUIList_withMaskAllTextEnabled_withMaskAllImagesDisabled_shouldNotRedactView
Stack Traces | 0s run time
.../SentryTests/ViewCapture/SentryUIRedactBuilderTests+SwiftUI.swift:391 - XCTAssertEqualWithAccuracy failed: ("79.0") is not equal to ("76.0") +/- ("0.01") - Transformation y-translation should be the same: 79.0 != 76.0 (+- 0.01)
SentryTests.SentryUIRedactBuilderTests_SwiftUI::testRedact_withSwiftUIText_withMaskAllTextDisabled_shouldNotRedactView
Stack Traces | 0s run time
.../SentryTests/ViewCapture/SentryUIRedactBuilderTests+SwiftUI.swift:140 - XCTAssertEqualWithAccuracy failed: ("124.0") is not equal to ("122.666") +/- ("0.01") - Transformation y-translation should be the same: 124.0 != 122.666 (+- 0.01)

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

@philprime philprime force-pushed the philprime/fix-masking branch 3 times, most recently from 496198d to 6a5c478 Compare October 28, 2025 15:28
Base automatically changed from philprime/fix-masking to main October 28, 2025 16:52
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.

2 participants