-
Notifications
You must be signed in to change notification settings - Fork 991
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
[NT-1646][NT-1647]:Email verification flow|Skip Link feature flags #1030
[NT-1646][NT-1647]:Email verification flow|Skip Link feature flags #1030
Conversation
- tests for the new method `isFeatureFlagEnabled(String)`
- Added method to check if a concrete FeatureFlag is enabled
…tin/NT-1646-Verification-Flow-Feature-Flag
…tin/NT-1646-Verification-Flow-Feature-Flag
…tin/NT-1646-Verification-Flow-Feature-Flag
app/src/test/java/com/kickstarter/libs/utils/extensions/ConfigExtensionTest.kt
Outdated
Show resolved
Hide resolved
app/src/test/java/com/kickstarter/libs/utils/extensions/ConfigExtensionTest.kt
Outdated
Show resolved
Hide resolved
app/src/test/java/com/kickstarter/libs/utils/extensions/ConfigExtensionTest.kt
Outdated
Show resolved
Hide resolved
app/src/test/java/com/kickstarter/libs/utils/extensions/ConfigExtensionTest.kt
Outdated
Show resolved
Hide resolved
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.
Made some comments with suggested method names for the tests you added. Otherwise looks great and awesome job figuring out this java/kotlin-extension work! 😄
app/src/test/java/com/kickstarter/libs/utils/extensions/ConfigExtensionTest.kt
Outdated
Show resolved
Hide resolved
app/src/test/java/com/kickstarter/libs/utils/extensions/ConfigExtensionTest.kt
Outdated
Show resolved
Hide resolved
app/src/test/java/com/kickstarter/libs/utils/extensions/ConfigExtensionTest.kt
Outdated
Show resolved
Hide resolved
app/src/test/java/com/kickstarter/libs/utils/extensions/ConfigExtensionTest.kt
Outdated
Show resolved
Hide resolved
app/src/test/java/com/kickstarter/libs/utils/extensions/ConfigExtensionTest.kt
Outdated
Show resolved
Hide resolved
app/src/test/java/com/kickstarter/libs/utils/extensions/ConfigExtensionTest.kt
Outdated
Show resolved
Hide resolved
Pair("ios_go_rewardless", true), | ||
Pair("ios_native_checkout", true))) | ||
|
||
assertEquals(JSONArray().apply { |
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.
I see that you gave this test three active experiments. Shouldn't we set these other two experiments to false to check to make sure they aren't coming back as apart of the enabledFeatureFlag
field?
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.
I think the test is correct, as the other two experiments are for ios, and they are active. That's the scenario is being tested, even though they are active we are interested only in the android ones.
app/src/main/java/com/kickstarter/libs/utils/extensions/ConfigExtension.kt
Show resolved
Hide resolved
@@ -100,7 +101,7 @@ abstract class TrackingClient(@param:ApplicationContext private val context: Con | |||
} | |||
|
|||
override fun currentVariants(): JSONArray? { | |||
return ConfigUtils.currentVariants(this.config) | |||
return this.config?.currentVariants() |
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.
if config
is null, what does this return? Null?
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.
Config cannot be null, it's not optional. In case that happen it will throw NullPointerException()
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.
Hmm, then why do we need the safe call operator?
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.
what is optional is the return from currentVariants()
that is a JSONArray?
|
📲 What
🛠 How
@file:JvmName("ConfigExtension")
as first line for the kotlin extension. That will allow us to use that extansion on a Java class, in the same way we will use an Utils class.👀 See
| | |
Story 📖
NT-1646
NT-1647