-
Notifications
You must be signed in to change notification settings - Fork 328
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support toggling update warnings & show update in restore flow
- Loading branch information
1 parent
fa27846
commit f87bd03
Showing
11 changed files
with
203 additions
and
63 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,7 +20,10 @@ enum CustomerCenterConfigTestData { | |
|
||
@available(iOS 14.0, *) | ||
// swiftlint:disable:next function_body_length | ||
static func customerCenterData(lastPublishedAppVersion: String?) -> CustomerCenterConfigData { | ||
static func customerCenterData( | ||
lastPublishedAppVersion: String?, | ||
shouldWarnCustomerToUpdate: Bool = false | ||
) -> CustomerCenterConfigData { | ||
CustomerCenterConfigData( | ||
screens: [.management: | ||
.init( | ||
|
@@ -111,7 +114,10 @@ enum CustomerCenterConfigTestData { | |
"back": "Back" | ||
] | ||
), | ||
support: .init(email: "[email protected]"), | ||
support: .init( | ||
email: "[email protected]", | ||
shouldWarnCustomerToUpdate: shouldWarnCustomerToUpdate | ||
), | ||
lastPublishedAppVersion: lastPublishedAppVersion, | ||
productId: 1 | ||
) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,7 +18,10 @@ import XCTest | |
|
||
class ContactSupportUtilitiesTest: TestCase { | ||
|
||
private let support: CustomerCenterConfigData.Support = .init(email: "[email protected]") | ||
private let support: CustomerCenterConfigData.Support = .init( | ||
email: "[email protected]", | ||
shouldWarnCustomerToUpdate: false | ||
) | ||
private let localization: CustomerCenterConfigData.Localization = .init(locale: "en_US", localizedStrings: [:]) | ||
|
||
func testSupportEmailBodyWithDefaultDataIsCorrect() { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -106,7 +106,10 @@ class CustomerCenterConfigDataTests: TestCase { | |
) | ||
], | ||
localization: .init(locale: "en_US", localizedStrings: ["key": "value"]), | ||
support: .init(email: "[email protected]") | ||
support: .init( | ||
email: "[email protected]", | ||
shouldWarnCustomerToUpdate: false | ||
) | ||
), | ||
lastPublishedAppVersion: "1.2.3", | ||
itunesTrackId: 123 | ||
|
@@ -178,6 +181,8 @@ class CustomerCenterConfigDataTests: TestCase { | |
|
||
expect(configData.lastPublishedAppVersion) == "1.2.3" | ||
expect(configData.productId) == 123 | ||
|
||
expect(configData.support.shouldWarnCustomerToUpdate) == false | ||
} | ||
|
||
func testUnknownValuesHandling() throws { | ||
|