Possibility of adding end to end tests for ads
ShivamJoker opened this issue · 2 comments
ShivamJoker commented
Description
I was trying to add E2E tests with detox but it seems that it is not able to find the elements from admob (continue to app)
I am not sure if it is possible to test ads as well, I would be happy to contribute.
Here is the view hierarchy
Error: Test Failed: View “<UIButtonLabel: 0x7fce0556cbf0>” is not visible: View is hidden or has hidden ancestor
View Hierarchy:
<UIWindowScene: 0x7fce0475adc0; scene = <FBSScene: 0x600002bccf80; identifier: sceneID:com.example.reactnativeadmobadmob-default>; persistentIdentifier = B60EA7CF-A535-4D6A-992A-F81EFBB4D608; activationState = UISceneActivationStateForegroundActive>
+ <UIWindow: 0x7fce0540b250; frame = (0 0; 390 844); layer = <UIWindowLayer: 0x600000b80270>>
| | <UITransitionView: 0x7fce047b7e20; frame = (0 0; 390 844); layer = <CALayer: 0x600000537280>>
| | | <UIView: 0x7fce055673c0; frame = (0 0; 390 844); layer = <CALayer: 0x600000525d80>>
| | | | <GADCloseButton: 0x7fce05569dc0; frame = (320 47; 70 70); ax.label = "Close Advertisement"; layer = <CALayer: 0x6000005254a0>>
| | | | | <UIButtonLabel: 0x7fce0556cbf0; frame = (0 0; 0 0); layer = <_UILabelLayer: 0x60000267a300>>
| | | | | <UIImageView: 0x7fce055697d0; frame = (-15 -15; 100 100); layer = <CALayer: 0x600000525780>>
| | | | <GADWebAdView: 0x7fce05568510; frame = (0 0; 390 844); layer = <CALayer: 0x600000525e60>>
| | | | | <WKWebView: 0x7fce04bc1c00; frame = (0 0; 390 844); layer = <CALayer: 0x6000004d9ea0>>
| | | | | | <GADTestLabel: 0x7fce0547a9e0; frame = (143.333 51; 103.667 34); text = "Test mode"; ax.label = "Test mode"; layer = <_UILabelLayer: 0x60000264c640>>
| | | | | | <WKScrollView: 0x7fce04baca00; frame = (0 0; 390 844); layer = <CALayer: 0x6000004dd740>>
| | | | | | | <_UIScrollViewScrollIndicator: 0x7fce047b2880; frame = (44.3333 838; 301 3); ax.label = "Horizontal scroll bar, 1 page"; ax.value = "0%"; layer = <CALayer: 0x6000004de080>>
| | | | | | | | <UIView: 0x7fce047b2a20; frame = (0 0; 301 3); layer = <CALayer: 0x6000004de0a0>>
| | | | | | | <_UIScrollViewScrollIndicator: 0x7fce047b2b90; frame = (384 44.3333; 3 754.667); ax.label = "Vertical scroll bar, 1 page"; ax.value = "0%"; layer = <CALayer: 0x6000004de0c0>>
| | | | | | | | <UIView: 0x7fce047b2d30; frame = (0 0; 3 754.667); layer = <CALayer: 0x6000004de0e0>>
| | | | | | | <UIView: 0x7fce047ae690; frame = (0 0; 0 0); layer = <CALayer: 0x6000004dd480>>
| | | | | | | <WKContentView: 0x7fce0663c400; frame = (0 0; 390 844); layer = <CALayer: 0x6000004d9ce0>>
| | | | | | | | <_UILayerHostView: 0x7fce05566700; frame = (0 0; 0 0); layer = <CALayerHost: 0x600000ad05a0>>
| | | | | | | | <UIView: 0x7fce047accd0; frame = (0 0; 390 844); layer = <CALayer: 0x6000004ddda0>>
| | | | | | | | | <UIView: 0x7fce047acb60; frame = (0 0; 390 844); layer = <CALayer: 0x6000004dd980>>
| | | | | | | | | | <WKCompositingView: 0x7fce047b5530; frame = (0 0; 390 844); layer = <WKCompositingLayer: 0x6000004de120>>
| | | | | | | | | | | <WKCompositingView: 0x7fce047add00; frame = (0 0; 390 844); layer = <WKCompositingLayer: 0x6000004dce80>>
| | | | | | | | | | | | <WKCompositingView: 0x7fce047adb90; frame = (0 0; 390 844); layer = <WKCompositingLayer: 0x6000004dcce0>>
| | | | | | | | | | | | | <WKCompositingView: 0x7fce047b04e0; frame = (0 0; 0 0); layer = <WKCompositingLayer: 0x6000004ddea0>>
| | | | | | | | | | | | | | <WKCompositingView: 0x7fce047b56a0; frame = (354.588 89.6224; 18.9767 19.1202); layer = <WKCompositingLayer: 0x6000004de4e0>>
| | | | | | | | | | | | | | <WKCompositingView: 0x7fce0556e880; frame = (8 176.656; 374 619.328); layer = <WKCompositingLayer: 0x6000002b4fe0>>
| | | | | | | | | | | | | | | <WKCompositingView: 0x7fce05480c20; frame = (0 0.140625; 374 619); layer = <WKCompositingLayer: 0x6000002a7960>>
| | | | | | | | | | | | | | | | <WKCompositingView: 0x7fce047b53c0; frame = (0 0; 0 0); layer = <WKCompositingLayer: 0x6000004dd420>>
| | | | | | | | | | | | | | | | | <WKChildScrollView: 0x7fce04a5d000; frame = (0 0; 374 619); layer = <CALayer: 0x6000004ddf80>>
| | | | | | | | | | | | | | | | | | <_UIScrollViewScrollIndicator: 0x7fce0556f010; frame = (-39 -6; 36 3); ax.label = "Horizontal scroll bar, 1 page"; ax.value = "0%"; layer = <CALayer: 0x6000002b5280>>
| | | | | | | | | | | | | | | | | | | <UIView: 0x7fce0556f1b0; frame = (0 0; 36 3); layer = <CALayer: 0x6000002b4f20>>
| | | | | | | | | | | | | | | | | | <_UIScrollViewScrollIndicator: 0x7fce0556f320; frame = (-6 -39; 3 36); ax.label = "Vertical scroll bar, 1 page"; ax.value = "0%"; layer = <CALayer: 0x6000002b52e0>>
| | | | | | | | | | | | | | | | | | | <UIView: 0x7fce0556f8f0; frame = (0 0; 3 36); layer = <CALayer: 0x6000002b5260>>
| | | | | | | | | | | | | | | | | | <WKCompositingView: 0x7fce047b6790; frame = (0 0; 0 0); layer = <WKCompositingLayer: 0x6000004de4a0>>
| | | | | | | | | | | | | | | | | | | <WKCompositingView: 0x7fce047aa220; frame = (0 0; 374 619); layer = <WKCompositingLayer: 0x6000004dcbe0>>
| | | | | | | | | | | | | | | | | | | | <WKCompositingView: 0x7fce0556e710; frame = (0 0; 374 619); layer = <WKCompositingLayer: 0x6000002b50a0>>
| | | | | | | | | | | | | | | | | | | | | <WKCompositingView: 0x7fce0556b970; frame = (0 0; 0 0); layer = <WKCompositingLayer: 0x6000002b4e40>>
| | | | | | | | | | | | | | | | | | | | | <WKCompositingView: 0x7fce0556b800; frame = (0 0; 0 0); layer = <WKCompositingLayer: 0x6000002b53e0>>
| | | | | | | | | | | | | <WKCompositingView: 0x7fce047b4db0; frame = (0 0; 0 0); layer = <WKCompositingLayer: 0x6000004ddf00>>
| | | | | | | | <AXRemoteElement: 0x6000010c7300; ax.frame = (0 0; 390 844)>
| | | | | <UIScrollView: 0x7fce0b91e400; frame = (0 0; 0 0); layer = <CALayer: 0x60000052af00>>
| | | | | | <_UIScrollViewScrollIndicator: 0x7fce053969e0; frame = (-6 -39; 3 36); ax.label = "Vertical scroll bar, 1 page"; ax.value = "0%"; layer = <CALayer: 0x600000517500>>
| | | | | | | <UIView: 0x7fce05396b80; frame = (0 0; 3 36); layer = <CALayer: 0x600000516ec0>>
| | | | | | <_UIScrollViewScrollIndicator: 0x7fce05398ad0; frame = (-39 -6; 36 3); ax.label = "Horizontal scroll bar, 1 page"; ax.value = "0%"; layer = <CALayer: 0x600000516e40>>
| | | | | | | <UIView: 0x7fce05396870; frame = (0 0; 36 3); layer = <CALayer: 0x6000005174e0>>
| | <UITransitionView: 0x7fce05519cb0; frame = (0 0; 390 844); layer = <CALayer: 0x600000593040>>
| | | <UIView: 0x7fce055164f0; frame = (0 0; 390 844); layer = <CALayer: 0x6000005916a0>>
| | | | <_UILayoutGuide: 0x7fce05516dd0; frame = (0 810; 0 34); layer = <CALayer: 0x6000005915e0>>
| | | | <_UILayoutGuide: 0x7fce05516a40; frame = (0 0; 0 47); layer = <CALayer: 0x600000591720>>
| | | | <UIImageView: 0x7fce05516660; frame = (145 372; 100 100); ax.id = "BootSplashLogo"; layer = <CALayer: 0x600000591580>>
| | <UITransitionView: 0x7fce05411bd0; frame = (0 0; 390 844); layer = <CALayer: 0x600000599de0>>
| | | <UIDropShadowView: 0x7fce04718100; frame = (0 0; 390 844); layer = <CALayer: 0x60000059d720>>
| | | | <RCTRootView: 0x7fce0550d910; frame = (0 0; 390 844); layer = <CALayer: 0x6000005eb580>>
| | | | | <RCTRootContentView: 0x7fce05510620; frame = (0 0; 390 844); layer = <CALayer: 0x6000005eb620>>
| | | | | | <RCTView: 0x7fce05389420; frame = (0 0; 390 844); layer = <CALayer: 0x600000528d00>>
| | | | | | | <RCTView: 0x7fce05386e50; frame = (0 0; 390 844); layer = <CALayer: 0x600000528b00>>
| | | | | | | | <RCTView: 0x7fce053847b0; frame = (0 0; 390 0); layer = <CALayer: 0x600000528a20>>
| | <GADMainWindowView: 0x7fce0530a340; frame = (-1 -1; 1 1); layer = <CALayer: 0x60000055a7e0>>
| | | <WKWebView: 0x7fce0803e400; frame = (0 0; 100 100); layer = <CALayer: 0x6000005a5ea0>>
| | | | <WKScrollView: 0x7fce0781c600; frame = (0 0; 100 100); layer = <CALayer: 0x6000005a06e0>>
| | | | | <_UIScrollViewScrollIndicator: 0x7fce05714df0; frame = (90 94; 7 3); ax.label = "Horizontal scroll bar, 1 page"; ax.value = "0%"; layer = <CALayer: 0x6000005a6aa0>>
| | | | | | <UIView: 0x7fce05713bc0; frame = (0 0; 7 3); layer = <CALayer: 0x6000005a6ae0>>
| | | | | <_UIScrollViewScrollIndicator: 0x7fce057137b0; frame = (94 90; 3 7); ax.label = "Vertical scroll bar, 1 page"; ax.value = "0%"; layer = <CALayer: 0x6000005a6b00>>
| | | | | | <UIView: 0x7fce057133a0; frame = (0 0; 3 7); layer = <CALayer: 0x6000005a6b20>>
| | | | | <UIView: 0x7fce04717890; frame = (0 0; 0 0); layer = <CALayer: 0x6000005508e0>>
| | | | | <WKContentView: 0x7fce0803ea00; frame = (0 0; 100 100); layer = <CALayer: 0x6000005a5f00>>
| | | | | | <_UILayerHostView: 0x7fce04795750; frame = (0 0; 0 0); layer = <CALayerHost: 0x600000bf5260>>
| | | | | | <UIView: 0x7fce056113a0; frame = (0 0; 100 100); layer = <CALayer: 0x6000005a0cc0>>
| | | | | | | <UIView: 0x7fce056110a0; frame = (0 0; 100 100); layer = <CALayer: 0x6000005a1c80>>
| | | | | | | | <WKCompositingView: 0x7fce047aa640; frame = (0 0; 100 100); layer = <WKCompositingLayer: 0x600000551ca0>>
| | | | | | | | | <WKCompositingView: 0x7fce047aaa90; frame = (0 0; 100 100); layer = <WKCompositingLayer: 0x600000511420>>
| | | | | | | | | | <WKCompositingView: 0x7fce047aa7b0; frame = (0 0; 100 100); layer = <WKCompositingLayer: 0x600000551940>>
| | | | | | | | | | | <WKCompositingView: 0x7fce047aa4d0; frame = (0 0; 0 0); layer = <WKCompositingLayer: 0x600000551b80>>
| | | | | | | | | | | <WKCompositingView: 0x7fce047aad40; frame = (0 0; 0 0); layer = <WKCompositingLayer: 0x6000004dc020>>
| | | | | | <AXRemoteElement: 0x6000010bb440; ax.frame = (0 0; 100 100)>
wjaykim commented
I think testing the button is not possible because it is webview level, but I'll keep find solution and also happy to let you know that e2e test support is included in roadmap of this library.
wjaykim commented
This library is deprecated. Use react-native-google-mobile-ads instead.
Please migrate to the new library if you were using this library as this library is no longer maintained. Now more stronger features are available in the new library.