-
-
Notifications
You must be signed in to change notification settings - Fork 124
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat(adam): AndroidAppInstallerTest * feat(adam): AndroidAppInstallerTest reworked * feat(android): simplify test server stubbing * feat(android): fix bug with am instrument args * feat(android): fully test AndroidAppInstaller * feat(android): add RemoteFileManagerTest * feat(android): add VideoConfigurationTest * feat(android): add more tests * feat(android): add test for Test extension * feat(android): remove unused temp from RemoteFileManagerTest * feat(android): add more tests + fix surfaced issues * fix(all): always system exit * feat(cli): print marathon version on start * feat(android): more tests for screen capturing + saving last screen capture when batch times out * feat(android): more tests + coverage * fix(adam): close vertx on termination * chore(deps): update adam to 0.3.0 * fix(android): fix ScreenCapturerTestRunListenerTest * feat(android): rename ScreenRecorderTestRunListener to ScreenRecorderTestBatchListener Co-authored-by: Ivan Balaksha <[email protected]>
- Loading branch information
Showing
50 changed files
with
2,498 additions
and
156 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
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
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
30 changes: 30 additions & 0 deletions
30
...endor-android/base/src/main/kotlin/com/malinskiy/marathon/android/RecorderTypeSelector.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,30 @@ | ||
package com.malinskiy.marathon.android | ||
|
||
import com.malinskiy.marathon.device.DeviceFeature | ||
|
||
object RecorderTypeSelector { | ||
fun selectRecorderType(supportedFeatures: Collection<DeviceFeature>, configuration: ScreenRecordConfiguration): DeviceFeature? { | ||
val preferred = configuration.preferableRecorderType | ||
val screenshotEnabled = recorderEnabled(DeviceFeature.SCREENSHOT, configuration) | ||
val videoEnabled = recorderEnabled(DeviceFeature.VIDEO, configuration) | ||
|
||
if (preferred != null && supportedFeatures.contains(preferred) && recorderEnabled(preferred, configuration)) { | ||
return preferred | ||
} | ||
|
||
return when { | ||
supportedFeatures.contains(DeviceFeature.VIDEO) && videoEnabled -> DeviceFeature.VIDEO | ||
supportedFeatures.contains(DeviceFeature.SCREENSHOT) && screenshotEnabled -> DeviceFeature.SCREENSHOT | ||
else -> null | ||
} | ||
} | ||
|
||
private fun recorderEnabled( | ||
type: DeviceFeature, | ||
configuration: ScreenRecordConfiguration | ||
) = when (type) { | ||
DeviceFeature.VIDEO -> configuration.videoConfiguration.enabled | ||
DeviceFeature.SCREENSHOT -> configuration.screenshotConfiguration.enabled | ||
} | ||
|
||
} |
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
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.