Skip to content

Commit

Permalink
feat(ci): fix ui tests for firebase
Browse files Browse the repository at this point in the history
  • Loading branch information
Vacxe committed Jul 11, 2023
1 parent 987ccfe commit b23cddf
Show file tree
Hide file tree
Showing 4 changed files with 109 additions and 121 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ jobs:
strategy:
fail-fast: false
matrix:
api: [ 26, 27, 28, 29, 30, 32, 33 ]
api: [ 26, 27, 28, 29, 30, 31, 32, 33 ]
steps:
- uses: actions/checkout@v1
- name: Download APKs
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ class TestActivityTest {
}

textViewLarge {
scrollTo()
click()
isVisible()
hasText("LARGE")
Expand All @@ -41,7 +40,6 @@ class TestActivityTest {
}

textViewSmall {
scrollTo()
isVisible()
hasText("small")
isCompletelyBelow {
Expand All @@ -50,13 +48,11 @@ class TestActivityTest {
}

textViewHint {
scrollTo()
isVisible()
hasHint("hint")
}

buttonViewLeft {
scrollTo()
isVisible()
hasText("left")
isCompletelyLeftOf {
Expand All @@ -65,7 +61,6 @@ class TestActivityTest {
}

buttonViewRight {
scrollTo()
isVisible()
hasText("right")
isCompletelyRightOf {
Expand All @@ -74,7 +69,6 @@ class TestActivityTest {
}

textViewSmall {
scrollTo()
isVisible()
hasText("small")
isCompletelyBelow {
Expand All @@ -83,46 +77,38 @@ class TestActivityTest {
}

textViewColored {
scrollTo()
hasTextColor(R.color.background_color)
}

map {
scrollTo()
click()
hasAnyTag("test_tag", "non_test_tag")
}

multiTypeRecycler {
scrollTo()
hasText("MULTI TYPE RECYCLER")
}

singleTypeRecycler {
scrollTo()
hasText("SINGLE TYPE RECYCLER")
}

autoComplete {
scrollTo()
hasText("AUTO_COMPLETE")
}

ratingbar {
scrollTo()
hasRating(0f)
setRatingAt(3f)
hasRating(3f)
}

snackbarButton {
scrollTo()
click()
}

snackbar {
isDisplayed()

text { hasText("This is snackbar!") }
action {
hasText("DISMISS")
Expand All @@ -134,14 +120,12 @@ class TestActivityTest {
}

seekbar {
scrollTo()
hasProgress(70)
dragProgressTo(30)
hasProgress(30)
}

switch {
scrollTo()
isChecked()
click()
isNotChecked()
Expand All @@ -156,7 +140,6 @@ class TestActivityTest {
}

switchCompat {
scrollTo()
isChecked()
click()
isNotChecked()
Expand All @@ -175,7 +158,6 @@ class TestActivityTest {
}

searchView {
scrollTo()
hasHint("This is the HINT!")
hasHint(R.string.hint)
typeQuery("Hello")
Expand Down
5 changes: 5 additions & 0 deletions sample/src/main/res/layout/activity_alert_dialog.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@
android:layout_height="match_parent"
android:orientation="vertical">

<!--Firebase API 29 emulator showing "Device is managed by your organization pop-up and overlapping buttons"-->
<View
android:layout_width="match_parent"
android:layout_height="100dp" />

<Button
android:id="@+id/show_alert_dialog"
android:layout_width="match_parent"
Expand Down
Loading

0 comments on commit b23cddf

Please sign in to comment.