Skip to content

Commit

Permalink
followups
Browse files Browse the repository at this point in the history
  • Loading branch information
armcknight committed Feb 20, 2025
1 parent b4f5b1b commit 2ef90a3
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion Sources/Sentry/SentryClient.m
Original file line number Diff line number Diff line change
Expand Up @@ -617,7 +617,7 @@ - (void)captureFeedback:(SentryFeedback *)feedback withScope:(SentryScope *)scop
alwaysAttachStacktrace:NO];
SentryTraceContext *traceContext = [self getTraceStateWithEvent:preparedEvent withScope:scope];
NSArray *attachments = [[self attachmentsForEvent:preparedEvent scope:scope]
arrayByAddingObjectsFromArray:[feedback attachments]];
arrayByAddingObjectsFromArray:[feedback attachmentsForEnvelope]];

[self.transportAdapter sendEvent:preparedEvent
traceContext:traceContext
Expand Down
10 changes: 5 additions & 5 deletions Sources/Swift/Integrations/UserFeedback/SentryFeedback.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@ class SentryFeedback: NSObject {
case custom
}

var name: String?
var email: String?
var message: String
var source: SentryFeedbackSource
private var name: String?
private var email: String?
private var message: String
private var source: SentryFeedbackSource
let eventId: SentryId

/// Data objects for any attachments. Currently the web UI only supports showing one attached image, like for a screenshot.
var attachments: [Data]?
private var attachments: [Data]?

/// The event id that this feedback is associated with, like a crash report.
var associatedEventId: SentryId?
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,15 @@ class SentryFeedbackTests: XCTestCase {
}

func testSerializeWithAllFields() throws {
let sut = SentryFeedback(message: "Test feedback message", name: "Test feedback provider", email: "[email protected]", screenshot: Data())
let sut = SentryFeedback(message: "Test feedback message", name: "Test feedback provider", email: "[email protected]", attachments: [Data()])

let serialization = sut.serialize()
XCTAssertEqual(try XCTUnwrap(serialization["message"] as? String), "Test feedback message")
XCTAssertEqual(try XCTUnwrap(serialization["name"] as? String), "Test feedback provider")
XCTAssertEqual(try XCTUnwrap(serialization["contact_email"] as? String), "[email protected]")
XCTAssertEqual(try XCTUnwrap(serialization["source"] as? String), "widget")

Check failure on line 38 in Tests/SentryTests/Integrations/Feedback/SentryFeedbackTests.swift

View workflow job for this annotation

GitHub Actions / Unit Catalyst - Xcode 16.2 - OS latest Sentry

testSerializeWithAllFields, XCTUnwrap failed: expected non-nil value of type "String"

Check failure on line 38 in Tests/SentryTests/Integrations/Feedback/SentryFeedbackTests.swift

View workflow job for this annotation

GitHub Actions / Unit Catalyst - Xcode 16.2 - OS latest Sentry

testSerializeWithAllFields, XCTAssertEqual failed: threw error "UnwrappingOptional(errorCode: 105, errorUserInfo: ["XCTestErrorUserInfoKeyShouldIgnore": true])"

Check failure on line 38 in Tests/SentryTests/Integrations/Feedback/SentryFeedbackTests.swift

View workflow job for this annotation

GitHub Actions / Unit Catalyst - Xcode 15.4 - OS latest Sentry

testSerializeWithAllFields, XCTUnwrap failed: expected non-nil value of type "String"

Check failure on line 38 in Tests/SentryTests/Integrations/Feedback/SentryFeedbackTests.swift

View workflow job for this annotation

GitHub Actions / Unit Catalyst - Xcode 15.4 - OS latest Sentry

testSerializeWithAllFields, XCTAssertEqual failed: threw error "UnwrappingOptional(errorCode: 105, errorUserInfo: ["XCTestErrorUserInfoKeyShouldIgnore": true])"

Check failure on line 38 in Tests/SentryTests/Integrations/Feedback/SentryFeedbackTests.swift

View workflow job for this annotation

GitHub Actions / Unit iOS - Xcode 15.4 - OS 17.2 Sentry

testSerializeWithAllFields, XCTUnwrap failed: expected non-nil value of type "String"

Check failure on line 38 in Tests/SentryTests/Integrations/Feedback/SentryFeedbackTests.swift

View workflow job for this annotation

GitHub Actions / Unit iOS - Xcode 15.4 - OS 17.2 Sentry

testSerializeWithAllFields, XCTAssertEqual failed: threw error "UnwrappingOptional(errorCode: 105, errorUserInfo: ["XCTestErrorUserInfoKeyShouldIgnore": true])"

Check failure on line 38 in Tests/SentryTests/Integrations/Feedback/SentryFeedbackTests.swift

View workflow job for this annotation

GitHub Actions / Unit iOS - Xcode 16.2 - OS 18.2 Sentry

testSerializeWithAllFields, XCTUnwrap failed: expected non-nil value of type "String"

Check failure on line 38 in Tests/SentryTests/Integrations/Feedback/SentryFeedbackTests.swift

View workflow job for this annotation

GitHub Actions / Unit iOS - Xcode 16.2 - OS 18.2 Sentry

testSerializeWithAllFields, XCTAssertEqual failed: threw error "UnwrappingOptional(errorCode: 105, errorUserInfo: ["XCTestErrorUserInfoKeyShouldIgnore": true])"

Check failure on line 38 in Tests/SentryTests/Integrations/Feedback/SentryFeedbackTests.swift

View workflow job for this annotation

GitHub Actions / Unit iOS - Xcode 14.3 - OS 16.4 Sentry

testSerializeWithAllFields, XCTUnwrap failed: expected non-nil value of type "String"

Check failure on line 38 in Tests/SentryTests/Integrations/Feedback/SentryFeedbackTests.swift

View workflow job for this annotation

GitHub Actions / Unit iOS - Xcode 14.3 - OS 16.4 Sentry

testSerializeWithAllFields, XCTAssertEqual failed: threw error "UnwrappingOptional(errorCode: 105, errorUserInfo: ["XCTestErrorUserInfoKeyShouldIgnore": true])"

let attachments = sut.attachments()
let attachments = sut.attachmentsForEnvelope()
XCTAssertEqual(attachments.count, 1)
XCTAssertEqual(try XCTUnwrap(attachments.first).filename, "screenshot.png")
XCTAssertEqual(try XCTUnwrap(attachments.first).contentType, "application/png")
Expand All @@ -52,7 +52,7 @@ class SentryFeedbackTests: XCTestCase {
XCTAssertNil(serialization["contact_email"])
XCTAssertEqual(try XCTUnwrap(serialization["source"] as? String), "widget")

Check failure on line 53 in Tests/SentryTests/Integrations/Feedback/SentryFeedbackTests.swift

View workflow job for this annotation

GitHub Actions / Unit Catalyst - Xcode 16.2 - OS latest Sentry

testSerializeWithNoOptionalFields, XCTUnwrap failed: expected non-nil value of type "String"

Check failure on line 53 in Tests/SentryTests/Integrations/Feedback/SentryFeedbackTests.swift

View workflow job for this annotation

GitHub Actions / Unit Catalyst - Xcode 16.2 - OS latest Sentry

testSerializeWithNoOptionalFields, XCTAssertEqual failed: threw error "UnwrappingOptional(errorCode: 105, errorUserInfo: ["XCTestErrorUserInfoKeyShouldIgnore": true])"

Check failure on line 53 in Tests/SentryTests/Integrations/Feedback/SentryFeedbackTests.swift

View workflow job for this annotation

GitHub Actions / Unit Catalyst - Xcode 15.4 - OS latest Sentry

testSerializeWithNoOptionalFields, XCTUnwrap failed: expected non-nil value of type "String"

Check failure on line 53 in Tests/SentryTests/Integrations/Feedback/SentryFeedbackTests.swift

View workflow job for this annotation

GitHub Actions / Unit Catalyst - Xcode 15.4 - OS latest Sentry

testSerializeWithNoOptionalFields, XCTAssertEqual failed: threw error "UnwrappingOptional(errorCode: 105, errorUserInfo: ["XCTestErrorUserInfoKeyShouldIgnore": true])"

Check failure on line 53 in Tests/SentryTests/Integrations/Feedback/SentryFeedbackTests.swift

View workflow job for this annotation

GitHub Actions / Unit iOS - Xcode 15.4 - OS 17.2 Sentry

testSerializeWithNoOptionalFields, XCTUnwrap failed: expected non-nil value of type "String"

Check failure on line 53 in Tests/SentryTests/Integrations/Feedback/SentryFeedbackTests.swift

View workflow job for this annotation

GitHub Actions / Unit iOS - Xcode 15.4 - OS 17.2 Sentry

testSerializeWithNoOptionalFields, XCTAssertEqual failed: threw error "UnwrappingOptional(errorCode: 105, errorUserInfo: ["XCTestErrorUserInfoKeyShouldIgnore": true])"

Check failure on line 53 in Tests/SentryTests/Integrations/Feedback/SentryFeedbackTests.swift

View workflow job for this annotation

GitHub Actions / Unit iOS - Xcode 16.2 - OS 18.2 Sentry

testSerializeWithNoOptionalFields, XCTUnwrap failed: expected non-nil value of type "String"

Check failure on line 53 in Tests/SentryTests/Integrations/Feedback/SentryFeedbackTests.swift

View workflow job for this annotation

GitHub Actions / Unit iOS - Xcode 16.2 - OS 18.2 Sentry

testSerializeWithNoOptionalFields, XCTAssertEqual failed: threw error "UnwrappingOptional(errorCode: 105, errorUserInfo: ["XCTestErrorUserInfoKeyShouldIgnore": true])"

Check failure on line 53 in Tests/SentryTests/Integrations/Feedback/SentryFeedbackTests.swift

View workflow job for this annotation

GitHub Actions / Unit iOS - Xcode 14.3 - OS 16.4 Sentry

testSerializeWithNoOptionalFields, XCTUnwrap failed: expected non-nil value of type "String"

Check failure on line 53 in Tests/SentryTests/Integrations/Feedback/SentryFeedbackTests.swift

View workflow job for this annotation

GitHub Actions / Unit iOS - Xcode 14.3 - OS 16.4 Sentry

testSerializeWithNoOptionalFields, XCTAssertEqual failed: threw error "UnwrappingOptional(errorCode: 105, errorUserInfo: ["XCTestErrorUserInfoKeyShouldIgnore": true])"

let attachments = sut.attachments()
let attachments = sut.attachmentsForEnvelope()
XCTAssertEqual(attachments.count, 0)
}

Expand Down

0 comments on commit 2ef90a3

Please sign in to comment.