Skip to content

Commit

Permalink
fix: set auto track screen to false by default (#216)
Browse files Browse the repository at this point in the history
  • Loading branch information
Shahroz16 committed Jun 9, 2023
1 parent 608ffd9 commit 71fcf52
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion sdk/src/main/java/io/customer/sdk/CustomerIOConfig.kt
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ data class CustomerIOConfig(
const val BACKGROUND_QUEUE_MIN_NUMBER_OF_TASKS = 10
const val BACKGROUND_QUEUE_SECONDS_DELAY = 30.0
const val HTTP_REQUEST_TIMEOUT = 6000L
const val SHOULD_AUTO_RECORD_SCREEN_VIEWS = true
const val SHOULD_AUTO_RECORD_SCREEN_VIEWS = false
}

object Keys {
Expand Down
9 changes: 7 additions & 2 deletions sdk/src/sharedTest/java/io/customer/sdk/CustomerIOTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import io.customer.sdk.repository.ProfileRepository
import io.customer.sdk.repository.preference.CustomerIOStoredValues
import io.customer.sdk.repository.preference.SharedPreferenceRepository
import io.customer.sdk.util.CioLogLevel
import io.customer.sdk.util.Seconds
import kotlinx.coroutines.runBlocking
import org.amshove.kluent.shouldBe
import org.amshove.kluent.shouldBeEqualTo
Expand Down Expand Up @@ -52,7 +53,7 @@ class CustomerIOTest : BaseTest() {
apiKey = givenApiKey,
region = Region.EU,
appContext = application
).autoTrackScreenViews(true)
)

val client = builder.build()

Expand All @@ -62,9 +63,13 @@ class CustomerIOTest : BaseTest() {
actual.apiKey shouldBeEqualTo givenApiKey
actual.timeout.shouldNotBeNull()
actual.region shouldBeEqualTo Region.EU
actual.autoTrackScreenViews shouldBeEqualTo true
actual.autoTrackScreenViews shouldBeEqualTo false
actual.trackingApiUrl shouldBeEqualTo null
actual.trackingApiHostname shouldBeEqualTo "https://track-sdk-eu.customer.io/"
actual.backgroundQueueTaskExpiredSeconds shouldBeEqualTo Seconds.fromDays(3).value
actual.backgroundQueueMinNumberOfTasks shouldBeEqualTo 10
actual.backgroundQueueSecondsDelay shouldBeEqualTo 30.0
actual.logLevel shouldBeEqualTo CioLogLevel.ERROR
}

@Test
Expand Down

0 comments on commit 71fcf52

Please sign in to comment.