Skip to content

Commit dc976eb

Browse files
rahulbawaneAbishekh-S-KamathchetanshanbagBV
authored
Release 1.11.2
* Add sonarqube scan worflow * Pd 177323 cdv filter (#13) * Implemented CDV filter for reviews.json * Pd 177925 seccondary ratings filter (#14) * Implemented Secondaryratings filters for reviews.json * Implemented Additional field filter for reviews.json (#15) * Implemented tag dimensions filter for reviews.json * Pd 178797 add value label cdv response (#18) Mapped "ValueLabel" response object for context data values * Pd 178686 tag statistics (#19) Implemented tagstats reuest param for reviews.json and products.json * Mapped secondary averages response objects * Implemented Secondary Rating Distribution * Refactoring keyword filter classes to maintain the parity * Allow dynamic array or variadic parameters to be passed to filter function * Release 1.10.0 * Implemented Custom Sort, Relavancy Sort, Xcode 14 fix * Update Sonarscan workflow * Q&A statistics changes for statistics.json * Release 1.11.0 * Fix for configuration errors with test case changes * Release 1.11.1 * 🐛 fixed transaction monitoring issue by adding clientId in BVAnalyticsEventTransaction (#35) * Revert ":bug: fixed transaction monitoring issue by adding clientId in BVAnalyticsEventTransaction (#35)" (#37) This reverts commit ba52da0e2d2209afe443df00ace8230bdbe8b498. * Pd 215869 bv pixel transaction event not recorded on monitoring tool (#38) * 🐛 fixed transaction monitoring issue by adding clientId in BVAnalyticsEventTransaction * 🐛 fix transaction monitoring issue by checking client key in whitelist and blacklist dictionary ✅ add separate test cases for nonPII and PII transactions event * ⚰️ removing unused code * Release 1.11.2 --------- Co-authored-by: Rahul Bawane <[email protected]> Co-authored-by: Abishekh S Kamath <[email protected]> Co-authored-by: chetan shanbag <[email protected]>
1 parent fbcf9e4 commit dc976eb

File tree

5 files changed

+83
-9
lines changed

5 files changed

+83
-9
lines changed

BVSwift.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
Pod::Spec.new do |s|
1010
s.name = 'BVSwift'
11-
s.version = '1.11.1'
11+
s.version = '1.11.2'
1212
s.summary = 'Simple Swift based iOS SDK to interact with the Bazaarvoice platform API.'
1313
s.description = 'The Bazaarvoice Software Development Kit (SDK) is a Swift iOS library that provides an easy way to generate REST calls to the Bazaarvoice Developer API. Using this SDK, mobile developers can quickly integrate Bazaarvoice content into their native iOS apps for iPhone and iPad on iOS 8.0 or newer.'
1414

BVSwift/BVAnalytics/BVAnalyticsEvent.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -202,13 +202,13 @@ extension BVAnalyticsEvent {
202202

203203
internal var toWhitelistDict: [String: Encodable] {
204204
return toDict.filter {
205-
BVAnalyticsEvent.whiteList.contains($0.key)
205+
BVAnalyticsEvent.whiteList.contains($0.key) || $0.key == "client"
206206
}
207207
}
208208

209209
internal var toBlacklistDict: [String: Encodable] {
210210
return toDict.filter {
211-
!BVAnalyticsEvent.whiteList.contains($0.key)
211+
!BVAnalyticsEvent.whiteList.contains($0.key) && $0.key != "client"
212212
}
213213
}
214214

BVSwift/BVCommon/Configuration/BVConstants.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ internal struct BVConstants {
1818
static let appVersionField: String = "_appVersion"
1919
static let buildNumberField: String = "_buildNumber"
2020
static let sdkVersionField: String = "_bvIosSwiftSdkVersion"
21-
static let bvSwiftSDKVersion: String = "1.11.1"
21+
static let bvSwiftSDKVersion: String = "1.11.2"
2222

2323
}
2424

BVSwift/Support/Info.plist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
<key>CFBundlePackageType</key>
1818
<string>FMWK</string>
1919
<key>CFBundleShortVersionString</key>
20-
<string>1.11.1</string>
20+
<string>1.11.2</string>
2121
<key>CFBundleVersion</key>
2222
<string>1</string>
2323
<key>NSPrincipalClass</key>

BVSwiftTests/BVAnalytics/BVPixelTest.swift

Lines changed: 78 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -342,11 +342,86 @@ class BVPixelTest: XCTestCase {
342342
error, "Something went horribly wrong, request took too long.")
343343
}
344344
}
345-
346-
func testPixelTransactionEvent() {
345+
346+
func testPixelTransactionEventNonPII() {
347+
348+
let expectation =
349+
self.expectation(description: "testPixelTransactionEventNonPII")
350+
351+
let items: [BVAnalyticsTransactionItem] = [
352+
BVAnalyticsTransactionItem(
353+
category: "fruit",
354+
imageURL: nil,
355+
name: "apples",
356+
price: 5.35,
357+
quantity: 10,
358+
sku: "$%#$%#jksfgjsdkf$554353"),
359+
BVAnalyticsTransactionItem(
360+
category: "fruit",
361+
imageURL: nil,
362+
name: "oranges",
363+
price: 8.35,
364+
quantity: 10,
365+
sku: "$%#$%#$jfhdjfhdf"),
366+
BVAnalyticsTransactionItem(
367+
category: "fruit",
368+
imageURL: nil,
369+
name: "bananas",
370+
price: 10.35,
371+
quantity: 10,
372+
sku: "$%#$%#djfhdjhf554353")
373+
]
374+
375+
let transaction: BVAnalyticsEvent =
376+
.transaction(items: items,
377+
orderId: "id-924859485",
378+
total: 20.75,
379+
city: "Austin",
380+
country: "USA",
381+
currency: "US",
382+
shipping: 7.50,
383+
state: "TX",
384+
tax: 3.25,
385+
additional: ["locale": "en_US"])
386+
387+
let numberOfEvents: UInt = 1
388+
389+
BVPixel.track(transaction)
390+
391+
BVAnalyticsManager.sharedManager.flush
392+
{ (successes: UInt?, errors: [Error]?) in
393+
if let errs = errors {
394+
print(errs)
395+
XCTFail()
396+
expectation.fulfill()
397+
return
398+
}
399+
400+
guard let wins = successes else {
401+
XCTFail()
402+
expectation.fulfill()
403+
return
404+
}
405+
406+
if numberOfEvents != wins {
407+
XCTFail()
408+
expectation.fulfill()
409+
return
410+
}
411+
412+
expectation.fulfill()
413+
}
414+
415+
self.waitForExpectations(timeout: 20) { (error) in
416+
XCTAssertNil(
417+
error, "Something went horribly wrong, request took too long.")
418+
}
419+
}
420+
421+
func testPixelTransactionEventPII() {
347422

348423
let expectation =
349-
self.expectation(description: "testPixelTransactionEvent")
424+
self.expectation(description: "testPixelTransactionEventPII")
350425

351426
let items: [BVAnalyticsTransactionItem] = [
352427
BVAnalyticsTransactionItem(
@@ -403,7 +478,6 @@ class BVPixelTest: XCTestCase {
403478
return
404479
}
405480

406-
407481
if numberOfEvents != wins {
408482
XCTFail()
409483
expectation.fulfill()

0 commit comments

Comments
 (0)