mirror of
https://github.com/hanzoai/Detox.git
synced 2026-09-24 16:55:12 +00:00
Merge pull request #4766 from wix/feat/genymotion-api-35
feat(Android):Genymotion Api 35 emulators
This commit is contained in:
@@ -7,7 +7,7 @@ import com.wix.detox.espresso.action.common.MotionEvents
|
||||
* The delay between each motion event.
|
||||
* Reducing this value may fail the swipe on different devices. Please change with caution.
|
||||
*/
|
||||
private const val EVENT_DELAY = 25L
|
||||
private const val EVENT_DELAY = 35L
|
||||
|
||||
/**
|
||||
* Implementation of @see DetoxSwiper that swipes in a linear fashion uses const delay between events.
|
||||
|
||||
@@ -29,7 +29,7 @@ import static com.wix.detox.espresso.scroll.ScrollProbes.getScrollableProbe;
|
||||
public class ScrollHelper {
|
||||
private static final String LOG_TAG = "DetoxScrollHelper";
|
||||
|
||||
private static final int SCROLL_MOTIONS = 40;
|
||||
private static final int SCROLL_MOTIONS = 25;
|
||||
private static final int MAX_FLING_WAITS = 3;
|
||||
|
||||
private static final double DEFAULT_DEADZONE_PERCENT = 0.05;
|
||||
|
||||
@@ -1,12 +1,50 @@
|
||||
package com.example
|
||||
|
||||
import android.content.Intent
|
||||
import android.os.Build
|
||||
import android.os.Bundle
|
||||
import android.view.WindowInsets
|
||||
import androidx.activity.enableEdgeToEdge
|
||||
import androidx.core.view.WindowCompat
|
||||
import androidx.core.view.WindowInsetsCompat
|
||||
import com.facebook.react.ReactActivity
|
||||
import com.facebook.react.ReactActivityDelegate
|
||||
import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint.fabricEnabled
|
||||
import com.facebook.react.defaults.DefaultReactActivityDelegate
|
||||
|
||||
open class MainActivity : ReactActivity() {
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
setupEdgeToEdgeDisplay()
|
||||
super.onCreate(savedInstanceState)
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets up edge-to-edge display for the activity.
|
||||
* Adds padding to the root view to accommodate system bars.
|
||||
*/
|
||||
private fun setupEdgeToEdgeDisplay() {
|
||||
// Enable edge-to-edge for Android 11 (API 30) and above
|
||||
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.R) return
|
||||
|
||||
enableEdgeToEdge()
|
||||
|
||||
// Handle insets
|
||||
window.decorView.setOnApplyWindowInsetsListener { view, windowInsets ->
|
||||
val insets = windowInsets.getInsets(WindowInsetsCompat.Type.systemBars())
|
||||
|
||||
// Apply padding to the root view
|
||||
view.setPadding(
|
||||
view.paddingLeft,
|
||||
insets.top,
|
||||
view.paddingRight,
|
||||
insets.bottom
|
||||
)
|
||||
|
||||
WindowInsets.CONSUMED
|
||||
}
|
||||
}
|
||||
|
||||
override fun onNewIntent(intent: Intent) {
|
||||
super.onNewIntent(intent)
|
||||
setIntent(intent)
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 5.5 KiB After Width: | Height: | Size: 5.8 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 71 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 71 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 27 KiB |
@@ -37,7 +37,7 @@
|
||||
<h2>Text and link</h2>
|
||||
<p>Some text and a <a id=\"w3link\" href=\"https://www.w3schools.com\">link</a>.</p>
|
||||
<p id=\"bottomParagraph\" class=\"specialParagraph\">This is a bottom paragraph with class.</p>
|
||||
|
||||
|
||||
|
||||
</body></html>"]]>
|
||||
</RNCWebView>
|
||||
@@ -48,7 +48,5 @@
|
||||
</FitWindowsLinearLayout>
|
||||
</FrameLayout>
|
||||
</LinearLayout>
|
||||
<View class="android.view.View" width="<number>" height="<number>" visibility="visible" alpha="1.0" focused="false" x="<number>" y="<number>" />
|
||||
<View class="android.view.View" width="<number>" height="<number>" visibility="visible" alpha="1.0" focused="false" x="<number>" y="<number>" />
|
||||
</DecorView>
|
||||
</ViewHierarchy>
|
||||
</ViewHierarchy>
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
<h2>Text and link</h2>
|
||||
<p>Some text and a <a id=\"w3link\" href=\"https://www.w3schools.com\">link</a>.</p>
|
||||
<p id=\"bottomParagraph\" class=\"specialParagraph\">This is a bottom paragraph with class.</p>
|
||||
|
||||
|
||||
|
||||
</body></html>"]]>
|
||||
</RNCWebView>
|
||||
@@ -47,7 +47,5 @@
|
||||
</FitWindowsLinearLayout>
|
||||
</FrameLayout>
|
||||
</LinearLayout>
|
||||
<View class="android.view.View" width="<number>" height="<number>" visibility="visible" alpha="1.0" focused="false" x="<number>" y="<number>" />
|
||||
<View class="android.view.View" width="<number>" height="<number>" visibility="visible" alpha="1.0" focused="false" x="<number>" y="<number>" />
|
||||
</DecorView>
|
||||
</ViewHierarchy>
|
||||
</ViewHierarchy>
|
||||
|
||||
@@ -20,7 +20,5 @@
|
||||
</FitWindowsLinearLayout>
|
||||
</FrameLayout>
|
||||
</LinearLayout>
|
||||
<View class="android.view.View" width="<number>" height="<number>" visibility="visible" alpha="1.0" focused="false" x="<number>" y="<number>" id="detox_temp_1" />
|
||||
<View class="android.view.View" width="<number>" height="<number>" visibility="visible" alpha="1.0" focused="false" x="<number>" y="<number>" id="detox_temp_2" />
|
||||
</DecorView>
|
||||
</ViewHierarchy>
|
||||
|
||||
@@ -20,7 +20,5 @@
|
||||
</FitWindowsLinearLayout>
|
||||
</FrameLayout>
|
||||
</LinearLayout>
|
||||
<View class="android.view.View" width="<number>" height="<number>" visibility="visible" alpha="1.0" focused="false" x="<number>" y="<number>" id="detox_temp_1" />
|
||||
<View class="android.view.View" width="<number>" height="<number>" visibility="visible" alpha="1.0" focused="false" x="<number>" y="<number>" id="detox_temp_2" />
|
||||
</DecorView>
|
||||
</ViewHierarchy>
|
||||
</ViewHierarchy>
|
||||
|
||||
@@ -20,7 +20,5 @@
|
||||
</FitWindowsLinearLayout>
|
||||
</FrameLayout>
|
||||
</LinearLayout>
|
||||
<View class="android.view.View" width="<number>" height="<number>" visibility="visible" alpha="1.0" focused="false" x="<number>" y="<number>" />
|
||||
<View class="android.view.View" width="<number>" height="<number>" visibility="visible" alpha="1.0" focused="false" x="<number>" y="<number>" />
|
||||
</DecorView>
|
||||
</ViewHierarchy>
|
||||
|
||||
@@ -20,7 +20,5 @@
|
||||
</FitWindowsLinearLayout>
|
||||
</FrameLayout>
|
||||
</LinearLayout>
|
||||
<View class="android.view.View" width="<number>" height="<number>" visibility="visible" alpha="1.0" focused="false" x="<number>" y="<number>" />
|
||||
<View class="android.view.View" width="<number>" height="<number>" visibility="visible" alpha="1.0" focused="false" x="<number>" y="<number>" />
|
||||
</DecorView>
|
||||
</ViewHierarchy>
|
||||
</ViewHierarchy>
|
||||
|
||||
@@ -123,7 +123,7 @@ const config = {
|
||||
'android.genycloud.uuid': {
|
||||
type: 'android.genycloud',
|
||||
device: {
|
||||
recipeUUID: '9baf12f9-a645-4ffa-a688-0e92584d6194',
|
||||
recipeUUID: '544e47fc-ab69-4920-8d82-34509391a7af',
|
||||
},
|
||||
utilBinaryPaths: ["e2e/util-binary/detoxbutler-1.0.4-genymotion-release.apk"]
|
||||
},
|
||||
@@ -131,7 +131,7 @@ const config = {
|
||||
'android.genycloud.name': {
|
||||
type: 'android.genycloud',
|
||||
device: {
|
||||
recipeName: 'Detox_Pixel_3a_API_34',
|
||||
recipeName: 'Detox_Pixel_3a_API_35',
|
||||
},
|
||||
utilBinaryPaths: ["e2e/util-binary/detoxbutler-1.0.4-genymotion-release.apk"]
|
||||
},
|
||||
@@ -184,11 +184,11 @@ const config = {
|
||||
apps: ['android.release', 'android.release.withArgs'],
|
||||
},
|
||||
'android.genycloud.debug': {
|
||||
device: 'android.genycloud.uuid',
|
||||
device: 'android.genycloud.name',
|
||||
apps: ['android.debug'],
|
||||
},
|
||||
'android.genycloud.release': {
|
||||
device: 'android.genycloud.uuid',
|
||||
device: 'android.genycloud.name',
|
||||
apps: ['android.release', 'android.release.withArgs'],
|
||||
},
|
||||
'android.genycloud.release2': {
|
||||
|
||||
Reference in New Issue
Block a user