TP-47541 - AP_PL UI tests in intro screen (#8763)
This commit is contained in:
committed by
GitHub
parent
f4b257fe99
commit
e2caccfc8c
2
.github/workflows/metrics_logger.yml
vendored
2
.github/workflows/metrics_logger.yml
vendored
@@ -77,4 +77,4 @@ jobs:
|
||||
- name: Run UI tests
|
||||
if: matrix.build_type == 'freshDebug'
|
||||
run: |
|
||||
./gradlew :app:connectedQaDebugAndroidTest -Pandroid.testInstrumentationRunnerArguments.package=com.navi.ap --stacktrace
|
||||
./gradlew :app:connectedUitestDebugAndroidTest -Pandroid.testInstrumentationRunnerArguments.package=com.navi.ap --stacktrace
|
||||
@@ -143,6 +143,24 @@ android {
|
||||
FACEBOOK_APP_ID: "0"
|
||||
]
|
||||
}
|
||||
uitest {
|
||||
dimension "app"
|
||||
applicationId "com.naviapp.dev"
|
||||
buildConfigField 'String', 'BASE_URL', formatString('http://localhost:2763/')
|
||||
buildConfigField 'String', 'MOENGAGE_KEY', formatString('2PDJ4M6TDY7ADQ5N5LU48H9Y')
|
||||
buildConfigField 'String', 'APPSFLYER_KEY', formatString('ua6cppJ9oQx7aPQPNyHrHA')
|
||||
buildConfigField 'String', 'HYPERVERGE_APP_ID', formatString('2c007b')
|
||||
buildConfigField 'String', 'HYPERVERGE_APP_KEY', formatString('c9b1e034f7c8961a3f5b')
|
||||
buildConfigField 'String', 'XIAOMI_PUSH_APP_ID', formatString('2882303761521925585')
|
||||
buildConfigField 'String', 'XIAOMI_PUSH_APP_KEY', formatString('5692192517585')
|
||||
buildConfigField 'String', 'YOUTUBE_KEY', formatString('AIzaSyDlbxag2dCc-a9ac8JTfH3nnVw41pdI-1U')
|
||||
buildConfigField 'String', 'SSL_PINNING_KEY', formatString('sha256/nUU7NjGrGo/mxijjsX+MHerUbpIHBidF8LAYOEPFWA8=')
|
||||
buildConfigField 'String', 'ALFRED_API_KEY', formatString('oMv77fgpBg9NFGom0Psizbf7lbrdBVJz')
|
||||
manifestPlaceholders = [
|
||||
TRUECALLER_KEY : "6E6TX0cd28bada2b14cf28534dfce68c6a245",
|
||||
FACEBOOK_APP_ID: "0"
|
||||
]
|
||||
}
|
||||
dev {
|
||||
dimension "app"
|
||||
applicationId "com.naviapp.dev"
|
||||
@@ -285,6 +303,7 @@ dependencies {
|
||||
}
|
||||
debugImplementation libs.androidx.compose.ui.test.manifest
|
||||
debugImplementation libs.androidx.compose.ui.test.junit4
|
||||
androidTestImplementation libs.coil.test
|
||||
androidTestImplementation libs.hamcrest
|
||||
debugImplementation libs.androidx.test.monitor
|
||||
|
||||
|
||||
22
app/src/androidTest/AndroidManifest.xml
Normal file
22
app/src/androidTest/AndroidManifest.xml
Normal file
@@ -0,0 +1,22 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<!--
|
||||
~
|
||||
~ * Copyright © 2019-2023 by Navi Technologies Limited
|
||||
~ * All rights reserved. Strictly confidential
|
||||
~
|
||||
-->
|
||||
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
|
||||
<uses-sdk
|
||||
android:minSdkVersion="26"
|
||||
android:targetSdkVersion="33" />
|
||||
|
||||
<application
|
||||
android:name=".app.NaviApplication"
|
||||
tools:ignore="MissingApplicationIcon"
|
||||
tools:replace="android:name" />
|
||||
|
||||
</manifest>
|
||||
@@ -1,96 +0,0 @@
|
||||
package com.navi.ap.screens.genericscreen.ui
|
||||
|
||||
import androidx.activity.compose.setContent
|
||||
import androidx.compose.ui.test.assert
|
||||
import androidx.compose.ui.test.hasText
|
||||
import androidx.compose.ui.test.junit4.createAndroidComposeRule
|
||||
import androidx.compose.ui.test.onNodeWithTag
|
||||
import androidx.compose.ui.test.performClick
|
||||
import androidx.compose.ui.test.performTextClearance
|
||||
import androidx.test.ext.junit.runners.AndroidJUnit4
|
||||
import com.navi.ap.common.repository.LambdaRepository
|
||||
import com.navi.ap.common.ui.ApplicationPlatformActivity
|
||||
import com.navi.ap.network.di.APNetworkModule.providesDeserializer
|
||||
import com.navi.ap.network.retrofit.service.RetrofitService
|
||||
import com.navi.ap.screens.genericscreen.vm.ApGenericScreenVM
|
||||
import com.navi.ap.util.MockServerDispatcher
|
||||
import com.navi.ap.util.TestUtil.getTestTag
|
||||
import kotlinx.coroutines.test.runTest
|
||||
import okhttp3.OkHttpClient
|
||||
import okhttp3.mockwebserver.MockWebServer
|
||||
import org.junit.After
|
||||
import org.junit.Before
|
||||
import org.junit.Rule
|
||||
import org.junit.Test
|
||||
import org.junit.runner.RunWith
|
||||
import retrofit2.Retrofit
|
||||
import retrofit2.converter.gson.GsonConverterFactory
|
||||
|
||||
@RunWith(AndroidJUnit4::class)
|
||||
class ApGenericScreenUiTest {
|
||||
|
||||
@get:Rule
|
||||
val composeTestRule = createAndroidComposeRule<ApplicationPlatformActivity>()
|
||||
|
||||
private var mockWebServer = MockWebServer()
|
||||
private lateinit var apiService: RetrofitService
|
||||
|
||||
@Before
|
||||
fun setup() {
|
||||
mockWebServer.start(8080)
|
||||
|
||||
val deserializer = providesDeserializer()
|
||||
|
||||
apiService =
|
||||
Retrofit.Builder()
|
||||
.baseUrl(mockWebServer.url("/").toString())
|
||||
.addConverterFactory(GsonConverterFactory.create(deserializer))
|
||||
.client(OkHttpClient.Builder().build())
|
||||
.build()
|
||||
.create(RetrofitService::class.java)
|
||||
}
|
||||
|
||||
@After
|
||||
fun tearDown() {
|
||||
mockWebServer.shutdown()
|
||||
}
|
||||
|
||||
@Test
|
||||
fun verify_visibility_of_all_the_views() {
|
||||
runTest {
|
||||
mockWebServer.dispatcher = MockServerDispatcher().SampleResponse("personalDetails")
|
||||
|
||||
composeTestRule.activity.setContent {
|
||||
ApGenericScreen(
|
||||
composeTestRule.activity,
|
||||
viewModel = ApGenericScreenVM(
|
||||
LambdaRepository(apiService)
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
composeTestRule.awaitIdle()
|
||||
|
||||
val widgetId = "rs1G2"
|
||||
|
||||
val textInputTag = getTestTag(
|
||||
widgetId,
|
||||
"text_input",
|
||||
"CustomTextField"
|
||||
)
|
||||
|
||||
val nextButtonTag = getTestTag(
|
||||
"4Mio3",
|
||||
"next_cta_button_text",
|
||||
"Text"
|
||||
)
|
||||
|
||||
composeTestRule.onNodeWithTag(textInputTag).assert(hasText("Rajinikanth"))
|
||||
composeTestRule.onNodeWithTag(textInputTag).performTextClearance()
|
||||
composeTestRule.awaitIdle()
|
||||
composeTestRule.onNodeWithTag(nextButtonTag, useUnmergedTree = true).performClick()
|
||||
composeTestRule.awaitIdle()
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,222 @@
|
||||
package com.navi.ap.screens.genericscreen.ui
|
||||
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
||||
import android.graphics.Color
|
||||
import android.graphics.drawable.ColorDrawable
|
||||
import androidx.compose.ui.test.assert
|
||||
import androidx.compose.ui.test.assertHeightIsEqualTo
|
||||
import androidx.compose.ui.test.assertIsDisplayed
|
||||
import androidx.compose.ui.test.assertIsEnabled
|
||||
import androidx.compose.ui.test.assertIsNotDisplayed
|
||||
import androidx.compose.ui.test.assertIsNotEnabled
|
||||
import androidx.compose.ui.test.assertWidthIsEqualTo
|
||||
import androidx.compose.ui.test.hasText
|
||||
import androidx.compose.ui.test.onNodeWithTag
|
||||
import androidx.compose.ui.test.onNodeWithText
|
||||
import androidx.compose.ui.test.performClick
|
||||
import androidx.compose.ui.test.performScrollTo
|
||||
import androidx.compose.ui.unit.dp
|
||||
import androidx.test.core.app.ApplicationProvider
|
||||
import androidx.test.ext.junit.runners.AndroidJUnit4
|
||||
import coil.Coil
|
||||
import coil.ImageLoader
|
||||
import coil.annotation.ExperimentalCoilApi
|
||||
import coil.test.FakeImageLoaderEngine
|
||||
import com.navi.ap.common.ui.ApplicationPlatformActivity
|
||||
import com.navi.ap.util.MockServerDispatcher
|
||||
import com.navi.ap.util.TestUtil.getTestTag
|
||||
import com.navi.uitron.model.ui.ComposeViewType
|
||||
import com.naviapp.TestUtil.createAndroidIntentComposeRule
|
||||
import okhttp3.mockwebserver.MockWebServer
|
||||
import org.junit.After
|
||||
import org.junit.Before
|
||||
import org.junit.Rule
|
||||
import org.junit.Test
|
||||
import org.junit.runner.RunWith
|
||||
|
||||
@OptIn(ExperimentalCoilApi::class)
|
||||
@RunWith(AndroidJUnit4::class)
|
||||
class ApIntroScreenTest {
|
||||
|
||||
@get:Rule
|
||||
val composeTestRule = createAndroidIntentComposeRule<ApplicationPlatformActivity> {
|
||||
Intent(it, ApplicationPlatformActivity::class.java).apply {
|
||||
putExtra("applicationType", "PL")
|
||||
putExtra("REDIRECT_STATUS", "launch")
|
||||
}
|
||||
}
|
||||
|
||||
private var mockWebServer = MockWebServer()
|
||||
|
||||
@Before
|
||||
fun setup() {
|
||||
|
||||
mockWebServer.start(2763)
|
||||
|
||||
val engine = FakeImageLoaderEngine.Builder()
|
||||
.intercept(
|
||||
"https://public-assets.np.navi-tech.in/sa/application-platform/ic_blue_cross_24x24.png",
|
||||
ColorDrawable(Color.RED)
|
||||
)
|
||||
.default(ColorDrawable(Color.BLUE))
|
||||
.build()
|
||||
|
||||
val context = ApplicationProvider.getApplicationContext<Context>()
|
||||
|
||||
val imageLoader = ImageLoader.Builder(context)
|
||||
.components { add(engine) }
|
||||
.build()
|
||||
Coil.setImageLoader(imageLoader)
|
||||
|
||||
}
|
||||
|
||||
@After
|
||||
fun tearDown() {
|
||||
mockWebServer.shutdown()
|
||||
}
|
||||
|
||||
@Test(timeout = 60000)
|
||||
fun verify_states_of_header_widget_on_success() {
|
||||
mockWebServer.dispatcher = MockServerDispatcher().Response()
|
||||
|
||||
composeTestRule.mainClock.autoAdvance = false
|
||||
composeTestRule.mainClock.advanceTimeBy(10000)
|
||||
composeTestRule.mainClock.autoAdvance = true
|
||||
|
||||
val widgetId = "cxi6F"
|
||||
val text = getTestTag(widgetId, "center_text", ComposeViewType.Text)
|
||||
val rightText = getTestTag(widgetId, "right_text", ComposeViewType.Text)
|
||||
val icon = getTestTag(widgetId, "center_icon", ComposeViewType.Image)
|
||||
val leftIcon = getTestTag(widgetId, "left_icon", ComposeViewType.Image)
|
||||
|
||||
composeTestRule.onNodeWithTag(text)
|
||||
.assertExists()
|
||||
.assert(hasText("Powered by"))
|
||||
composeTestRule.onNodeWithTag(rightText)
|
||||
.assertIsDisplayed()
|
||||
.assert(hasText("HELP"))
|
||||
composeTestRule.onNodeWithTag(icon)
|
||||
.assertIsDisplayed()
|
||||
.assertWidthIsEqualTo(89.dp)
|
||||
.assertHeightIsEqualTo(11.dp)
|
||||
composeTestRule.onNodeWithTag(leftIcon)
|
||||
.assertIsDisplayed()
|
||||
.assertWidthIsEqualTo(24.dp)
|
||||
.assertHeightIsEqualTo(24.dp)
|
||||
}
|
||||
|
||||
@Test(timeout = 60000)
|
||||
fun verify_states_of_content_widgets_on_success() {
|
||||
mockWebServer.dispatcher = MockServerDispatcher().Response()
|
||||
|
||||
composeTestRule.mainClock.autoAdvance = false
|
||||
composeTestRule.mainClock.advanceTimeBy(10000)
|
||||
composeTestRule.mainClock.autoAdvance = true
|
||||
|
||||
val widgetId = "7oDlm"
|
||||
val title = getTestTag(widgetId, "title", ComposeViewType.Text)
|
||||
val subTitle = getTestTag(widgetId, "sub_title", ComposeViewType.SpannableText)
|
||||
composeTestRule.onNodeWithTag(title)
|
||||
.assertIsDisplayed()
|
||||
.assert(hasText("LOAN APPROVAL"))
|
||||
|
||||
val widgetId2 = "BXyiR"
|
||||
val title1 = getTestTag(widgetId2, "title", ComposeViewType.Text)
|
||||
composeTestRule.waitForIdle()
|
||||
composeTestRule.onNodeWithTag(title1)
|
||||
.assertIsDisplayed()
|
||||
.assert(hasText("NEXT STEPS"))
|
||||
|
||||
val widgetId3 = "OJjpC"
|
||||
val item0Title = getTestTag(widgetId3, "item_0_title", ComposeViewType.Text)
|
||||
val item1Title = getTestTag(widgetId3, "item_1_title", ComposeViewType.Text)
|
||||
val item2Title = getTestTag(widgetId3, "item_2_title", ComposeViewType.Text)
|
||||
val item3Title = getTestTag(widgetId3, "item_3_title", ComposeViewType.Text)
|
||||
val item0SubTitle = getTestTag(widgetId3, "item_0_sub_title", ComposeViewType.Text)
|
||||
val item1SubTitle = getTestTag(widgetId3, "item_1_sub_title", ComposeViewType.Text)
|
||||
val item2SubTitle = getTestTag(widgetId3, "item_2_sub_title", ComposeViewType.Text)
|
||||
val item3SubTitle = getTestTag(widgetId3, "item_3_sub_title", ComposeViewType.Text)
|
||||
val divider0Title = getTestTag(widgetId3, "divider_0_title", ComposeViewType.Text)
|
||||
val divider1Title = getTestTag(widgetId3, "divider_1_title", ComposeViewType.Text)
|
||||
composeTestRule.onNodeWithTag(item0Title)
|
||||
.assertExists()
|
||||
.assert(hasText("Basic details"))
|
||||
composeTestRule.onNodeWithTag(item1Title)
|
||||
.assertExists()
|
||||
.assert(hasText("Work details"))
|
||||
composeTestRule.onNodeWithTag(item2Title)
|
||||
.assertExists()
|
||||
.assert(hasText("Bank details"))
|
||||
composeTestRule.onNodeWithTag(item3Title)
|
||||
.assertExists()
|
||||
.assert(hasText("Identity verification"))
|
||||
composeTestRule.onNodeWithTag(divider0Title)
|
||||
.assertIsDisplayed()
|
||||
.assert(hasText("LOAN OFFER"))
|
||||
composeTestRule.onNodeWithTag(divider1Title)
|
||||
.assertExists()
|
||||
.assert(hasText("LOAN DISBURSAL"))
|
||||
composeTestRule.onNodeWithTag(item0SubTitle)
|
||||
.assertExists()
|
||||
.assert(hasText("Name & date of birth"))
|
||||
composeTestRule.onNodeWithTag(item1SubTitle)
|
||||
.assertExists()
|
||||
.assert(hasText("PAN, employment type & monthly income"))
|
||||
composeTestRule.onNodeWithTag(item2SubTitle)
|
||||
.assertExists()
|
||||
.assert(hasText("Bank account details"))
|
||||
composeTestRule.onNodeWithTag(item3SubTitle)
|
||||
.assertExists()
|
||||
.assert(hasText("Selfie & Video KYC with original PAN"))
|
||||
composeTestRule.onNodeWithTag(divider1Title).performScrollTo()
|
||||
composeTestRule.onNodeWithTag(divider1Title)
|
||||
.assertIsDisplayed()
|
||||
.assert(hasText("LOAN DISBURSAL"))
|
||||
}
|
||||
|
||||
@Test(timeout = 60000)
|
||||
fun verify_states_of_footer_widget_on_success() {
|
||||
mockWebServer.dispatcher = MockServerDispatcher().Response()
|
||||
|
||||
composeTestRule.mainClock.autoAdvance = false
|
||||
composeTestRule.mainClock.advanceTimeBy(10000)
|
||||
composeTestRule.mainClock.autoAdvance = true
|
||||
|
||||
val widgetId = "sfyMB"
|
||||
val privacyCheckBox =
|
||||
getTestTag(widgetId, "privacy_terms_checkbox", ComposeViewType.Checkbox)
|
||||
val nextCtaText = getTestTag(widgetId, "next_cta_button_text", ComposeViewType.Text)
|
||||
val nextCta = getTestTag(widgetId, "next_cta_button", ComposeViewType.Button)
|
||||
|
||||
composeTestRule.onNodeWithTag(nextCta, true)
|
||||
.assertIsDisplayed()
|
||||
.assertIsNotEnabled()
|
||||
composeTestRule.onNodeWithTag(nextCtaText, true)
|
||||
.assertIsDisplayed()
|
||||
.assert(hasText("Get started"))
|
||||
composeTestRule.onNodeWithTag(privacyCheckBox)
|
||||
.performClick()
|
||||
composeTestRule.waitForIdle()
|
||||
composeTestRule.onNodeWithTag(nextCta, true)
|
||||
.assertIsDisplayed()
|
||||
.assertIsEnabled()
|
||||
}
|
||||
|
||||
@Test(timeout = 60000)
|
||||
fun verify_error_state() {
|
||||
mockWebServer.dispatcher = MockServerDispatcher().Response(true)
|
||||
|
||||
composeTestRule.mainClock.autoAdvance = false
|
||||
composeTestRule.mainClock.advanceTimeBy(10000)
|
||||
composeTestRule.mainClock.autoAdvance = true
|
||||
|
||||
composeTestRule.onNodeWithText("Something went wrong!")
|
||||
.assertIsDisplayed()
|
||||
composeTestRule.onNodeWithText("We are facing a technical issue at this time. Please check after some time.")
|
||||
.assertIsDisplayed()
|
||||
composeTestRule.onNodeWithText("Retry", useUnmergedTree = true)
|
||||
.assertIsDisplayed()
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,28 +1,38 @@
|
||||
package com.navi.ap.util
|
||||
|
||||
import androidx.test.platform.app.InstrumentationRegistry
|
||||
import com.google.gson.JsonObject
|
||||
import com.google.gson.JsonParser
|
||||
import okhttp3.mockwebserver.Dispatcher
|
||||
import okhttp3.mockwebserver.MockResponse
|
||||
import okhttp3.mockwebserver.RecordedRequest
|
||||
import orFalse
|
||||
import java.io.InputStreamReader
|
||||
|
||||
class MockServerDispatcher {
|
||||
|
||||
internal inner class SampleResponse(
|
||||
private val jsonKey: String
|
||||
) : Dispatcher() {
|
||||
internal inner class Response(private val error: Boolean = false) : Dispatcher() {
|
||||
override fun dispatch(request: RecordedRequest): MockResponse {
|
||||
val dataString = getJsonContent("ap_test_mock.json")
|
||||
val jsonElement = (JsonParser.parseString(dataString) as? JsonObject)?.get(jsonKey)
|
||||
|
||||
val getPagePattern = "/arc-warden/api/v2/application/[^/]+/screen".toRegex()
|
||||
|
||||
val jsonElement = (JsonParser.parseString(dataString) as? JsonObject)?.get(
|
||||
if (request.path?.contains("/arc-warden/api/v3/application").orFalse()) {
|
||||
"createApplication"
|
||||
} else if (getPagePattern.matches(request.path.orEmpty())) {
|
||||
"introPage"
|
||||
} else {
|
||||
""
|
||||
}
|
||||
)
|
||||
|
||||
return MockResponse()
|
||||
.setResponseCode(200)
|
||||
.setBody(jsonElement.toString())
|
||||
.setResponseCode(if (error) 404 else 200)
|
||||
.setBody(if (error) "" else jsonElement.toString())
|
||||
}
|
||||
}
|
||||
|
||||
private fun getJsonContent(fileName: String): String {
|
||||
fun getJsonContent(fileName: String): String {
|
||||
return InputStreamReader(this.javaClass.classLoader!!.getResourceAsStream(fileName)).use { it.readText() }
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.navi.ap.util
|
||||
|
||||
import com.navi.ap.common.repository.ApplicationPlatformRepository
|
||||
import com.navi.uitron.model.ui.ComposeViewType
|
||||
|
||||
object TestUtil {
|
||||
|
||||
@@ -10,7 +11,7 @@ object TestUtil {
|
||||
}
|
||||
}
|
||||
|
||||
fun getTestTag(widgetId: String, layoutId: String, viewType: String) =
|
||||
viewType + "_" + layoutId + "_" + widgetId
|
||||
fun getTestTag(widgetId: String, layoutId: String, viewType: ComposeViewType) =
|
||||
viewType.name + "_" + layoutId + "_" + widgetId
|
||||
|
||||
}
|
||||
32
app/src/androidTest/java/com/naviapp/TestUtil.kt
Normal file
32
app/src/androidTest/java/com/naviapp/TestUtil.kt
Normal file
@@ -0,0 +1,32 @@
|
||||
package com.naviapp
|
||||
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
||||
import androidx.activity.ComponentActivity
|
||||
import androidx.compose.ui.test.junit4.AndroidComposeTestRule
|
||||
import androidx.test.core.app.ApplicationProvider
|
||||
import androidx.test.ext.junit.rules.ActivityScenarioRule
|
||||
|
||||
object TestUtil {
|
||||
|
||||
inline fun <A : ComponentActivity>
|
||||
createAndroidIntentComposeRule(intentFactory: (context: Context) -> Intent):
|
||||
AndroidComposeTestRule<ActivityScenarioRule<A>, A> {
|
||||
val context = ApplicationProvider.getApplicationContext<Context>()
|
||||
val intent = intentFactory(context)
|
||||
|
||||
return AndroidComposeTestRule(
|
||||
activityRule = ActivityScenarioRule(intent),
|
||||
activityProvider = { scenarioRule -> scenarioRule.getActivity() }
|
||||
)
|
||||
}
|
||||
|
||||
fun <A : ComponentActivity> ActivityScenarioRule<A>.getActivity(): A {
|
||||
var activity: A? = null
|
||||
|
||||
scenario.onActivity { activity = it }
|
||||
|
||||
return activity
|
||||
?: throw IllegalStateException("Activity was not set in the ActivityScenarioRule!")
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
27
app/src/uitest/AndroidManifest.xml
Normal file
27
app/src/uitest/AndroidManifest.xml
Normal file
@@ -0,0 +1,27 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<!--
|
||||
~
|
||||
~ * Copyright © 2023 by Navi Technologies Limited
|
||||
~ * All rights reserved. Strictly confidential
|
||||
~
|
||||
-->
|
||||
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
|
||||
<application
|
||||
android:networkSecurityConfig="@xml/network_security_config"
|
||||
tools:ignore="MissingApplicationIcon"
|
||||
tools:targetApi="n" >
|
||||
|
||||
<activity
|
||||
android:name=".releaselog.activity.ReleaseLogActivity"
|
||||
android:exported="false"
|
||||
android:screenOrientation="portrait"
|
||||
android:windowSoftInputMode="adjustResize"
|
||||
android:theme="@style/BaseThemeStyle" />
|
||||
|
||||
</application>
|
||||
|
||||
</manifest>
|
||||
83
app/src/uitest/google-services.json
Normal file
83
app/src/uitest/google-services.json
Normal file
@@ -0,0 +1,83 @@
|
||||
{
|
||||
"project_info": {
|
||||
"project_number": "679085041776",
|
||||
"firebase_url": "https://navi-qa-default-rtdb.asia-southeast1.firebasedatabase.app",
|
||||
"project_id": "navi-qa",
|
||||
"storage_bucket": "navi-qa.appspot.com"
|
||||
},
|
||||
"client": [
|
||||
{
|
||||
"client_info": {
|
||||
"mobilesdk_app_id": "1:679085041776:android:a1be795c0b472af6546cb5",
|
||||
"android_client_info": {
|
||||
"package_name": "com.naviapp.dev"
|
||||
}
|
||||
},
|
||||
"oauth_client": [
|
||||
{
|
||||
"client_id": "679085041776-433aj023nobf5g9u08ggpqfhg4q9flm1.apps.googleusercontent.com",
|
||||
"client_type": 3
|
||||
}
|
||||
],
|
||||
"api_key": [
|
||||
{
|
||||
"current_key": "AIzaSyDNSiKfkive7IietLqcsnoNLVER3OvHwrc"
|
||||
}
|
||||
],
|
||||
"services": {
|
||||
"appinvite_service": {
|
||||
"other_platform_oauth_client": [
|
||||
{
|
||||
"client_id": "679085041776-433aj023nobf5g9u08ggpqfhg4q9flm1.apps.googleusercontent.com",
|
||||
"client_type": 3
|
||||
},
|
||||
{
|
||||
"client_id": "679085041776-5e456o4prchtmblcl6r2vs7nrtuo5tvc.apps.googleusercontent.com",
|
||||
"client_type": 2,
|
||||
"ios_info": {
|
||||
"bundle_id": "com.gonavi.app.debug"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"client_info": {
|
||||
"mobilesdk_app_id": "1:679085041776:android:e2fdb172f0bd6df6546cb5",
|
||||
"android_client_info": {
|
||||
"package_name": "com.naviapp.fps.dev"
|
||||
}
|
||||
},
|
||||
"oauth_client": [
|
||||
{
|
||||
"client_id": "679085041776-433aj023nobf5g9u08ggpqfhg4q9flm1.apps.googleusercontent.com",
|
||||
"client_type": 3
|
||||
}
|
||||
],
|
||||
"api_key": [
|
||||
{
|
||||
"current_key": "AIzaSyDNSiKfkive7IietLqcsnoNLVER3OvHwrc"
|
||||
}
|
||||
],
|
||||
"services": {
|
||||
"appinvite_service": {
|
||||
"other_platform_oauth_client": [
|
||||
{
|
||||
"client_id": "679085041776-433aj023nobf5g9u08ggpqfhg4q9flm1.apps.googleusercontent.com",
|
||||
"client_type": 3
|
||||
},
|
||||
{
|
||||
"client_id": "679085041776-5e456o4prchtmblcl6r2vs7nrtuo5tvc.apps.googleusercontent.com",
|
||||
"client_type": 2,
|
||||
"ios_info": {
|
||||
"bundle_id": "com.gonavi.app.debug"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"configuration_version": "1"
|
||||
}
|
||||
10
app/src/uitest/res/values/strings.xml
Normal file
10
app/src/uitest/res/values/strings.xml
Normal file
@@ -0,0 +1,10 @@
|
||||
<!--
|
||||
~
|
||||
~ * Copyright © 2023 by Navi Technologies Limited
|
||||
~ * All rights reserved. Strictly confidential
|
||||
~
|
||||
-->
|
||||
|
||||
<resources>
|
||||
<string name="app_name">Navi Ui Test</string>
|
||||
</resources>
|
||||
20
app/src/uitest/res/xml/network_security_config.xml
Normal file
20
app/src/uitest/res/xml/network_security_config.xml
Normal file
@@ -0,0 +1,20 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<!--
|
||||
~
|
||||
~ * Copyright © 2023 by Navi Technologies Limited
|
||||
~ * All rights reserved. Strictly confidential
|
||||
~
|
||||
-->
|
||||
|
||||
<network-security-config>
|
||||
<debug-overrides>
|
||||
<trust-anchors>
|
||||
<certificates src="system" />
|
||||
<certificates src="user" overridePins="true" />
|
||||
</trust-anchors>
|
||||
</debug-overrides>
|
||||
<domain-config cleartextTrafficPermitted="true">
|
||||
<domain includeSubdomains="true">localhost</domain>
|
||||
</domain-config>
|
||||
</network-security-config>
|
||||
@@ -230,6 +230,7 @@ chucker-library = { module = "com.github.chuckerteam.chucker:library", version.r
|
||||
chucker-libraryNoOp = { module = "com.github.chuckerteam.chucker:library-no-op", version.ref = "chucker" }
|
||||
|
||||
coil-compose = { module = "io.coil-kt:coil-compose", version.ref = "coil" }
|
||||
coil-test = { module = "io.coil-kt:coil-test", version.ref = "coil" }
|
||||
coil-video = { module = "io.coil-kt:coil-video", version.ref = "coil" }
|
||||
dagger-hiltAndroid = { module = "com.google.dagger:hilt-android", version.ref = "hilt" }
|
||||
dagger-hiltAndroidCompiler = { module = "com.google.dagger:hilt-android-compiler", version.ref = "hilt" }
|
||||
|
||||
39
navi-amc/src/uitest/google-services.json
Normal file
39
navi-amc/src/uitest/google-services.json
Normal file
@@ -0,0 +1,39 @@
|
||||
{
|
||||
"project_info": {
|
||||
"project_number": "300703280413",
|
||||
"project_id": "navi-amc-dev",
|
||||
"storage_bucket": "navi-amc-dev.appspot.com"
|
||||
},
|
||||
"client": [
|
||||
{
|
||||
"client_info": {
|
||||
"mobilesdk_app_id": "1:300703280413:android:17deaf30833edca42b45f4",
|
||||
"android_client_info": {
|
||||
"package_name": "com.navi.amc.dev"
|
||||
}
|
||||
},
|
||||
"oauth_client": [
|
||||
{
|
||||
"client_id": "300703280413-71sairfmacs5hphfstkr4uehj4v4vvjn.apps.googleusercontent.com",
|
||||
"client_type": 3
|
||||
}
|
||||
],
|
||||
"api_key": [
|
||||
{
|
||||
"current_key": "AIzaSyDKPVPj-cR5wq8Uc0ZMylnwAFFYppEJqyo"
|
||||
}
|
||||
],
|
||||
"services": {
|
||||
"appinvite_service": {
|
||||
"other_platform_oauth_client": [
|
||||
{
|
||||
"client_id": "300703280413-71sairfmacs5hphfstkr4uehj4v4vvjn.apps.googleusercontent.com",
|
||||
"client_type": 3
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"configuration_version": "1"
|
||||
}
|
||||
@@ -52,6 +52,14 @@ android {
|
||||
GOOGLE_MAPS_KEY: "AIzaSyD-7-YhOAzX4VJfVLsHUz8KEn-1MGJq46o"
|
||||
]
|
||||
}
|
||||
uitest {
|
||||
dimension "app"
|
||||
buildConfigField 'String', 'GI_RAZORPAY_KEY', formatString('rzp_test_vBmFshr0H06Hoe')
|
||||
buildConfigField 'String', 'GOOGLE_MAPS_KEY', formatString("AIzaSyD-7-YhOAzX4VJfVLsHUz8KEn-1MGJq46o")
|
||||
manifestPlaceholders = [
|
||||
GOOGLE_MAPS_KEY: "AIzaSyD-7-YhOAzX4VJfVLsHUz8KEn-1MGJq46o"
|
||||
]
|
||||
}
|
||||
dev {
|
||||
dimension "app"
|
||||
buildConfigField 'String', 'GI_RAZORPAY_KEY', formatString('rzp_test_vBmFshr0H06Hoe')
|
||||
|
||||
@@ -55,6 +55,9 @@ android {
|
||||
isDefault true
|
||||
dimension "app"
|
||||
}
|
||||
uitest {
|
||||
dimension "app"
|
||||
}
|
||||
dev {
|
||||
dimension "app"
|
||||
}
|
||||
@@ -68,6 +71,7 @@ dependencies {
|
||||
implementation project(":navi-common")
|
||||
devImplementation project(path: ':npci-upi-cl', configuration: 'uat')
|
||||
qaImplementation project(path: ':npci-upi-cl', configuration: 'uat')
|
||||
uitestImplementation project(path: ':npci-upi-cl', configuration: 'uat')
|
||||
prodImplementation project(path: ':npci-upi-cl', configuration: 'prod')
|
||||
|
||||
implementation libs.accompanist.pager
|
||||
|
||||
@@ -52,6 +52,9 @@ android {
|
||||
dev {
|
||||
dimension "app"
|
||||
}
|
||||
uitest {
|
||||
dimension "app"
|
||||
}
|
||||
prod {
|
||||
dimension "app"
|
||||
}
|
||||
|
||||
@@ -44,6 +44,9 @@ android {
|
||||
isDefault true
|
||||
dimension "app"
|
||||
}
|
||||
uitest {
|
||||
dimension "app"
|
||||
}
|
||||
dev {
|
||||
dimension "app"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user