Conversation
Merge dev into master for Alpha release
Alpha-2 release
Release 1.0.0-beta-1
Codecov Report
@@ Coverage Diff @@
## dev #102 +/- ##
==========================================
+ Coverage 89.53% 89.87% +0.34%
==========================================
Files 16 16
Lines 573 553 -20
==========================================
- Hits 513 497 -16
+ Misses 60 56 -4 |
emdobrin
left a comment
There was a problem hiding this comment.
Changes look good, left some small comments.
Sources/ExperienceEvent.swift
Outdated
| dataDict[Constants.JsonKeys.DATA] = unwrappedData | ||
| } | ||
|
|
||
| if let query = query { |
There was a problem hiding this comment.
we should also check for empty query map, we should not include it in that case.
| XCTAssertEqual("val", eventData["data.testDataDictionary.key"] as? String) | ||
| } | ||
|
|
||
| func testSendEvent_withXDMDataAndQuery_sendsCorrectRequestEvent() { |
There was a problem hiding this comment.
Let's move this below testSendEvent_withEmptyXDMSchema_DoesNotSendRequestEvent and include some test cases for nil/empty query data.
| XCTAssertNotNil(requestUrl.queryParam("requestId")) | ||
| } | ||
|
|
||
| func testSendEvent_withXDMDataAndQuery_sendsExEdgeNetworkRequest() { |
There was a problem hiding this comment.
Can we move this after testSendEvent_withEmptyXDMSchemaAndNilData_doesNotSendExEdgeNetworkRequest
|
@emdobrin fixed |
| eventData[Constants.JsonKeys.XDM] = xdm | ||
| } | ||
|
|
||
| if let query = eventData[Constants.JsonKeys.QUERY] as? [String: Any] { |
There was a problem hiding this comment.
Let's remove this as it appears to just set the same value back to eventData. I'm seeing the tests pass after removing this statement.
Add an optional field
queryto ExperienceEvent