Skip to content

Commit

Permalink
fixes for redfin Pixel 5e
Browse files Browse the repository at this point in the history
  • Loading branch information
jan-goral committed Apr 8, 2021
1 parent c3dc645 commit 43dfc01
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,13 @@ private object Text {
}

private object Res {
const val tabLayout = "com.futuremark.dmandroid.application:id/flm_tab_layout_benchmarks"
const val centerLayout = "com.futuremark.dmandroid.application:id/flm_pager_benchmarks"
const val centerLayoutChild = "com.futuremark.dmandroid.application:id/flm_cl_root"
const val btnSkip = "com.futuremark.dmandroid.application:id/flm_bt_tutorial_skip"
const val fabBenchmark = "com.futuremark.dmandroid.application:id/flm_fab_benchmark"
const val fabSettings = "com.futuremark.dmandroid.application:id/flm_fab_settings"
const val scoreDetails = "com.futuremark.dmandroid.application:id/flm_ll_score_details_container"
const val scoreDetails =
"com.futuremark.dmandroid.application:id/flm_ll_score_details_container"
}


Expand Down Expand Up @@ -76,15 +78,22 @@ class Run3DMark {
}

waitForIdle(5000)

if (findObject(UiSelector().text(Text.benchmarkType)).exists().not()) {
findObject(UiSelector().resourceId(Res.tabLayout)).swipeLeft(10)
waitForIdle(1000)
Thread.sleep(2000)

// Swipe to the sling shot benchmark if needed
var swipeCount = 0
while (findObject(UiSelector().text(Text.benchmarkType)).exists().not()) {
findObject(UiSelector().resourceId(Res.centerLayoutChild)).apply {
with(visibleBounds) { swipe(right - 80, centerY(), left + 10, centerY(), 10) }
}
waitForIdle(2000)
Thread.sleep(1500)
if (swipeCount++ >= 4) Assert.fail("Max swipe count exceeded")
}
waitForIdle(2000)

// Choose proper benchmark screen
findObject(UiSelector().text(Text.benchmarkType)).click()
// click(318, 104)

waitForIdle(5000)

Expand Down
14 changes: 14 additions & 0 deletions test_runner/src/test/kotlin/ftl/fixtures/benchmark-redfin.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
gcloud:
app: "./src/test/kotlin/ftl/fixtures/tmp/apk/app-debug.apk"
test: "./src/test/kotlin/ftl/fixtures/tmp/apk/benchmark/benchmark-debug-androidTest.apk"
use-orchestrator: false
directories-to-pull:
- "/sdcard/Android/data/com.futuremark.dmandroid.application/files/3DMarkAndroid/"
additional-apks:
- "./src/test/kotlin/ftl/fixtures/tmp/apk/benchmark/3dmarkandroid-v2-1-4726.apk"
device:
- model: redfin
version: 30
locale: en
orientation: portrait
record-video: true

0 comments on commit 43dfc01

Please sign in to comment.