Skip to content

Commit

Permalink
Uplift Kakao deps to 3.0.0 with new groupId
Browse files Browse the repository at this point in the history
  • Loading branch information
Vacxe committed May 29, 2021
1 parent 11e907a commit 8b5ef87
Show file tree
Hide file tree
Showing 29 changed files with 51 additions and 51 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ And many more!

### Readability

We like the syntax that [Kakao](https://github.com/agoda-com/Kakao) applies to write UI tests. This wrapper over Espresso uses the Kotlin DSL approach, that makes the code significantly shorter and more readable. See the difference:
We like the syntax that [Kakao](https://github.com/KakaoCup/Kakao) applies to write UI tests. This wrapper over Espresso uses the Kotlin DSL approach, that makes the code significantly shorter and more readable. See the difference:

**Espresso**:
```kotlin
Expand Down
4 changes: 2 additions & 2 deletions buildSrc/src/main/kotlin/Dependencies.kt
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ object Dependencies {
const val junit = "4.13"
const val testCore = "1.3.0"
const val espresso = "3.3.0"
const val kakao = "2.4.0"
const val kakao = "3.0.0"
const val uiAutomator = "2.2.0"

const val truth = "1.0"
Expand Down Expand Up @@ -76,7 +76,7 @@ object Dependencies {

const val espressoCore = "androidx.test.espresso:espresso-core:${Versions.espresso}"
const val espressoWeb = "androidx.test.espresso:espresso-web:${Versions.espresso}"
const val kakao = "com.agoda.kakao:kakao:${Versions.kakao}"
const val kakao = "io.github.kakaocup:kakao:${Versions.kakao}"

const val uiAutomator = "androidx.test.uiautomator:uiautomator:${Versions.uiAutomator}"
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.kaspersky.kaspresso.autoscroll

import androidx.test.espresso.ViewInteraction
import com.agoda.kakao.common.actions.NestedScrollToAction
import io.github.kakaocup.kakao.common.actions.NestedScrollToAction
import com.kaspersky.kaspresso.internal.extensions.other.isAllowed
import com.kaspersky.kaspresso.logger.UiTestLogger
import com.kaspersky.kaspresso.params.AutoScrollParams
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ package com.kaspersky.kaspresso.compose
import androidx.test.espresso.ViewAction
import androidx.test.espresso.ViewAssertion
import androidx.test.espresso.ViewInteraction
import com.agoda.kakao.common.actions.BaseActions
import com.agoda.kakao.common.assertions.BaseAssertions
import com.agoda.kakao.intercept.Interceptable
import io.github.kakaocup.kakao.common.actions.BaseActions
import io.github.kakaocup.kakao.common.assertions.BaseAssertions
import io.github.kakaocup.kakao.intercept.Interceptable
import com.kaspersky.components.kautomator.component.common.actions.UiBaseActions
import com.kaspersky.components.kautomator.component.common.assertions.UiBaseAssertions
import com.kaspersky.components.kautomator.intercept.base.UiInterceptable
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ package com.kaspersky.kaspresso.compose
import androidx.test.espresso.ViewAction
import androidx.test.espresso.ViewAssertion
import androidx.test.espresso.ViewInteraction
import com.agoda.kakao.common.actions.BaseActions
import com.agoda.kakao.common.assertions.BaseAssertions
import com.agoda.kakao.intercept.Interceptable
import io.github.kakaocup.kakao.common.actions.BaseActions
import io.github.kakaocup.kakao.common.assertions.BaseAssertions
import io.github.kakaocup.kakao.intercept.Interceptable
import com.kaspersky.components.kautomator.component.common.actions.UiBaseActions
import com.kaspersky.components.kautomator.component.common.assertions.UiBaseAssertions
import com.kaspersky.components.kautomator.intercept.base.UiInterceptable
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.kaspersky.kaspresso.compose

import com.agoda.kakao.web.WebElementBuilder
import io.github.kakaocup.kakao.web.WebElementBuilder
import com.kaspersky.kaspresso.compose.pack.ActionsOnWebElementsPack
import com.kaspersky.kaspresso.compose.pack.ActionsPack

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.kaspersky.kaspresso.compose

import com.agoda.kakao.web.WebElementBuilder
import io.github.kakaocup.kakao.web.WebElementBuilder
import com.kaspersky.kaspresso.compose.pack.ActionsOnWebElementsPack
import com.kaspersky.kaspresso.compose.pack.ActionsPack
import com.kaspersky.kaspresso.kaspresso.Kaspresso
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ package com.kaspersky.kaspresso.compose.pack
import androidx.test.espresso.ViewAction
import androidx.test.espresso.ViewAssertion
import androidx.test.espresso.ViewInteraction
import com.agoda.kakao.common.actions.BaseActions
import com.agoda.kakao.common.assertions.BaseAssertions
import com.agoda.kakao.intercept.Interceptable
import io.github.kakaocup.kakao.common.actions.BaseActions
import io.github.kakaocup.kakao.common.assertions.BaseAssertions
import io.github.kakaocup.kakao.intercept.Interceptable
import com.kaspersky.components.kautomator.component.common.actions.UiBaseActions
import com.kaspersky.components.kautomator.component.common.assertions.UiBaseAssertions
import com.kaspersky.components.kautomator.intercept.base.UiInterceptable
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.kaspersky.kaspresso.compose.pack

import androidx.test.espresso.web.webdriver.Locator
import com.agoda.kakao.web.WebElementBuilder
import io.github.kakaocup.kakao.web.WebElementBuilder
import com.kaspersky.kaspresso.compose.pack.branch.ComplexComposeBranch
import com.kaspersky.kaspresso.compose.pack.branch.ComplexComposeBranchBuilder
import kotlin.properties.Delegates
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.kaspersky.kaspresso.interceptors.tolibrary

import com.agoda.kakao.Kakao
import io.github.kakaocup.kakao.Kakao
import com.kaspersky.components.kautomator.KautomatorConfigurator
import com.kaspersky.kaspresso.interceptors.behavior.DataBehaviorInterceptor
import com.kaspersky.kaspresso.interceptors.behavior.ViewBehaviorInterceptor
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import androidx.test.espresso.FailureHandler
import androidx.test.platform.app.InstrumentationRegistry
import androidx.test.uiautomator.Configurator
import androidx.test.uiautomator.UiDevice
import com.agoda.kakao.Kakao
import io.github.kakaocup.kakao.Kakao
import com.kaspersky.adbserver.common.log.logger.LogLevel
import com.kaspersky.components.kautomator.intercept.interaction.UiDeviceInteraction
import com.kaspersky.components.kautomator.intercept.interaction.UiObjectInteraction
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.kaspersky.kaspresso.screens

import com.agoda.kakao.screen.Screen
import io.github.kakaocup.kakao.screen.Screen

abstract class KScreen<out T : KScreen<T>> : Screen<T>() {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import android.os.Bundle
import android.os.Looper
import androidx.test.rule.ActivityTestRule
import androidx.test.rule.GrantPermissionRule
import com.agoda.kakao.screen.Screen
import io.github.kakaocup.kakao.screen.Screen
import com.kaspersky.kaspressample.MainActivity
import com.kaspersky.kaspresso.testcases.api.testcase.TestCase
import org.junit.Assert.assertEquals
Expand Down Expand Up @@ -101,4 +101,4 @@ class DeviceLocationSampleTest : TestCase() {
}
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import android.provider.CallLog
import android.provider.Telephony
import androidx.test.rule.ActivityTestRule
import androidx.test.rule.GrantPermissionRule
import com.agoda.kakao.screen.Screen
import io.github.kakaocup.kakao.screen.Screen
import com.kaspersky.kaspressample.device.DeviceSampleActivity
import com.kaspersky.kaspresso.testcases.api.testcase.TestCase
import com.kaspersky.kaspresso.testcases.core.testcontext.BaseTestContext
Expand Down Expand Up @@ -98,4 +98,4 @@ class DevicePhoneSampleTest : TestCase() {
}

private data class SmsInfo(val address: String, val message: String)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package com.kaspersky.kaspressample.docloc_tests
import android.Manifest
import androidx.test.rule.ActivityTestRule
import androidx.test.rule.GrantPermissionRule
import com.agoda.kakao.screen.Screen
import io.github.kakaocup.kakao.screen.Screen
import com.kaspersky.kaspressample.screen.SimpleScreen
import com.kaspersky.kaspressample.simple.SimpleActivity
import com.kaspersky.kaspresso.annotations.ScreenShooterTest
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package com.kaspersky.kaspressample.docloc_tests.cutomdirectory
import android.Manifest
import androidx.test.rule.ActivityTestRule
import androidx.test.rule.GrantPermissionRule
import com.agoda.kakao.screen.Screen
import io.github.kakaocup.kakao.screen.Screen
import com.kaspersky.kaspressample.screen.SimpleScreen
import com.kaspersky.kaspressample.simple.SimpleActivity
import com.kaspersky.kaspresso.annotations.ScreenShooterTest
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.kaspersky.kaspressample.screen

import com.agoda.kakao.scroll.KScrollView
import com.agoda.kakao.text.KButton
import io.github.kakaocup.kakao.scroll.KScrollView
import io.github.kakaocup.kakao.text.KButton
import com.kaspersky.kaspressample.R
import com.kaspersky.kaspressample.flaky.CommonFlakyActivity
import com.kaspersky.kaspresso.screens.KScreen
Expand All @@ -18,4 +18,4 @@ object CommonFlakyScreen : KScreen<CommonFlakyScreen>() {
val btn5 = KButton { withId(R.id.scroll_view_btn5) }

val tv6 = KButton { withId(R.id.scroll_view_tv6) }
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.kaspersky.kaspressample.screen

import com.agoda.kakao.text.KButton
import io.github.kakaocup.kakao.text.KButton
import com.kaspersky.kaspressample.R
import com.kaspersky.kaspressample.compose.ComplexComposeSampleActivity
import com.kaspersky.kaspresso.screens.KScreen
Expand All @@ -14,4 +14,4 @@ object ComplexComposeScreen : KScreen<ComplexComposeScreen>() {
val stage1Button = KButton { withId(R.id.activity_compose_stage_1) }
val stage2Button = KButton { withId(R.id.activity_compose_stage_2) }
val finishButton = KButton { withId(R.id.activity_compose_finish) }
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.kaspersky.kaspressample.screen

import com.agoda.kakao.text.KTextView
import io.github.kakaocup.kakao.text.KTextView
import com.kaspersky.kaspressample.R
import com.kaspersky.kaspresso.screens.KScreen

Expand All @@ -11,4 +11,4 @@ object ContinuouslyDialogScreen : KScreen<ContinuouslyDialogScreen>() {
val dialogTitle = KTextView {
withText(R.string.continuously_dialog_title)
}
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.kaspersky.kaspressample.screen

import com.agoda.kakao.text.KButton
import io.github.kakaocup.kakao.text.KButton
import com.kaspersky.kaspressample.R
import com.kaspersky.kaspressample.continuously.ContinuouslySampleActivity
import com.kaspersky.kaspresso.screens.KScreen
Expand All @@ -12,4 +12,4 @@ object ContinuouslyScreen : KScreen<ContinuouslyScreen>() {
val startButton = KButton {
withId(R.id.continuously_start_btn)
}
}
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.kaspersky.kaspressample.screen

import com.agoda.kakao.edit.KEditText
import com.agoda.kakao.text.KButton
import io.github.kakaocup.kakao.edit.KEditText
import io.github.kakaocup.kakao.text.KButton
import com.kaspersky.kaspressample.R
import com.kaspersky.kaspressample.device.DeviceSampleActivity
import com.kaspersky.kaspresso.screens.KScreen
Expand All @@ -14,4 +14,4 @@ object DeviceSampleScreen : KScreen<DeviceSampleScreen>() {
val input = KEditText { withId(R.id.input) }

val requestPermissionButton = KButton { withId(R.id.request_permission_button) }
}
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.kaspersky.kaspressample.screen

import com.agoda.kakao.text.KButton
import com.agoda.kakao.text.KTextView
import io.github.kakaocup.kakao.text.KButton
import io.github.kakaocup.kakao.text.KTextView
import com.kaspersky.kaspressample.MainActivity
import com.kaspersky.kaspressample.R
import com.kaspersky.kaspresso.screens.KScreen
Expand All @@ -24,4 +24,4 @@ object MainScreen : KScreen<MainScreen>() {
val idleWaitingButton = KButton { withId(R.id.activity_main_idlewaiting_sample_button) }

val descriptionText = KTextView { withId(R.id.activity_main_title) }
}
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.kaspersky.kaspressample.screen

import com.agoda.kakao.edit.KEditText
import com.agoda.kakao.text.KButton
import io.github.kakaocup.kakao.edit.KEditText
import io.github.kakaocup.kakao.text.KButton
import com.kaspersky.kaspressample.R
import com.kaspersky.kaspressample.simple.SimpleActivity
import com.kaspersky.kaspresso.screens.KScreen
Expand All @@ -16,4 +16,4 @@ object SimpleScreen : KScreen<SimpleScreen>() {
val button2 = KButton { withId(R.id.button_2) }

val edit = KEditText { withId(R.id.edit) }
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.kaspersky.kaspressample.screen

import com.agoda.kakao.web.KWebView
import io.github.kakaocup.kakao.web.KWebView
import com.kaspersky.kaspressample.R
import com.kaspersky.kaspressample.web.WebViewActivity
import com.kaspersky.kaspresso.screens.KScreen
Expand All @@ -13,4 +13,4 @@ object WebViewScreen : KScreen<WebViewScreen>() {
val webView = KWebView {
withId(R.id.webView)
}
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.kaspersky.kaspresso.tutorials.screen

import com.agoda.kakao.text.KButton
import io.github.kakaocup.kakao.text.KButton
import com.kaspersky.kaspresso.screens.KScreen
import com.kaspersky.kaspresso.tutorials.MainActivity
import com.kaspersky.kaspresso.tutorials.R
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.kaspersky.kaspresso.tutorials.screen

import com.agoda.kakao.edit.KEditText
import com.agoda.kakao.text.KButton
import io.github.kakaocup.kakao.edit.KEditText
import io.github.kakaocup.kakao.text.KButton
import com.kaspersky.kaspresso.screens.KScreen
import com.kaspersky.kaspresso.tutorials.R
import com.kaspersky.kaspresso.tutorials.simple.SimpleActivity
Expand Down
2 changes: 1 addition & 1 deletion wiki/01_Wrapper_over_Espresso.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Wrapper over Espresso

We use Kakao library as a wrapper over Espresso. <br>
All detailed information is [here](https://github.com/agoda-com/Kakao)
All detailed information is [here](https://github.com/KakaoCup/Kakao)
2 changes: 1 addition & 1 deletion wiki/02_Wrapper_over_UiAutomator.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Kautomator: wrapper over UI Automator

**Kautomator** - Nice and simple DSL for UI Automator in Kotlin that allows to accelerate UI Automator to amazing. <br>
Inspired by [Kakao](https://github.com/agoda-com/Kakao) and [russian talk about UI Automator](https://youtu.be/bqNguUHK3SM) (thanks to Svetlana Smelchakova).
Inspired by [Kakao](https://github.com/KakaoCup/Kakao) and [russian talk about UI Automator](https://youtu.be/bqNguUHK3SM) (thanks to Svetlana Smelchakova).

### Introduction
Tests written with UI Automator are so complex, non-readble and hard to maintain especially for testers.
Expand Down
2 changes: 1 addition & 1 deletion wiki/03_Kaspresso_configurator.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ It's accessible by ```testLogger``` property in test sections (```before, after,
Also, it is available while setting ```Kaspresso.Builder``` if you want to add it to your custom interceptors, for example.

#### Kaspresso interceptors based on Kakao/Kautomator Interceptors.
These interceptors were introduced to simplify and uniform using of [Kakao interceptors](https://github.com/agoda-com/Kakao#intercepting) and [Kautomator interceptors](./02_Wrapper_over_UiAutomator.md#intercepting).
These interceptors were introduced to simplify and uniform using of [Kakao interceptors](https://github.com/KakaoCup/Kakao#intercepting) and [Kautomator interceptors](./02_Wrapper_over_UiAutomator.md#intercepting).

_**Important moment**_ about a mixing of Kaspresso interceptors and Kakao/Kautomator interceptors. <br>
Kaspresso interceptors will not work if you set your custom Kakao interceptors by calling of ```Kakao.intercept``` method in the test or set your custom Kautomator interceptors by calling of ```Kautomator.intercept``` in the test. <br>
Expand Down

0 comments on commit 8b5ef87

Please sign in to comment.