Skip to content

Commit 227b5ee

Browse files
authored
[CSL-2886] Resolve failing tests (#196)
* Resolve failing tests * Update results json * remove is last question
1 parent c3398a9 commit 227b5ee

File tree

10 files changed

+249
-58
lines changed

10 files changed

+249
-58
lines changed

AutocompleteClient/FW/API/Parser/Quizzes/QuizQuestionResponseParser.swift

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,13 @@ class QuizQuestionResponseParser: AbstractQuizQuestionResponseParser {
1616
let quizVersionID = json?["quiz_version_id"] as? String ?? ""
1717
let quizID = json?["quiz_id"] as? String ?? ""
1818
let quizSessionID = json?["quiz_session_id"] as? String ?? ""
19-
let isLastQuestion = json?["is_last_question"] as? Bool ?? false
2019
let nextQuestion = CIOQuizQuestion(json: json?["next_question"] as? JSONObject ?? [:])
2120

2221
return CIOQuizQuestionResponse(
2322
nextQuestion: nextQuestion!,
2423
quizVersionID: quizVersionID,
2524
quizSessionID: quizSessionID,
26-
quizID: quizID,
27-
isLastQuestion: isLastQuestion
25+
quizID: quizID
2826
)
2927
} catch {
3028
throw CIOError(errorType: .invalidResponse)

AutocompleteClient/FW/Logic/Request/Builder/RequestBuilder+QueryItems.swift

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -219,8 +219,15 @@ extension RequestBuilder {
219219
func set(variationsMap: CIOQueryVariationsMap?) {
220220
guard let variationsMap = variationsMap else { return }
221221
do {
222-
let jsonData = try JSONEncoder().encode(variationsMap)
223-
let jsonString = String(data: jsonData, encoding: .utf8)
222+
let jsonEncoder = JSONEncoder()
223+
jsonEncoder.outputFormatting = .sortedKeys
224+
let jsonData = try jsonEncoder.encode(variationsMap)
225+
var jsonString = String(data: jsonData, encoding: .utf8)!
226+
if let filterByJsonStr = variationsMap.FilterByJsonStr {
227+
let regex = try NSRegularExpression(pattern: "\\}$")
228+
let range = NSRange(location: 0, length: jsonString.count)
229+
jsonString = regex.stringByReplacingMatches(in: jsonString, range: range, withTemplate: ",\"filter_by\":\(filterByJsonStr)}")
230+
}
224231
queryItems.add(URLQueryItem(name: "variations_map", value: jsonString))
225232
} catch {
226233
// Do nothing

AutocompleteClient/FW/Logic/Result/Responses/CIOQuizQuestionResponse.swift

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,4 @@ public struct CIOQuizQuestionResponse {
3535
Id of the quiz
3636
*/
3737
public let quizID: String
38-
39-
/**
40-
Flag to determine if it's the last question in the quiz
41-
*/
42-
public let isLastQuestion: Bool
4338
}

AutocompleteClientTests/FW/Logic/Worker/ConstructorIOAutocompleteTests.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ class ConstructorIOAutocompleteTests: XCTestCase {
100100
let query = CIOAutocompleteQuery(query: "potato", variationsMap: CIOQueryVariationsMap(GroupBy: groupByOptions, Values: ["price": valueOption], Dtype: "array"))
101101

102102
let builder = CIOBuilder(expectation: "Calling Autocomplete with variations map should have a URL query variations map", builder: http(200))
103-
stub(regex("https://ac.cnstrc.com/autocomplete/potato?_dt=\(kRegexTimestamp)&c=\(kRegexVersion)&i=\(kRegexClientID)&key=\(kRegexAutocompleteKey)&s=\(kRegexSession)&variations_map=%7B%22dtype%22:%22array%22,%22group_by%22:%5B%7B%22name%22:%22Country%22,%22field%22:%22data.facets.Country%22%7D%5D,%22values%22:%7B%22price%22:%7B%22field%22:%22data.facets.price%22,%22aggregation%22:%22min%22%7D%7D%7D"), builder.create())
103+
stub(regex("https://ac.cnstrc.com/autocomplete/potato?_dt=\(kRegexTimestamp)&c=\(kRegexVersion)&i=\(kRegexClientID)&key=\(kRegexAutocompleteKey)&s=\(kRegexSession)&variations_map=%7B%22dtype%22:%22array%22,%22group_by%22:%5B%7B%22field%22:%22data.facets.Country%22,%22name%22:%22Country%22%7D%5D,%22values%22:%7B%22price%22:%7B%22aggregation%22:%22min%22,%22field%22:%22data.facets.price%22%7D%7D%7D"), builder.create())
104104

105105
self.constructor.autocomplete(forQuery: query, completionHandler: { response in })
106106

@@ -123,7 +123,7 @@ class ConstructorIOAutocompleteTests: XCTestCase {
123123

124124
let query = CIOAutocompleteQuery(query: "potato", variationsMap: variationsMap)
125125
let builder = CIOBuilder(expectation: "Calling Autocomplete with variations map should have a URL query variations map", builder: http(200))
126-
stub(regex("https://ac.cnstrc.com/autocomplete/potato?_dt=\(kRegexTimestamp)&c=\(kRegexVersion)&i=\(kRegexClientID)&key=\(kRegexAutocompleteKey)&s=\(kRegexSession)&variations_map=%7B%22values%22:%7B%22price%22:%7B%22field%22:%22data.price%22,%22aggregation%22:%22min%22%7D%7D,%22dtype%22:%22array%22,%22filter_by%22:%7B%22or%22:%5B%7B%22field%22:%22data.size%22,%22value%22:%22L%22%7D,%7B%22and%22:%5B%7B%22field%22:%22data.size%22,%22value%22:%22M%22%7D,%7B%22field%22:%22data.length%22,%22value%22:25%7D%5D%7D,%7B%22not%22:%7B%22field%22:%22data.in_stock%22,%22value%22:false%7D%7D%5D%7D,%22group_by%22:%5B%7B%22name%22:%22Country%22,%22field%22:%22data.Country%22%7D%5D%7D"), builder.create())
126+
stub(regex("https://ac.cnstrc.com/autocomplete/potato?_dt=\(kRegexTimestamp)&c=\(kRegexVersion)&i=\(kRegexClientID)&key=\(kRegexAutocompleteKey)&s=\(kRegexSession)&variations_map=%7B%22dtype%22:%22array%22,%22filter_by%22:%7B%22or%22:%5B%7B%22field%22:%22data.size%22,%22value%22:%22L%22%7D,%7B%22and%22:%5B%7B%22field%22:%22data.size%22,%22value%22:%22M%22%7D,%7B%22field%22:%22data.length%22,%22value%22:25%7D%5D%7D,%7B%22not%22:%7B%22field%22:%22data.in_stock%22,%22value%22:false%7D%7D%5D%7D,%22group_by%22:%5B%7B%22field%22:%22data.Country%22,%22name%22:%22Country%22%7D%5D,%22values%22:%7B%22price%22:%7B%22aggregation%22:%22min%22,%22field%22:%22data.price%22%7D%7D%7D"), builder.create())
127127

128128
self.constructor.autocomplete(forQuery: query, completionHandler: { response in })
129129

@@ -139,7 +139,7 @@ class ConstructorIOAutocompleteTests: XCTestCase {
139139

140140
let query = CIOAutocompleteQuery(query: "potato", variationsMap: variationsMap)
141141
let builder = CIOBuilder(expectation: "Calling Autocomplete with variations map should have a URL query variations map", builder: http(200))
142-
stub(regex("https://ac.cnstrc.com/autocomplete/potato?_dt=\(kRegexTimestamp)&c=\(kRegexVersion)&i=\(kRegexClientID)&key=\(kRegexAutocompleteKey)&s=\(kRegexSession)&variations_map=%7B%22dtype%22:%22array%22,%22group_by%22:%5B%7B%22name%22:%22Country%22,%22field%22:%22data.Country%22%7D%5D,%22values%22:%7B%22price%22:%7B%22field%22:%22data.price%22,%22aggregation%22:%22min%22%7D%7D,%22filter_by%22:%7B%22or%22:%5B%7B%22field%22:%22data.size%22,%22value%22:%22L%22%7D,%7B%22and%22:%5B%7B%22field%22:%22data.size%22,%22value%22:%22M%22%7D,%7B%22field%22:%22data.length%22,%22value%22:25%7D%5D%7D,%7B%22not%22:%7B%22field%22:%22data.in_stock%22,%22value%22:false%7D%7D%5D%7D%7D"), builder.create())
142+
stub(regex("https://ac.cnstrc.com/autocomplete/potato?_dt=\(kRegexTimestamp)&c=\(kRegexVersion)&i=\(kRegexClientID)&key=\(kRegexAutocompleteKey)&s=\(kRegexSession)&variations_map=%7B%22dtype%22:%22array%22,%22group_by%22:%5B%7B%22field%22:%22data.Country%22,%22name%22:%22Country%22%7D%5D,%22values%22:%7B%22price%22:%7B%22aggregation%22:%22min%22,%22field%22:%22data.price%22%7D%7D,%22filter_by%22:%7B%22or%22:%5B%7B%22field%22:%22data.size%22,%22value%22:%22L%22%7D,%7B%22and%22:%5B%7B%22field%22:%22data.size%22,%22value%22:%22M%22%7D,%7B%22field%22:%22data.length%22,%22value%22:25%7D%5D%7D,%7B%22not%22:%7B%22field%22:%22data.in_stock%22,%22value%22:false%7D%7D%5D%7D%7D"), builder.create())
143143

144144
self.constructor.autocomplete(forQuery: query, completionHandler: { response in })
145145
self.wait(for: builder.expectation)

AutocompleteClientTests/FW/Logic/Worker/ConstructorIOBrowseItemsTests.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ class ConstructorIOBrowseItemsTests: XCTestCase {
135135
let query = CIOBrowseItemsQuery(ids: ["123", "234"], variationsMap: CIOQueryVariationsMap(GroupBy: groupByOptions, Values: ["price": valueOption], Dtype: "array"))
136136

137137
let builder = CIOBuilder(expectation: "Calling BrowseItems with variations map should have a URL query variations map", builder: http(200))
138-
stub(regex("https://ac.cnstrc.com/browse/items?_dt=\(kRegexTimestamp)&c=\(kRegexVersion)&i=\(kRegexClientID)&ids=123&ids=234&key=\(kRegexAutocompleteKey)&num_results_per_page=30&page=1&s=\(kRegexSession)&section=Products&variations_map=%7B%22dtype%22:%22array%22,%22group_by%22:%5B%7B%22name%22:%22Country%22,%22field%22:%22data.facets.Country%22%7D%5D,%22values%22:%7B%22price%22:%7B%22field%22:%22data.facets.price%22,%22aggregation%22:%22min%22%7D%7D%7D"), builder.create())
138+
stub(regex("https://ac.cnstrc.com/browse/items?_dt=\(kRegexTimestamp)&c=\(kRegexVersion)&i=\(kRegexClientID)&ids=123&ids=234&key=\(kRegexAutocompleteKey)&num_results_per_page=30&page=1&s=\(kRegexSession)&section=Products&variations_map=%7B%22dtype%22:%22array%22,%22group_by%22:%5B%7B%22field%22:%22data.facets.Country%22,%22name%22:%22Country%22%7D%5D,%22values%22:%7B%22price%22:%7B%22aggregation%22:%22min%22,%22field%22:%22data.facets.price%22%7D%7D%7D"), builder.create())
139139

140140
self.constructor.browseItems(forQuery: query, completionHandler: { response in })
141141

@@ -158,7 +158,7 @@ class ConstructorIOBrowseItemsTests: XCTestCase {
158158

159159
let query = CIOBrowseItemsQuery(ids: ["123", "234"], variationsMap: variationsMap)
160160
let builder = CIOBuilder(expectation: "Calling BrowseItems with variations map should have a URL query variations map", builder: http(200))
161-
stub(regex("https://ac.cnstrc.com/browse/items?_dt=\(kRegexTimestamp)&c=\(kRegexVersion)&i=\(kRegexClientID)&ids=123&ids=234&key=\(kRegexAutocompleteKey)&num_results_per_page=30&page=1&s=\(kRegexSession)&section=Products&variations_map=%7B%22values%22:%7B%22price%22:%7B%22field%22:%22data.price%22,%22aggregation%22:%22min%22%7D%7D,%22dtype%22:%22array%22,%22filter_by%22:%7B%22or%22:%5B%7B%22field%22:%22data.size%22,%22value%22:%22L%22%7D,%7B%22and%22:%5B%7B%22field%22:%22data.size%22,%22value%22:%22M%22%7D,%7B%22field%22:%22data.length%22,%22value%22:25%7D%5D%7D,%7B%22not%22:%7B%22field%22:%22data.in_stock%22,%22value%22:false%7D%7D%5D%7D,%22group_by%22:%5B%7B%22name%22:%22Country%22,%22field%22:%22data.Country%22%7D%5D%7D"), builder.create())
161+
stub(regex("https://ac.cnstrc.com/browse/items?_dt=\(kRegexTimestamp)&c=\(kRegexVersion)&i=\(kRegexClientID)&ids=123&ids=234&key=\(kRegexAutocompleteKey)&num_results_per_page=30&page=1&s=\(kRegexSession)&section=Products&variations_map=%7B%22dtype%22:%22array%22,%22filter_by%22:%7B%22or%22:%5B%7B%22field%22:%22data.size%22,%22value%22:%22L%22%7D,%7B%22and%22:%5B%7B%22field%22:%22data.size%22,%22value%22:%22M%22%7D,%7B%22field%22:%22data.length%22,%22value%22:25%7D%5D%7D,%7B%22not%22:%7B%22field%22:%22data.in_stock%22,%22value%22:false%7D%7D%5D%7D,%22group_by%22:%5B%7B%22field%22:%22data.Country%22,%22name%22:%22Country%22%7D%5D,%22values%22:%7B%22price%22:%7B%22aggregation%22:%22min%22,%22field%22:%22data.price%22%7D%7D%7D"), builder.create())
162162

163163
self.constructor.browseItems(forQuery: query, completionHandler: { response in })
164164

AutocompleteClientTests/FW/Logic/Worker/ConstructorIOBrowseTests.swift

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -135,16 +135,16 @@ class ConstructorIOBrowseTests: XCTestCase {
135135
let query = CIOBrowseQuery(filterName: "potato", filterValue: "russet", variationsMap: CIOQueryVariationsMap(GroupBy: groupByOptions, Values: ["price": valueOption], Dtype: "array"))
136136

137137
let builder = CIOBuilder(expectation: "Calling Browse with variations map should have a URL query variations map", builder: http(200))
138-
stub(regex("https://ac.cnstrc.com/browse/potato/russet?_dt=\(kRegexTimestamp)&c=\(kRegexVersion)&i=\(kRegexClientID)&key=\(kRegexAutocompleteKey)&num_results_per_page=30&page=1&s=\(kRegexSession)&section=Products&variations_map=%7B%22dtype%22:%22array%22,%22group_by%22:%5B%7B%22name%22:%22Country%22,%22field%22:%22data.facets.Country%22%7D%5D,%22values%22:%7B%22price%22:%7B%22field%22:%22data.facets.price%22,%22aggregation%22:%22min%22%7D%7D%7D"), builder.create())
138+
stub(regex("https://ac.cnstrc.com/browse/potato/russet?_dt=\(kRegexTimestamp)&c=\(kRegexVersion)&i=\(kRegexClientID)&key=\(kRegexAutocompleteKey)&num_results_per_page=30&page=1&s=\(kRegexSession)&section=Products&variations_map=%7B%22dtype%22:%22array%22,%22group_by%22:%5B%7B%22field%22:%22data.facets.Country%22,%22name%22:%22Country%22%7D%5D,%22values%22:%7B%22price%22:%7B%22aggregation%22:%22min%22,%22field%22:%22data.facets.price%22%7D%7D%7D"), builder.create())
139139

140140
self.constructor.browse(forQuery: query, completionHandler: { response in })
141141

142142
self.wait(for: builder.expectation)
143143
}
144144

145145
func testBrowse_AttachesVariationsMapWithFilterBy() {
146-
let groupByOptions = [GroupByOption(name: "Country", field: "data.facets.Country")]
147-
let valueOption = ValueOption(aggregation: "min", field: "data.facets.price")
146+
let groupByOptions = [GroupByOption(name: "Country", field: "data.Country")]
147+
let valueOption = ValueOption(aggregation: "min", field: "data.price")
148148

149149
let filterValueA = FilterByExpressionValue(fieldPath: "data.size", value: "M")
150150
let filterValueB = FilterByExpressionValue(fieldPath: "data.size", value: "L")
@@ -158,23 +158,23 @@ class ConstructorIOBrowseTests: XCTestCase {
158158

159159
let query = CIOBrowseQuery(filterName: "potato", filterValue: "russet", variationsMap: variationsMap)
160160
let builder = CIOBuilder(expectation: "Calling Browse with variations map should have a URL query variations map", builder: http(200))
161-
stub(regex("https://ac.cnstrc.com/browse/potato/russet?_dt=\(kRegexTimestamp)&c=\(kRegexVersion)&i=\(kRegexClientID)&key=\(kRegexAutocompleteKey)&num_results_per_page=30&page=1&s=\(kRegexSession)&section=Products&variations_map=%7B%22values%22:%7B%22price%22:%7B%22field%22:%22data.facets.price%22,%22aggregation%22:%22min%22%7D%7D,%22dtype%22:%22array%22,%22filter_by%22:%7B%22or%22:%5B%7B%22field%22:%22data.size%22,%22value%22:%22L%22%7D,%7B%22and%22:%5B%7B%22field%22:%22data.size%22,%22value%22:%22M%22%7D,%7B%22field%22:%22data.length%22,%22value%22:25%7D%5D%7D,%7B%22not%22:%7B%22field%22:%22data.in_stock%22,%22value%22:false%7D%7D%5D%7D,%22group_by%22:%5B%7B%22name%22:%22Country%22,%22field%22:%22data.facets.Country%22%7D%5D%7D"), builder.create())
161+
stub(regex("https://ac.cnstrc.com/browse/potato/russet?_dt=\(kRegexTimestamp)&c=\(kRegexVersion)&i=\(kRegexClientID)&key=\(kRegexAutocompleteKey)&num_results_per_page=30&page=1&s=\(kRegexSession)&section=Products&variations_map=%7B%22dtype%22:%22array%22,%22filter_by%22:%7B%22or%22:%5B%7B%22field%22:%22data.size%22,%22value%22:%22L%22%7D,%7B%22and%22:%5B%7B%22field%22:%22data.size%22,%22value%22:%22M%22%7D,%7B%22field%22:%22data.length%22,%22value%22:25%7D%5D%7D,%7B%22not%22:%7B%22field%22:%22data.in_stock%22,%22value%22:false%7D%7D%5D%7D,%22group_by%22:%5B%7B%22field%22:%22data.Country%22,%22name%22:%22Country%22%7D%5D,%22values%22:%7B%22price%22:%7B%22aggregation%22:%22min%22,%22field%22:%22data.price%22%7D%7D%7D"), builder.create())
162162

163163
self.constructor.browse(forQuery: query, completionHandler: { response in })
164164

165165
self.wait(for: builder.expectation)
166166
}
167167

168168
func testBrowse_AttachesVariationsMapWithFilterByEscapedJsonString() {
169-
let groupByOptions = [GroupByOption(name: "Country", field: "data.facets.Country")]
170-
let valueOption = ValueOption(aggregation: "min", field: "data.facets.price")
169+
let groupByOptions = [GroupByOption(name: "Country", field: "data.Country")]
170+
let valueOption = ValueOption(aggregation: "min", field: "data.price")
171171
let FilterByJsonStr = "{\"or\":[{\"field\":\"data.size\",\"value\":\"L\"},{\"and\":[{\"field\":\"data.size\",\"value\":\"M\"},{\"field\":\"data.length\",\"value\":25}]},{\"not\":{\"field\":\"data.in_stock\",\"value\":false}}]}"
172172

173173
let variationsMap = CIOQueryVariationsMap(GroupBy: groupByOptions, FilterBy: FilterByJsonStr, Values: ["price": valueOption], Dtype: "array")
174174

175175
let query = CIOBrowseQuery(filterName: "potato", filterValue: "russet", variationsMap: variationsMap)
176176
let builder = CIOBuilder(expectation: "Calling Browse with variations map should have a URL query variations map", builder: http(200))
177-
stub(regex("https://ac.cnstrc.com/browse/potato/russet?_dt=\(kRegexTimestamp)&c=\(kRegexVersion)&i=\(kRegexClientID)&key=\(kRegexAutocompleteKey)&num_results_per_page=30&page=1&s=\(kRegexSession)&section=Products&variations_map=%7B%22dtype%22:%22array%22,%22group_by%22:%5B%7B%22name%22:%22Country%22,%22field%22:%22data.facets.Country%22%7D%5D,%22values%22:%7B%22price%22:%7B%22field%22:%22data.facets.price%22,%22aggregation%22:%22min%22%7D%7D,%22filter_by%22:%7B%22or%22:%5B%7B%22field%22:%22data.size%22,%22value%22:%22L%22%7D,%7B%22and%22:%5B%7B%22field%22:%22data.size%22,%22value%22:%22M%22%7D,%7B%22field%22:%22data.length%22,%22value%22:25%7D%5D%7D,%7B%22not%22:%7B%22field%22:%22data.in_stock%22,%22value%22:false%7D%7D%5D%7D%7D"), builder.create())
177+
stub(regex("https://ac.cnstrc.com/browse/potato/russet?_dt=\(kRegexTimestamp)&c=\(kRegexVersion)&i=\(kRegexClientID)&key=\(kRegexAutocompleteKey)&num_results_per_page=30&page=1&s=\(kRegexSession)&section=Products&variations_map=%7B%22dtype%22:%22array%22,%22group_by%22:%5B%7B%22field%22:%22data.Country%22,%22name%22:%22Country%22%7D%5D,%22values%22:%7B%22price%22:%7B%22aggregation%22:%22min%22,%22field%22:%22data.price%22%7D%7D,%22filter_by%22:%7B%22or%22:%5B%7B%22field%22:%22data.size%22,%22value%22:%22L%22%7D,%7B%22and%22:%5B%7B%22field%22:%22data.size%22,%22value%22:%22M%22%7D,%7B%22field%22:%22data.length%22,%22value%22:25%7D%5D%7D,%7B%22not%22:%7B%22field%22:%22data.in_stock%22,%22value%22:false%7D%7D%5D%7D%7D"), builder.create())
178178

179179
self.constructor.browse(forQuery: query, completionHandler: { response in })
180180

AutocompleteClientTests/FW/Logic/Worker/ConstructorIOQuizIntegrationTests.swift

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@ class ConstructorIOQuizIntegrationTests: XCTestCase {
5656

5757
XCTAssertNil(cioError)
5858
XCTAssertNotEqual(responseData.quizVersionID, "")
59-
XCTAssertEqual(responseData.isLastQuestion, false)
6059
XCTAssertEqual(responseData.nextQuestion.id, 1)
6160
XCTAssertEqual(responseData.nextQuestion.title, "This is a test quiz.")
6261
XCTAssertEqual(responseData.nextQuestion.images?.primaryUrl, "/test-asset")
@@ -92,7 +91,6 @@ class ConstructorIOQuizIntegrationTests: XCTestCase {
9291
XCTAssertNil(cioError)
9392
XCTAssertEqual(responseData.quizVersionID, self.quizVersionID)
9493
XCTAssertEqual(responseData.quizSessionID, self.quizSessionID)
95-
XCTAssertEqual(responseData.isLastQuestion, false)
9694
XCTAssertEqual(responseData.nextQuestion.id, 1)
9795
XCTAssertEqual(responseData.nextQuestion.title, "This is a test quiz.")
9896
XCTAssertEqual(responseData.nextQuestion.images?.primaryUrl, "/test-asset")
@@ -138,7 +136,6 @@ class ConstructorIOQuizIntegrationTests: XCTestCase {
138136
XCTAssertNil(cioError)
139137
XCTAssertNotEqual(responseData.quizVersionID, "")
140138
XCTAssertNotEqual(responseData.quizSessionID, "")
141-
XCTAssertEqual(responseData.isLastQuestion, false)
142139
XCTAssertEqual(responseData.nextQuestion.id, 2)
143140
XCTAssertEqual(responseData.nextQuestion.title, "This is a multiple select question")
144141
XCTAssertEqual(responseData.nextQuestion.images?.primaryUrl, "/test-asset")
@@ -184,7 +181,6 @@ class ConstructorIOQuizIntegrationTests: XCTestCase {
184181
XCTAssertNil(cioError)
185182
XCTAssertNotEqual(responseData.quizVersionID, "")
186183
XCTAssertNotEqual(responseData.quizSessionID, "")
187-
XCTAssertEqual(responseData.isLastQuestion, false)
188184
XCTAssertEqual(responseData.nextQuestion.id, 3)
189185
XCTAssertEqual(responseData.nextQuestion.title, "Test Cover")
190186
XCTAssertEqual(responseData.nextQuestion.images?.primaryUrl, "/test-asset")
@@ -224,7 +220,6 @@ class ConstructorIOQuizIntegrationTests: XCTestCase {
224220
XCTAssertNil(cioError)
225221
XCTAssertNotEqual(responseData.quizVersionID, "")
226222
XCTAssertNotEqual(responseData.quizSessionID, "")
227-
XCTAssertEqual(responseData.isLastQuestion, true)
228223
XCTAssertEqual(responseData.nextQuestion.id, 4)
229224
XCTAssertEqual(responseData.nextQuestion.title, "Test Open Text")
230225
XCTAssertEqual(responseData.nextQuestion.images?.primaryUrl, "/test-asset")

0 commit comments

Comments
 (0)