-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[MBL-722] Full MockOptimizely Removal #1823
Merged
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
c8b3e77
reference commit
msadoon 461d58f
clean up commented out code
scottkicks af43d50
remove optimizley files
scottkicks 73871b6
update TestCase and TestCase AppEnvironment
scottkicks bc6989c
cleanup Library tests
scottkicks a5e5070
update snapshot tests
scottkicks ce33b80
remove optimizely keys from KeyStore and update tests
scottkicks 9e505ca
removes duplicate tests
scottkicks 092a39f
update CommentsViewControllerTests snapshots
scottkicks File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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
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 |
---|---|---|
|
@@ -174,43 +174,7 @@ internal final class CommentsViewControllerTests: TestCase { | |
} | ||
} | ||
|
||
func testView_CurrentUser_LoggedIn_IsBacking_CommentFlaggingEnabledFeatureFlag_True() { | ||
let mockOptimizelyClient = MockOptimizelyClient() | ||
|> \.features .~ [OptimizelyFeature.commentFlaggingEnabled.rawValue: true] | ||
|
||
let mockService = | ||
MockService(fetchProjectCommentsEnvelopeResult: .success(CommentsEnvelope.multipleCommentTemplate)) | ||
|
||
let project = Project.template | ||
|> \.personalization.isBacking .~ true | ||
|
||
combos(Language.allLanguages, [Device.phone4_7inch, Device.pad]).forEach { | ||
language, device in | ||
withEnvironment( | ||
apiService: mockService, | ||
currentUser: .template, | ||
language: language, | ||
optimizelyClient: mockOptimizelyClient | ||
) { | ||
let controller = CommentsViewController.configuredWith(project: project) | ||
let (parent, _) = traitControllers(device: device, orientation: .portrait, child: controller) | ||
parent.view.frame.size.height = 1_100 | ||
|
||
self.scheduler.run() | ||
|
||
assertSnapshot( | ||
matching: parent.view, | ||
as: .image, | ||
named: "Comments - lang_\(language)_device_\(device)" | ||
) | ||
} | ||
} | ||
} | ||
|
||
func testView_CurrentUser_LoggedIn_IsBacking_CommentFlaggingEnabledFeatureFlag_False() { | ||
let mockOptimizelyClient = MockOptimizelyClient() | ||
|> \.features .~ [OptimizelyFeature.commentFlaggingEnabled.rawValue: false] | ||
|
||
func testView_CurrentUser_LoggedIn_IsBacking() { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @scottkicks So this exists already - |
||
let mockService = | ||
MockService(fetchProjectCommentsEnvelopeResult: .success(CommentsEnvelope.multipleCommentTemplate)) | ||
|
||
|
@@ -222,8 +186,7 @@ internal final class CommentsViewControllerTests: TestCase { | |
withEnvironment( | ||
apiService: mockService, | ||
currentUser: .template, | ||
language: language, | ||
optimizelyClient: mockOptimizelyClient | ||
language: language | ||
) { | ||
let controller = CommentsViewController.configuredWith(project: project) | ||
let (parent, _) = traitControllers(device: device, orientation: .portrait, child: controller) | ||
|
@@ -294,11 +257,10 @@ internal final class CommentsViewControllerTests: TestCase { | |
} | ||
|
||
func testCommentsViewControllerCreation_Success() { | ||
let mockOptimizelyClient = MockOptimizelyClient() | ||
let mockService = MockService(fetchProjectResult: .success(.template)) | ||
|
||
withEnvironment( | ||
apiService: mockService, optimizelyClient: mockOptimizelyClient | ||
apiService: mockService | ||
) { | ||
XCTAssert(commentsViewController(for: .template).isKind(of: CommentsViewController.self)) | ||
} | ||
|
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
Binary file removed
BIN
-122 KB
...sBacking_CommentFlaggingEnabledFeatureFlag_True.Comments-lang_de_device_pad.png
Binary file not shown.
Binary file removed
BIN
-87.7 KB
...CommentFlaggingEnabledFeatureFlag_True.Comments-lang_de_device_phone4_7inch.png
Binary file not shown.
Binary file removed
BIN
-118 KB
...sBacking_CommentFlaggingEnabledFeatureFlag_True.Comments-lang_en_device_pad.png
Binary file not shown.
Binary file removed
BIN
-83.9 KB
...CommentFlaggingEnabledFeatureFlag_True.Comments-lang_en_device_phone4_7inch.png
Binary file not shown.
Binary file removed
BIN
-121 KB
...sBacking_CommentFlaggingEnabledFeatureFlag_True.Comments-lang_es_device_pad.png
Binary file not shown.
Binary file removed
BIN
-86.3 KB
...CommentFlaggingEnabledFeatureFlag_True.Comments-lang_es_device_phone4_7inch.png
Binary file not shown.
Binary file removed
BIN
-122 KB
...sBacking_CommentFlaggingEnabledFeatureFlag_True.Comments-lang_fr_device_pad.png
Binary file not shown.
Binary file removed
BIN
-87.2 KB
...CommentFlaggingEnabledFeatureFlag_True.Comments-lang_fr_device_phone4_7inch.png
Binary file not shown.
Binary file removed
BIN
-119 KB
...sBacking_CommentFlaggingEnabledFeatureFlag_True.Comments-lang_ja_device_pad.png
Binary file not shown.
Binary file removed
BIN
-84.5 KB
...CommentFlaggingEnabledFeatureFlag_True.Comments-lang_ja_device_phone4_7inch.png
Binary file not shown.
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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@scottkicks Can we write a couple similar tests for our new
remoteConfigClientConfiguredNotification
andremoteConfigClientConfigurationFailedNotification
?