-
Notifications
You must be signed in to change notification settings - Fork 159
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into TECH-Screenshot-comparison
- Loading branch information
Showing
20 changed files
with
241 additions
and
17 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
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 |
---|---|---|
|
@@ -11,7 +11,7 @@ configure<BaseExtension> { | |
} | ||
|
||
defaultConfig { | ||
minSdk = 18 | ||
minSdk = 21 | ||
targetSdk = 30 | ||
} | ||
|
||
|
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
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
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
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 |
---|---|---|
|
@@ -29,6 +29,8 @@ interface Permissions { | |
ALLOW, | ||
ALLOW_ALWAYS, | ||
ALLOW_FOREGROUND, | ||
ALLOW_ALL, | ||
ALLOW_SELECTED, | ||
DENY | ||
} | ||
} |
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
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
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
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
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
27 changes: 27 additions & 0 deletions
27
...idTest/java/com/kaspersky/kaspresso/kautomatorsample/kaspresso/sanity/HintMatchersTest.kt
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,27 @@ | ||
package com.kaspersky.kaspresso.kautomatorsample.kaspresso.sanity | ||
|
||
import android.os.Build | ||
import androidx.test.ext.junit.rules.activityScenarioRule | ||
import com.kaspersky.kaspresso.kautomatorsample.ComponentsActivity | ||
import com.kaspersky.kaspresso.kautomatorsample.screen.ComponentsScreen | ||
import com.kaspersky.kaspresso.testcases.api.testcase.TestCase | ||
import org.junit.Assume | ||
import org.junit.Rule | ||
import org.junit.Test | ||
|
||
class HintMatchersTest : TestCase() { | ||
|
||
@get:Rule | ||
val activityRule = activityScenarioRule<ComponentsActivity>() | ||
|
||
@Test | ||
fun test() = run { | ||
Assume.assumeTrue("Hint matchers are available on API 26+", Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) | ||
|
||
ComponentsScreen { | ||
editTextByHintResId { isDisplayed() } | ||
editTextByHintText { isDisplayed() } | ||
editTextByHintPattern { isDisplayed() } | ||
} | ||
} | ||
} |
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
21 changes: 21 additions & 0 deletions
21
...rc/androidTest/java/com/kaspersky/kaspresso/kautomatorsample/screen/ParentSearchScreen.kt
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,21 @@ | ||
package com.kaspersky.kaspresso.kautomatorsample.screen | ||
|
||
import com.kaspersky.components.kautomator.component.text.UiTextView | ||
import com.kaspersky.components.kautomator.screen.UiScreen | ||
import com.kaspersky.kaspresso.kautomatorsample.R | ||
|
||
object ParentSearchScreen : UiScreen<ParentSearchScreen>() { | ||
override val packageName = "com.kaspersky.kaspresso.kautomatorsample" | ||
|
||
val textByParentId = UiTextView { | ||
isFocusable() | ||
withParent { withId(R.id.container1) } | ||
} | ||
|
||
val textByParentChild = UiTextView { | ||
isFocusable() | ||
withParent { | ||
withChild { withId(R.id.title2) } | ||
} | ||
} | ||
} |
28 changes: 28 additions & 0 deletions
28
...le/src/androidTest/java/com/kaspersky/kaspresso/kautomatorsample/test/ParentSearchTest.kt
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,28 @@ | ||
package com.kaspersky.kaspresso.kautomatorsample.test | ||
|
||
import androidx.test.ext.junit.rules.activityScenarioRule | ||
import com.kaspersky.kaspresso.kautomatorsample.ParentSearchActivity | ||
import com.kaspersky.kaspresso.kautomatorsample.screen.ParentSearchScreen | ||
import com.kaspersky.kaspresso.testcases.api.testcase.TestCase | ||
import org.junit.Rule | ||
import org.junit.Test | ||
import com.kaspersky.kaspresso.kautomatorsample.R | ||
|
||
class ParentSearchTest : TestCase() { | ||
@get:Rule | ||
val activityRule = activityScenarioRule<ParentSearchActivity>() | ||
|
||
@Test | ||
fun test() = run { | ||
ParentSearchScreen { | ||
textByParentId { | ||
val text1 = device.targetContext.resources.getString(R.string.parent_search_value1) | ||
hasText(text1) | ||
} | ||
textByParentChild { | ||
val text2 = device.targetContext.resources.getString(R.string.parent_search_value2) | ||
hasText(text2) | ||
} | ||
} | ||
} | ||
} |
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
11 changes: 11 additions & 0 deletions
11
...tor-sample/src/main/java/com/kaspersky/kaspresso/kautomatorsample/ParentSearchActivity.kt
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,11 @@ | ||
package com.kaspersky.kaspresso.kautomatorsample | ||
|
||
import android.os.Bundle | ||
import androidx.appcompat.app.AppCompatActivity | ||
|
||
class ParentSearchActivity : AppCompatActivity() { | ||
override fun onCreate(savedInstanceState: Bundle?) { | ||
super.onCreate(savedInstanceState) | ||
setContentView(R.layout.activity_parent_search) | ||
} | ||
} |
Oops, something went wrong.