diff --git a/screenshots/gplay/debug/com.nextcloud.client.SettingsActivityIT_open.png b/screenshots/gplay/debug/com.nextcloud.client.SettingsActivityIT_open.png index 4c006d2b0f..2cc4bc9cec 100644 Binary files a/screenshots/gplay/debug/com.nextcloud.client.SettingsActivityIT_open.png and b/screenshots/gplay/debug/com.nextcloud.client.SettingsActivityIT_open.png differ diff --git a/scripts/androidScreenshotTest b/scripts/androidScreenshotTest new file mode 100755 index 0000000000..4cb2ef515f --- /dev/null +++ b/scripts/androidScreenshotTest @@ -0,0 +1,35 @@ +#!/bin/bash + +if [ $# -lt 2 ]; then + echo "1: record: true/false +2: class name +3: method name" + + exit +fi + +sed -i s'#false#true#'g src/main/res/values/setup.xml + +emulator -writable-system -avd uiComparison -no-snapshot -gpu swiftshader_indirect -no-audio -skin 500x833 & + +cd src/androidTest/java + +class=$(find | grep $2 | grep java | head -n1|sed s'/\//\./'g | sed s'#^\.\.##' | sed s'#\.java##') + +cd ../../../ + +if [ $1 == "true" ] ; then + record="-Precord" +else + record="" +fi + +if [ -e $3 ] ; then + method="" +else + method="#$3" +fi + +./gradlew gplayDebugExecuteScreenshotTests $record -Pandroid.testInstrumentationRunnerArguments.class=$class$method + +sed -i s'#true#false#'g src/main/res/values/setup.xml