Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[MBL-721] Remote Config Local Feature Flags (#1817)
* rename OptimizelyFeatureFlagToolsViewModel & OptimizelyFeatureFlagToolsViewController * update RemoteConfigFlagToolsViewModel and Tests to use Remote Config environment instance * update RemoteConfigFeatureFlagToolsViewControllerTests * update naming * comment out tests that will fail due to unavailable obj-c initializer * update viewcontroller tests * more renames * use client method instead of internal vm method that is not needed * remove // from FIXME comment * Delete testOptimizelyFeatureFlagToolsViewController.1.png
- Loading branch information
1 parent
534eadc
commit d1b0762
Showing
14 changed files
with
310 additions
and
348 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
Binary file modified
BIN
+75 Bytes
(100%)
...er/__Snapshots__/BetaToolsViewControllerTests/testBetaToolsViewController.1.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
41 changes: 0 additions & 41 deletions
41
...OptimizelyFeatureFlagTools/Controller/OptimizelyFeatureFlagToolsViewControllerTests.swift
This file was deleted.
Oops, something went wrong.
Binary file removed
BIN
-61.9 KB
...FlagToolsViewControllerTests/testOptimizelyFeatureFlagToolsViewController.1.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
38 changes: 38 additions & 0 deletions
38
...teConfigFeatureFlagTools/Controller/RemoteConfigFeatureFlagToolsViewControllerTests.swift
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 |
---|---|---|
@@ -0,0 +1,38 @@ | ||
@testable import Kickstarter_Framework | ||
@testable import KsApi | ||
@testable import Library | ||
import Prelude | ||
import SnapshotTesting | ||
import UIKit | ||
|
||
final class RemoteConfigFeatureFlagToolsViewControllerTests: TestCase { | ||
override func setUp() { | ||
super.setUp() | ||
|
||
AppEnvironment.pushEnvironment(mainBundle: Bundle.framework) | ||
UIView.setAnimationsEnabled(false) | ||
} | ||
|
||
override func tearDown() { | ||
AppEnvironment.popEnvironment() | ||
UIView.setAnimationsEnabled(true) | ||
super.tearDown() | ||
} | ||
|
||
func testRemoteConfigFeatureFlagToolsViewController() { | ||
let mockRemoteConfigClient = MockRemoteConfigClient() | ||
|> \.features .~ [ | ||
RemoteConfigFeature.consentManagementDialogEnabled.rawValue: false, | ||
RemoteConfigFeature.facebookLoginInterstitialEnabled | ||
.rawValue: false | ||
] | ||
|
||
withEnvironment(language: .en, mainBundle: MockBundle(), remoteConfigClient: mockRemoteConfigClient) { | ||
let controller = RemoteConfigFeatureFlagToolsViewController.instantiate() | ||
let (parent, _) = traitControllers(device: .phone4_7inch, orientation: .portrait, child: controller) | ||
self.scheduler.run() | ||
|
||
assertSnapshot(matching: parent.view, as: .image(perceptualPrecision: 0.98)) | ||
} | ||
} | ||
} |
Binary file added
BIN
+36.8 KB
...agToolsViewControllerTests/testRemoteConfigFeatureFlagToolsViewController.1.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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.