-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #135 from pravinyo/development
UI fixes and documentation update
- Loading branch information
Showing
50 changed files
with
266 additions
and
142 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
name: AudioBook InstrumentationTest | ||
|
||
on: | ||
push: | ||
branches: | ||
- 'ci_instrumentation_test' | ||
|
||
jobs: | ||
instrumentationJob: | ||
name: Run Instrumentation Tests | ||
runs-on: ubuntu-18.04 | ||
|
||
steps: | ||
- uses: actions/checkout@v1 | ||
- name: set up JDK 1.8 | ||
uses: actions/setup-java@v1 | ||
with: | ||
java-version: 1.8 | ||
|
||
- uses: malinskiy/action-android/install-sdk@release/0.0.6 | ||
- run: adb devices | ||
- run: echo $ANDROID_HOME | ||
|
||
- uses: malinskiy/action-android/emulator-run-cmd@release/0.0.6 | ||
with: | ||
cmd: ./gradlew connectedDebugAndroidTest | ||
api: 25 | ||
tag: default | ||
abi: x86 | ||
- name: Save logcat output | ||
uses: actions/upload-artifact@master | ||
if: failure() | ||
with: | ||
name: logcat | ||
path: artifacts/logcat.log |
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
21 changes: 21 additions & 0 deletions
21
.../androidTest/java/com/allsoftdroid/audiobook/presentation/utils/ScreenCaptureProcessor.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.allsoftdroid.audiobook.presentation.utils | ||
|
||
import android.os.Environment.DIRECTORY_PICTURES | ||
import android.os.Environment.getExternalStoragePublicDirectory | ||
import androidx.test.runner.screenshot.BasicScreenCaptureProcessor | ||
import java.io.File | ||
|
||
class ScreenCaptureProcessor(parentFolderPath: String) : BasicScreenCaptureProcessor() { | ||
|
||
init { | ||
this.mDefaultScreenshotPath = File( | ||
File( | ||
getExternalStoragePublicDirectory(DIRECTORY_PICTURES), | ||
"audioBook_test_folder" | ||
).absolutePath, | ||
"screenshots/$parentFolderPath" | ||
) | ||
} | ||
|
||
override fun getFilename(prefix: String): String = prefix | ||
} |
22 changes: 22 additions & 0 deletions
22
...src/androidTest/java/com/allsoftdroid/audiobook/presentation/utils/TakeScreenshotUtils.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,22 @@ | ||
package com.allsoftdroid.audiobook.presentation.utils | ||
|
||
import androidx.test.runner.screenshot.Screenshot | ||
import timber.log.Timber | ||
import java.io.IOException | ||
|
||
object TakeScreenshotUtils { | ||
fun takeScreenshot(parentFolderPath: String = "", screenShotName: String) { | ||
Timber.d("Taking screenshot of '$screenShotName'") | ||
val screenCapture = Screenshot.capture() | ||
val processors = setOf(ScreenCaptureProcessor(parentFolderPath)) | ||
try { | ||
screenCapture.apply { | ||
name = screenShotName | ||
process(processors) | ||
} | ||
Timber.d("Screenshot taken") | ||
} catch (ex: IOException) { | ||
Timber.d("Could not take the screenshot: $ex") | ||
} | ||
} | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
24 changes: 0 additions & 24 deletions
24
common/src/androidTest/java/com/allsoftdroid/common/ExampleInstrumentedTest.kt
This file was deleted.
Oops, something went wrong.
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
4 changes: 2 additions & 2 deletions
4
common/src/main/res/drawable/ic_keyboard_arrow_left_black_24dp.xml
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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
<vector android:autoMirrored="true" android:height="24dp" | ||
android:tint="#FEFFFD" android:viewportHeight="24.0" | ||
android:tint="#000" android:viewportHeight="24.0" | ||
android:viewportWidth="24.0" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android"> | ||
<path android:fillColor="#FF000000" android:pathData="M15.41,16.09l-4.58,-4.59 4.58,-4.59L14,5.5l-6,6 6,6z"/> | ||
<path android:fillColor="#000" android:pathData="M15.41,16.09l-4.58,-4.59 4.58,-4.59L14,5.5l-6,6 6,6z"/> | ||
</vector> |
5 changes: 5 additions & 0 deletions
5
common/src/main/res/drawable/ic_keyboard_arrow_left_white.xml
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,5 @@ | ||
<vector android:autoMirrored="true" android:height="24dp" | ||
android:tint="#fff" android:viewportHeight="24.0" | ||
android:viewportWidth="24.0" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android"> | ||
<path android:fillColor="#fff" android:pathData="M15.41,16.09l-4.58,-4.59 4.58,-4.59L14,5.5l-6,6 6,6z"/> | ||
</vector> |
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
Oops, something went wrong.