Skip to content

Commit afad56a

Browse files
committed
Update test screenshots; automatically fetch
1 parent ece1b93 commit afad56a

File tree

5 files changed

+5
-18
lines changed

5 files changed

+5
-18
lines changed

build.sh

Lines changed: 4 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,9 @@ android_test() {
133133
log_error "Some $size instrumented tests failed."
134134
log_error "Saving logcat: $OUT_LOGCAT..."
135135
$ADB logcat -d > $OUT_LOGCAT
136+
log_error "Fetching test screenshots..."
137+
$ADB pull /sdcard/Android/data/${PACKAGE_NAME}/files/test-screenshots ${ANDROID_OUTPUTS_DIR}/
138+
$ADB shell rm -r /sdcard/Android/data/${PACKAGE_NAME}/files/test-screenshots/
136139
return 1
137140
fi
138141
log_info "$size tests passed."
@@ -198,13 +201,6 @@ android_build() {
198201
return 0
199202
}
200203

201-
android_fetch_images() {
202-
log_info "Fetching images"
203-
rm -rf ${ANDROID_OUTPUTS_DIR}/test-screenshots
204-
$ADB pull /sdcard/Android/data/${PACKAGE_NAME}/files/test-screenshots ${ANDROID_OUTPUTS_DIR}/
205-
$ADB shell rm -r /sdcard/Android/data/${PACKAGE_NAME}/files/test-screenshots/
206-
}
207-
208204
android_accept_images() {
209205
find ${ANDROID_OUTPUTS_DIR}/test-screenshots -name '*.expected*' -delete
210206
rsync -av ${ANDROID_OUTPUTS_DIR}/test-screenshots/ uhabits-android/src/androidTest/assets/
@@ -233,18 +229,14 @@ CI/CD script for Loop Habit Tracker.
233229
234230
Usage:
235231
build.sh build [options]
236-
build.sh clean [options]
237232
build.sh android-tests <API> [options]
238233
build.sh android-tests-parallel <API> <API>... [options]
239-
build.sh android-fetch-images [options]
240234
build.sh android-accept-images [options]
241235
242236
Commands:
243237
build Build the app and run small tests
244-
clean Remove all build directories
245238
android-tests Run medium and large Android tests on an emulator
246239
android-tests-parallel Tests multiple API levels simultaneously
247-
android-fetch-images Fetch failed view test images from device
248240
android-accept-images Copy fetched images to corresponding assets folder
249241
250242
Options:
@@ -274,12 +266,10 @@ main() {
274266
case "$1" in
275267
build)
276268
shift; _parse_opts "$@"
269+
clean
277270
core_build
278271
android_build
279272
;;
280-
clean)
281-
clean
282-
;;
283273
android-tests)
284274
shift; _parse_opts "$@"
285275
if [ -z $1 ]; then
@@ -297,9 +287,6 @@ main() {
297287
shift; _parse_opts "$@"
298288
android_test_parallel $*
299289
;;
300-
android-fetch-images)
301-
android_fetch_images
302-
;;
303290
android-accept-images)
304291
android_accept_images
305292
;;
37 Bytes
Loading
65 Bytes
Loading
2.85 KB
Loading

uhabits-android/src/androidTest/java/org/isoron/uhabits/widgets/views/CheckmarkWidgetViewTest.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ class CheckmarkWidgetViewTest : BaseViewTest() {
5050
name = habit.name
5151
}
5252
view.refresh()
53-
measureView(view, dpToPixels(100), dpToPixels(200))
53+
measureView(view, dpToPixels(100), dpToPixels(125))
5454
}
5555

5656
@Test

0 commit comments

Comments
 (0)