detox 20.44.0-smoke.1 → 20.44.0-smoke.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (47) hide show
  1. package/Detox-android/com/wix/detox/{20.44.0-smoke.1/detox-20.44.0-smoke.1-sources.jar → 20.44.0-smoke.3/detox-20.44.0-smoke.3-sources.jar} +0 -0
  2. package/Detox-android/com/wix/detox/20.44.0-smoke.3/detox-20.44.0-smoke.3-sources.jar.md5 +1 -0
  3. package/Detox-android/com/wix/detox/20.44.0-smoke.3/detox-20.44.0-smoke.3-sources.jar.sha1 +1 -0
  4. package/Detox-android/com/wix/detox/20.44.0-smoke.3/detox-20.44.0-smoke.3-sources.jar.sha256 +1 -0
  5. package/Detox-android/com/wix/detox/20.44.0-smoke.3/detox-20.44.0-smoke.3-sources.jar.sha512 +1 -0
  6. package/Detox-android/com/wix/detox/20.44.0-smoke.3/detox-20.44.0-smoke.3.aar +0 -0
  7. package/Detox-android/com/wix/detox/20.44.0-smoke.3/detox-20.44.0-smoke.3.aar.md5 +1 -0
  8. package/Detox-android/com/wix/detox/20.44.0-smoke.3/detox-20.44.0-smoke.3.aar.sha1 +1 -0
  9. package/Detox-android/com/wix/detox/20.44.0-smoke.3/detox-20.44.0-smoke.3.aar.sha256 +1 -0
  10. package/Detox-android/com/wix/detox/20.44.0-smoke.3/detox-20.44.0-smoke.3.aar.sha512 +1 -0
  11. package/Detox-android/com/wix/detox/{20.44.0-smoke.1/detox-20.44.0-smoke.1.pom → 20.44.0-smoke.3/detox-20.44.0-smoke.3.pom} +1 -1
  12. package/Detox-android/com/wix/detox/20.44.0-smoke.3/detox-20.44.0-smoke.3.pom.md5 +1 -0
  13. package/Detox-android/com/wix/detox/20.44.0-smoke.3/detox-20.44.0-smoke.3.pom.sha1 +1 -0
  14. package/Detox-android/com/wix/detox/20.44.0-smoke.3/detox-20.44.0-smoke.3.pom.sha256 +1 -0
  15. package/Detox-android/com/wix/detox/20.44.0-smoke.3/detox-20.44.0-smoke.3.pom.sha512 +1 -0
  16. package/Detox-android/com/wix/detox/maven-metadata.xml +4 -4
  17. package/Detox-android/com/wix/detox/maven-metadata.xml.md5 +1 -1
  18. package/Detox-android/com/wix/detox/maven-metadata.xml.sha1 +1 -1
  19. package/Detox-android/com/wix/detox/maven-metadata.xml.sha256 +1 -1
  20. package/Detox-android/com/wix/detox/maven-metadata.xml.sha512 +1 -1
  21. package/Detox-ios-framework.tbz +0 -0
  22. package/Detox-ios-src.tbz +0 -0
  23. package/Detox-ios-xcuitest.tbz +0 -0
  24. package/android/detox/src/full/java/com/wix/detox/adapters/server/DetoxActionHandlers.kt +1 -7
  25. package/android/detox/src/full/java/com/wix/detox/espresso/hierarchy/ViewHierarchyGenerator.kt +14 -63
  26. package/android/detox/src/full/java/com/wix/detox/inquiry/FabricAnimationsInquirer.kt +440 -0
  27. package/android/detox/src/full/java/com/wix/detox/inquiry/ViewLifecycleRegistry.kt +83 -173
  28. package/android/detox/src/full/java/com/wix/detox/reactnative/idlingresources/animations/AnimatedModuleIdlingResource.kt +7 -2
  29. package/android/detox/src/full/java/com/wix/detox/reactnative/idlingresources/uimodule/fabric/FabricUIManagerIdlingResources.kt +1 -170
  30. package/package.json +2 -2
  31. package/Detox-android/com/wix/detox/20.44.0-smoke.1/detox-20.44.0-smoke.1-sources.jar.md5 +0 -1
  32. package/Detox-android/com/wix/detox/20.44.0-smoke.1/detox-20.44.0-smoke.1-sources.jar.sha1 +0 -1
  33. package/Detox-android/com/wix/detox/20.44.0-smoke.1/detox-20.44.0-smoke.1-sources.jar.sha256 +0 -1
  34. package/Detox-android/com/wix/detox/20.44.0-smoke.1/detox-20.44.0-smoke.1-sources.jar.sha512 +0 -1
  35. package/Detox-android/com/wix/detox/20.44.0-smoke.1/detox-20.44.0-smoke.1.aar +0 -0
  36. package/Detox-android/com/wix/detox/20.44.0-smoke.1/detox-20.44.0-smoke.1.aar.md5 +0 -1
  37. package/Detox-android/com/wix/detox/20.44.0-smoke.1/detox-20.44.0-smoke.1.aar.sha1 +0 -1
  38. package/Detox-android/com/wix/detox/20.44.0-smoke.1/detox-20.44.0-smoke.1.aar.sha256 +0 -1
  39. package/Detox-android/com/wix/detox/20.44.0-smoke.1/detox-20.44.0-smoke.1.aar.sha512 +0 -1
  40. package/Detox-android/com/wix/detox/20.44.0-smoke.1/detox-20.44.0-smoke.1.pom.md5 +0 -1
  41. package/Detox-android/com/wix/detox/20.44.0-smoke.1/detox-20.44.0-smoke.1.pom.sha1 +0 -1
  42. package/Detox-android/com/wix/detox/20.44.0-smoke.1/detox-20.44.0-smoke.1.pom.sha256 +0 -1
  43. package/Detox-android/com/wix/detox/20.44.0-smoke.1/detox-20.44.0-smoke.1.pom.sha512 +0 -1
  44. package/android/detox/src/full/java/com/wix/detox/inquiry/DetoxAnimationTracker.kt +0 -70
  45. package/android/detox/src/full/java/com/wix/detox/inquiry/DetoxFabricAnimationHook.kt +0 -83
  46. package/android/detox/src/full/java/com/wix/detox/inquiry/DetoxFabricIntegration.kt +0 -99
  47. package/android/detox/src/full/java/com/wix/detox/inquiry/DetoxFabricUIManagerWrapper.kt +0 -37
@@ -1,70 +0,0 @@
1
- package com.wix.detox.inquiry
2
-
3
- import android.util.Log
4
- import com.facebook.react.bridge.ReactContext
5
- import com.facebook.react.fabric.FabricUIManager
6
- import com.facebook.react.uimanager.UIManagerHelper
7
- // import com.facebook.react.uimanager.UIManagerType
8
-
9
- /**
10
- * Main entry point for Detox animation tracking in Fabric.
11
- * This provides a simple API to initialize and use the animation tracking system.
12
- */
13
- object DetoxAnimationTracker {
14
- private const val LOG_TAG = "DetoxAnimationTracker"
15
- private var isInitialized = false
16
-
17
- /**
18
- * Initialize the animation tracking system.
19
- * This should be called once when Detox starts up.
20
- */
21
- fun initialize(reactContext: ReactContext) {
22
- if (isInitialized) {
23
- Log.d(LOG_TAG, "DetoxAnimationTracker already initialized")
24
- return
25
- }
26
-
27
- try {
28
- // Initialize the Fabric integration
29
- DetoxFabricIntegration.initialize(reactContext)
30
- isInitialized = true
31
- Log.i(LOG_TAG, "DetoxAnimationTracker initialized successfully")
32
-
33
- } catch (e: Exception) {
34
- Log.e(LOG_TAG, "Failed to initialize DetoxAnimationTracker", e)
35
- }
36
- }
37
-
38
- /**
39
- * Get the current animation statistics
40
- */
41
- fun getAnimationStats(): Map<String, Any> {
42
- return ViewLifecycleRegistry.getStats()
43
- }
44
-
45
- /**
46
- * Get all recently animated views
47
- */
48
- fun getRecentlyAnimatedViews(): List<android.view.View> {
49
- return ViewLifecycleRegistry.getRecentlyAnimatedViews()
50
- }
51
-
52
- /**
53
- * Check if a specific view was recently animated
54
- */
55
- fun wasRecentlyAnimated(view: android.view.View): Boolean {
56
- return ViewLifecycleRegistry.wasRecentlyAnimated(view)
57
- }
58
-
59
- /**
60
- * Clear all animation tracking data
61
- */
62
- fun clear() {
63
- ViewLifecycleRegistry.clear()
64
- }
65
-
66
- /**
67
- * Check if the tracker is initialized
68
- */
69
- fun isInitialized(): Boolean = isInitialized
70
- }
@@ -1,83 +0,0 @@
1
- package com.wix.detox.inquiry
2
-
3
- import android.util.Log
4
- import android.view.View
5
- import com.facebook.react.bridge.ReadableMap
6
- import com.facebook.react.fabric.FabricUIManager
7
- import com.wix.detox.inquiry.ViewLifecycleRegistry.markAnimated
8
- import com.wix.detox.inquiry.ViewLifecycleRegistry.markMounted
9
- import com.wix.detox.inquiry.ViewLifecycleRegistry.markUpdated
10
-
11
- /**
12
- * Hook into React Native's Fabric new architecture to track animated views.
13
- * This provides precise tracking by intercepting the exact points where animated
14
- * properties are applied to views in Fabric.
15
- */
16
- object DetoxFabricAnimationHook {
17
- private const val LOG_TAG = "DetoxFabricHook"
18
-
19
- /**
20
- * Hook into FabricUIManager.synchronouslyUpdateViewOnUIThread to track animated updates.
21
- * This marks views as animated whenever there's any animation activity, giving lots of false positives.
22
- */
23
- fun hookSynchronouslyUpdateViewOnUIThread(
24
- reactTag: Int,
25
- props: ReadableMap?,
26
- fabricUIManager: FabricUIManager
27
- ) {
28
- try {
29
- // Get the actual Android View
30
- val androidView = fabricUIManager.resolveView(reactTag)
31
- if (androidView == null) {
32
- Log.d(LOG_TAG, "View not found for tag: $reactTag")
33
- return
34
- }
35
-
36
- markAnimated(androidView)
37
- } catch (e: Exception) {
38
- Log.w(LOG_TAG, "Failed to hook animated view update", e)
39
- }
40
- }
41
-
42
- /**
43
- * Hook into view mount operations to track when views are created.
44
- */
45
- fun hookViewMount(
46
- reactTag: Int,
47
- fabricUIManager: FabricUIManager
48
- ) {
49
- try {
50
- val androidView = fabricUIManager.resolveView(reactTag)
51
- if (androidView != null) {
52
- Log.d(LOG_TAG, "View mounted with tag: $reactTag")
53
- markMounted(androidView)
54
- }
55
- } catch (e: Exception) {
56
- Log.w(LOG_TAG, "Failed to hook view mount", e)
57
- }
58
- }
59
-
60
-
61
- /**
62
- * Get view coordinates for highlighting
63
- */
64
- fun getViewCoordinates(view: View): IntArray {
65
- val coords = intArrayOf(0, 0, 0, 0)
66
- try {
67
- view.getLocationOnScreen(coords)
68
- coords[2] = view.width
69
- coords[3] = view.height
70
- } catch (e: Exception) {
71
- Log.w(LOG_TAG, "Failed to get view coordinates", e)
72
- }
73
- return coords
74
- }
75
-
76
- /**
77
- * Log current registry statistics
78
- */
79
- fun logRegistryStats() {
80
- val stats = ViewLifecycleRegistry.getStats()
81
- Log.i(LOG_TAG, "ViewLifecycleRegistry stats: $stats")
82
- }
83
- }
@@ -1,99 +0,0 @@
1
- package com.wix.detox.inquiry
2
-
3
- import android.util.Log
4
- import com.facebook.react.bridge.ReactContext
5
- import com.facebook.react.fabric.FabricUIManager
6
- import com.facebook.react.uimanager.UIManagerHelper
7
- // import com.facebook.react.uimanager.UIManagerType
8
-
9
- /**
10
- * Integration point for Detox with React Native's Fabric architecture.
11
- * This provides hooks into Fabric's animation system to track animated views.
12
- */
13
- object DetoxFabricIntegration {
14
- private const val LOG_TAG = "DetoxFabricIntegration"
15
- private var isInitialized = false
16
-
17
- /**
18
- * Initialize the Fabric animation hooks.
19
- * This should be called once when Detox starts up.
20
- */
21
- fun initialize(reactContext: ReactContext) {
22
- if (isInitialized) {
23
- Log.d(LOG_TAG, "DetoxFabricIntegration already initialized")
24
- return
25
- }
26
-
27
- try {
28
- // Get the FabricUIManager
29
- val fabricUIManager = UIManagerHelper.getUIManager(reactContext, 1) as? FabricUIManager
30
- if (fabricUIManager == null) {
31
- Log.w(LOG_TAG, "FabricUIManager not available - Fabric animation tracking disabled")
32
- return
33
- }
34
-
35
- // Hook into the FabricUIManager
36
- hookFabricUIManager(fabricUIManager)
37
- isInitialized = true
38
- Log.i(LOG_TAG, "DetoxFabricIntegration initialized successfully")
39
-
40
- } catch (e: Exception) {
41
- Log.e(LOG_TAG, "Failed to initialize DetoxFabricIntegration", e)
42
- }
43
- }
44
-
45
- /**
46
- * Hook into FabricUIManager to track animated updates.
47
- * This uses reflection to intercept synchronouslyUpdateViewOnUIThread calls.
48
- */
49
- private fun hookFabricUIManager(fabricUIManager: FabricUIManager) {
50
- try {
51
- // Create a wrapper that intercepts calls to synchronouslyUpdateViewOnUIThread
52
- val originalMethod = FabricUIManager::class.java.getDeclaredMethod(
53
- "synchronouslyUpdateViewOnUIThread",
54
- Int::class.java,
55
- com.facebook.react.bridge.ReadableMap::class.java
56
- )
57
-
58
- // Note: In a real implementation, you would use bytecode manipulation
59
- // or AOP to intercept this method. For now, we'll provide a manual hook
60
- // that can be called from the application code.
61
-
62
- Log.d(LOG_TAG, "FabricUIManager hook prepared (manual integration required)")
63
-
64
- } catch (e: Exception) {
65
- Log.w(LOG_TAG, "Failed to hook FabricUIManager", e)
66
- }
67
- }
68
-
69
- /**
70
- * Manual hook for synchronouslyUpdateViewOnUIThread.
71
- * This should be called from the application's FabricUIManager wrapper.
72
- */
73
- fun onSynchronouslyUpdateViewOnUIThread(
74
- reactTag: Int,
75
- props: com.facebook.react.bridge.ReadableMap?,
76
- fabricUIManager: FabricUIManager
77
- ) {
78
- DetoxFabricAnimationHook.hookSynchronouslyUpdateViewOnUIThread(reactTag, props, fabricUIManager)
79
- }
80
-
81
- /**
82
- * Manual hook for view mount operations.
83
- */
84
- fun onViewMount(reactTag: Int, fabricUIManager: FabricUIManager) {
85
- DetoxFabricAnimationHook.hookViewMount(reactTag, fabricUIManager)
86
- }
87
-
88
- /**
89
- * Check if the integration is initialized
90
- */
91
- fun isInitialized(): Boolean = isInitialized
92
-
93
- /**
94
- * Get current animation statistics
95
- */
96
- fun getAnimationStats(): Map<String, Any> {
97
- return ViewLifecycleRegistry.getStats()
98
- }
99
- }
@@ -1,37 +0,0 @@
1
- package com.wix.detox.inquiry
2
-
3
- import android.util.Log
4
- import com.facebook.react.bridge.ReadableMap
5
- import com.facebook.react.fabric.FabricUIManager
6
-
7
- /**
8
- * Wrapper for FabricUIManager that intercepts animation-related calls.
9
- * This provides a clean way to hook into Fabric's animation system.
10
- */
11
- class DetoxFabricUIManagerWrapper(
12
- private val originalUIManager: FabricUIManager
13
- ) {
14
- private val LOG_TAG = "DetoxFabricUIManagerWrapper"
15
-
16
- fun synchronouslyUpdateViewOnUIThread(reactTag: Int, props: ReadableMap?) {
17
- try {
18
- // Call the original method first (only if props is not null)
19
- if (props != null) {
20
- originalUIManager.synchronouslyUpdateViewOnUIThread(reactTag, props)
21
- }
22
-
23
- // Then hook our animation tracking
24
- DetoxFabricAnimationHook.hookSynchronouslyUpdateViewOnUIThread(reactTag, props, originalUIManager)
25
-
26
- } catch (e: Exception) {
27
- Log.w(LOG_TAG, "Failed to process animated view update", e)
28
- // Still call the original method to avoid breaking the app (only if props is not null)
29
- if (props != null) {
30
- originalUIManager.synchronouslyUpdateViewOnUIThread(reactTag, props)
31
- }
32
- }
33
- }
34
-
35
- // Delegate all other methods to the original UIManager
36
- fun resolveView(reactTag: Int) = originalUIManager.resolveView(reactTag)
37
- }