react-native-navigation 7.24.0 → 7.24.3-snapshot.492
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.
- package/lib/Mock/Components/ComponentScreen.tsx +1 -1
- package/lib/Mock/Components/NavigationButton.tsx +1 -1
- package/lib/Mock/Components/TopBar.tsx +6 -2
- package/lib/android/app/build.gradle +12 -9
- package/lib/android/app/src/main/java/com/reactnativenavigation/react/ReactView.java +13 -9
- package/lib/android/app/src/main/java/com/reactnativenavigation/utils/SystemUiUtils.kt +3 -2
- package/lib/android/app/src/main/java/com/reactnativenavigation/viewcontrollers/bottomtabs/BottomTabsController.java +1 -0
- package/lib/android/app/src/main/java/com/reactnativenavigation/viewcontrollers/component/ComponentViewController.java +2 -0
- package/lib/android/app/src/main/java/com/reactnativenavigation/viewcontrollers/modal/ModalPresenter.java +4 -6
- package/lib/android/app/src/main/java/com/reactnativenavigation/viewcontrollers/stack/StackController.java +2 -4
- package/lib/android/app/src/main/java/com/reactnativenavigation/views/bottomtabs/BottomTabs.java +6 -0
- package/lib/dist/Mock/Components/ComponentScreen.js +2 -2
- package/lib/dist/Mock/Components/NavigationButton.d.ts +1 -1
- package/lib/dist/Mock/Components/NavigationButton.js +3 -3
- package/lib/dist/Mock/Components/TopBar.d.ts +1 -2
- package/lib/dist/Mock/Components/TopBar.js +3 -3
- package/lib/ios/RNNComponentRootView.m +0 -14
- package/package.json +1 -1
- package/.buildkite/pipeline.yml +0 -59
- package/lib/android/app/src/test/java/com/reactnativenavigation/BaseTest.java +0 -178
- package/lib/android/app/src/test/java/com/reactnativenavigation/EnvironmentTest.java +0 -43
- package/lib/android/app/src/test/java/com/reactnativenavigation/TestActivity.java +0 -23
- package/lib/android/app/src/test/java/com/reactnativenavigation/TestApplication.java +0 -35
- package/lib/android/app/src/test/java/com/reactnativenavigation/TestUtils.java +0 -62
- package/lib/android/app/src/test/java/com/reactnativenavigation/fakes/IconResolverFake.kt +0 -8
- package/lib/android/app/src/test/java/com/reactnativenavigation/mocks/BackDrawable.java +0 -30
- package/lib/android/app/src/test/java/com/reactnativenavigation/mocks/ImageLoaderMock.kt +0 -49
- package/lib/android/app/src/test/java/com/reactnativenavigation/mocks/Mocks.kt +0 -18
- package/lib/android/app/src/test/java/com/reactnativenavigation/mocks/SimpleComponentViewController.java +0 -15
- package/lib/android/app/src/test/java/com/reactnativenavigation/mocks/SimpleOverlay.java +0 -54
- package/lib/android/app/src/test/java/com/reactnativenavigation/mocks/SimpleViewController.java +0 -113
- package/lib/android/app/src/test/java/com/reactnativenavigation/mocks/TestComponentLayout.java +0 -79
- package/lib/android/app/src/test/java/com/reactnativenavigation/mocks/TestComponentViewCreator.java +0 -18
- package/lib/android/app/src/test/java/com/reactnativenavigation/mocks/TestReactView.java +0 -71
- package/lib/android/app/src/test/java/com/reactnativenavigation/mocks/TitleBarButtonCreatorMock.java +0 -34
- package/lib/android/app/src/test/java/com/reactnativenavigation/mocks/TitleBarReactViewCreatorMock.java +0 -20
- package/lib/android/app/src/test/java/com/reactnativenavigation/mocks/TopBarBackgroundViewCreatorMock.java +0 -20
- package/lib/android/app/src/test/java/com/reactnativenavigation/mocks/TypefaceLoaderMock.kt +0 -21
- package/lib/android/app/src/test/java/com/reactnativenavigation/options/LayoutNodeParserTest.java +0 -51
- package/lib/android/app/src/test/java/com/reactnativenavigation/options/OptionsTest.java +0 -315
- package/lib/android/app/src/test/java/com/reactnativenavigation/options/OrientationOptionsTest.java +0 -81
- package/lib/android/app/src/test/java/com/reactnativenavigation/options/TopBarButtonsTest.kt +0 -95
- package/lib/android/app/src/test/java/com/reactnativenavigation/options/TransitionAnimationOptionsTest.kt +0 -122
- package/lib/android/app/src/test/java/com/reactnativenavigation/options/parsers/BoolParserTest.java +0 -28
- package/lib/android/app/src/test/java/com/reactnativenavigation/options/parsers/ColorParseTest.java +0 -50
- package/lib/android/app/src/test/java/com/reactnativenavigation/options/parsers/JSONParserTest.java +0 -64
- package/lib/android/app/src/test/java/com/reactnativenavigation/presentation/PresenterTest.java +0 -56
- package/lib/android/app/src/test/java/com/reactnativenavigation/presentation/RenderCheckerTest.java +0 -59
- package/lib/android/app/src/test/java/com/reactnativenavigation/presentation/SideMenuPresenterTest.java +0 -35
- package/lib/android/app/src/test/java/com/reactnativenavigation/react/NavigationModuleTest.java +0 -102
- package/lib/android/app/src/test/java/com/reactnativenavigation/react/ReloadListenerTest.java +0 -24
- package/lib/android/app/src/test/java/com/reactnativenavigation/utils/AnimationHelper.kt +0 -33
- package/lib/android/app/src/test/java/com/reactnativenavigation/utils/ButtonPresenterTest.java +0 -241
- package/lib/android/app/src/test/java/com/reactnativenavigation/utils/ButtonSpanTest.java +0 -57
- package/lib/android/app/src/test/java/com/reactnativenavigation/utils/CompatUtilsTest.java +0 -17
- package/lib/android/app/src/test/java/com/reactnativenavigation/utils/LayoutFactoryTest.java +0 -78
- package/lib/android/app/src/test/java/com/reactnativenavigation/utils/MotionEventTest.kt +0 -47
- package/lib/android/app/src/test/java/com/reactnativenavigation/utils/NativeCommandListenerTest.java +0 -60
- package/lib/android/app/src/test/java/com/reactnativenavigation/utils/OptionHelper.java +0 -16
- package/lib/android/app/src/test/java/com/reactnativenavigation/utils/ReflectionUtilsTest.java +0 -26
- package/lib/android/app/src/test/java/com/reactnativenavigation/utils/StringUtilsTest.java +0 -19
- package/lib/android/app/src/test/java/com/reactnativenavigation/utils/TitleAndButtonsMeasurerTest.kt +0 -357
- package/lib/android/app/src/test/java/com/reactnativenavigation/utils/TitleBarHelper.java +0 -54
- package/lib/android/app/src/test/java/com/reactnativenavigation/utils/UiThreadTest.java +0 -29
- package/lib/android/app/src/test/java/com/reactnativenavigation/utils/UiUtilsTest.java +0 -22
- package/lib/android/app/src/test/java/com/reactnativenavigation/utils/ViewHelper.java +0 -9
- package/lib/android/app/src/test/java/com/reactnativenavigation/viewcontrollers/OptionsApplyingTest.java +0 -149
- package/lib/android/app/src/test/java/com/reactnativenavigation/viewcontrollers/bottomtabs/BottomTabPresenterTest.java +0 -206
- package/lib/android/app/src/test/java/com/reactnativenavigation/viewcontrollers/bottomtabs/BottomTabsAttacherTest.java +0 -62
- package/lib/android/app/src/test/java/com/reactnativenavigation/viewcontrollers/bottomtabs/BottomTabsControllerTest.kt +0 -572
- package/lib/android/app/src/test/java/com/reactnativenavigation/viewcontrollers/bottomtabs/BottomTabsPresenterTest.kt +0 -173
- package/lib/android/app/src/test/java/com/reactnativenavigation/viewcontrollers/bottomtabs/attacher/modes/AfterInitialTabTest.java +0 -38
- package/lib/android/app/src/test/java/com/reactnativenavigation/viewcontrollers/bottomtabs/attacher/modes/AttachModeTest.java +0 -86
- package/lib/android/app/src/test/java/com/reactnativenavigation/viewcontrollers/bottomtabs/attacher/modes/OnSwitchToTabTest.java +0 -31
- package/lib/android/app/src/test/java/com/reactnativenavigation/viewcontrollers/bottomtabs/attacher/modes/TogetherTest.java +0 -20
- package/lib/android/app/src/test/java/com/reactnativenavigation/viewcontrollers/button/NavigationIconResolverTest.java +0 -78
- package/lib/android/app/src/test/java/com/reactnativenavigation/viewcontrollers/child/ChildControllerTest.java +0 -80
- package/lib/android/app/src/test/java/com/reactnativenavigation/viewcontrollers/child/ChildControllersRegistryTest.java +0 -56
- package/lib/android/app/src/test/java/com/reactnativenavigation/viewcontrollers/component/ComponentViewControllerTest.java +0 -191
- package/lib/android/app/src/test/java/com/reactnativenavigation/viewcontrollers/externalcomponent/ExternalComponentViewControllerTest.java +0 -97
- package/lib/android/app/src/test/java/com/reactnativenavigation/viewcontrollers/externalcomponent/FragmentCreatorMock.java +0 -34
- package/lib/android/app/src/test/java/com/reactnativenavigation/viewcontrollers/externalcomponent/SomeFragment.java +0 -8
- package/lib/android/app/src/test/java/com/reactnativenavigation/viewcontrollers/fakes/FakeParentController.kt +0 -33
- package/lib/android/app/src/test/java/com/reactnativenavigation/viewcontrollers/modal/ModalAnimatorMock.java +0 -40
- package/lib/android/app/src/test/java/com/reactnativenavigation/viewcontrollers/modal/ModalAnimatorTest.kt +0 -213
- package/lib/android/app/src/test/java/com/reactnativenavigation/viewcontrollers/modal/ModalPresenterTest.java +0 -319
- package/lib/android/app/src/test/java/com/reactnativenavigation/viewcontrollers/modal/ModalStackTest.java +0 -368
- package/lib/android/app/src/test/java/com/reactnativenavigation/viewcontrollers/navigator/NavigatorTest.java +0 -898
- package/lib/android/app/src/test/java/com/reactnativenavigation/viewcontrollers/navigator/RootPresenterTest.kt +0 -254
- package/lib/android/app/src/test/java/com/reactnativenavigation/viewcontrollers/overlay/OverlayManagerTest.java +0 -108
- package/lib/android/app/src/test/java/com/reactnativenavigation/viewcontrollers/parent/ParentControllerTest.java +0 -299
- package/lib/android/app/src/test/java/com/reactnativenavigation/viewcontrollers/sidemenu/SideMenuControllerTest.java +0 -446
- package/lib/android/app/src/test/java/com/reactnativenavigation/viewcontrollers/stack/BackButtonHelperTest.java +0 -77
- package/lib/android/app/src/test/java/com/reactnativenavigation/viewcontrollers/stack/FloatingActionButtonTest.java +0 -154
- package/lib/android/app/src/test/java/com/reactnativenavigation/viewcontrollers/stack/IdStackTest.java +0 -114
- package/lib/android/app/src/test/java/com/reactnativenavigation/viewcontrollers/stack/StackAnimatorTest.kt +0 -241
- package/lib/android/app/src/test/java/com/reactnativenavigation/viewcontrollers/stack/StackControllerTest.kt +0 -1165
- package/lib/android/app/src/test/java/com/reactnativenavigation/viewcontrollers/stack/StackPresenterTest.kt +0 -1081
- package/lib/android/app/src/test/java/com/reactnativenavigation/viewcontrollers/stack/TitleBarButtonControllerTest.java +0 -61
- package/lib/android/app/src/test/java/com/reactnativenavigation/viewcontrollers/stack/TitleBarReactViewControllerTest.java +0 -43
- package/lib/android/app/src/test/java/com/reactnativenavigation/viewcontrollers/stack/TopBarButtonControllerTest.java +0 -120
- package/lib/android/app/src/test/java/com/reactnativenavigation/viewcontrollers/stack/TopBarControllerTest.kt +0 -432
- package/lib/android/app/src/test/java/com/reactnativenavigation/viewcontrollers/toptabs/TopTabsViewControllerTest.java +0 -247
- package/lib/android/app/src/test/java/com/reactnativenavigation/viewcontrollers/viewcontroller/ViewControllerTest.java +0 -337
- package/lib/android/app/src/test/java/com/reactnativenavigation/viewcontrollers/viewcontroller/YellowBoxDelegateTest.java +0 -68
- package/lib/android/app/src/test/java/com/reactnativenavigation/views/OverlayTouchDelegateTest.java +0 -60
- package/lib/android/app/src/test/java/com/reactnativenavigation/views/TitleAndButtonsContainerTest.kt +0 -477
- package/lib/android/app/src/test/java/com/reactnativenavigation/views/TopBarTest.java +0 -82
- package/lib/android/app/src/test/java/com/reactnativenavigation/views/animations/BaseViewAnimatorTest.kt +0 -109
- package/lib/android/app/src/test/java/com/reactnativenavigation/views/animations/DefaultViewAnimatorCreatorFake.kt +0 -36
- package/lib/android/app/src/test/java/com/reactnativenavigation/views/bottomtabs/BottomTabsContainerTest.kt +0 -101
- package/lib/android/app/src/test/java/com/reactnativenavigation/views/bottomtabs/BottomTabsTest.kt +0 -40
- package/lib/android/app/src/test/resources/mockito-extensions/org.mockito.plugins.MockMaker +0 -1
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
package com.reactnativenavigation;
|
|
2
|
-
|
|
3
|
-
import android.app.Activity;
|
|
4
|
-
import android.content.Context;
|
|
5
|
-
import android.view.View;
|
|
6
|
-
import android.view.ViewGroup;
|
|
7
|
-
|
|
8
|
-
import androidx.annotation.NonNull;
|
|
9
|
-
|
|
10
|
-
import com.reactnativenavigation.mocks.TitleBarReactViewCreatorMock;
|
|
11
|
-
import com.reactnativenavigation.mocks.TopBarBackgroundViewCreatorMock;
|
|
12
|
-
import com.reactnativenavigation.mocks.TitleBarButtonCreatorMock;
|
|
13
|
-
import com.reactnativenavigation.mocks.TypefaceLoaderMock;
|
|
14
|
-
import com.reactnativenavigation.options.Options;
|
|
15
|
-
import com.reactnativenavigation.options.params.Bool;
|
|
16
|
-
import com.reactnativenavigation.utils.RenderChecker;
|
|
17
|
-
import com.reactnativenavigation.viewcontrollers.stack.StackPresenter;
|
|
18
|
-
import com.reactnativenavigation.react.events.EventEmitter;
|
|
19
|
-
import com.reactnativenavigation.utils.CompatUtils;
|
|
20
|
-
import com.reactnativenavigation.utils.ImageLoader;
|
|
21
|
-
import com.reactnativenavigation.utils.UiUtils;
|
|
22
|
-
import com.reactnativenavigation.viewcontrollers.child.ChildControllersRegistry;
|
|
23
|
-
import com.reactnativenavigation.viewcontrollers.viewcontroller.ViewController;
|
|
24
|
-
import com.reactnativenavigation.viewcontrollers.stack.topbar.button.IconResolver;
|
|
25
|
-
import com.reactnativenavigation.viewcontrollers.stack.StackControllerBuilder;
|
|
26
|
-
import com.reactnativenavigation.viewcontrollers.stack.topbar.TopBarController;
|
|
27
|
-
import com.reactnativenavigation.views.stack.StackLayout;
|
|
28
|
-
import com.reactnativenavigation.views.stack.topbar.TopBar;
|
|
29
|
-
|
|
30
|
-
import org.mockito.Mockito;
|
|
31
|
-
|
|
32
|
-
public class TestUtils {
|
|
33
|
-
public static StackControllerBuilder newStackController(Activity activity) {
|
|
34
|
-
TopBarController topBarController = new TopBarController() {
|
|
35
|
-
@Override
|
|
36
|
-
protected TopBar createTopBar(@NonNull Context context, @NonNull StackLayout stackLayout) {
|
|
37
|
-
TopBar topBar = super.createTopBar(context, stackLayout);
|
|
38
|
-
topBar.layout(0, 0, 1000, UiUtils.getTopBarHeight(context));
|
|
39
|
-
return topBar;
|
|
40
|
-
}
|
|
41
|
-
};
|
|
42
|
-
return new StackControllerBuilder(activity, Mockito.mock(EventEmitter.class))
|
|
43
|
-
.setId("stack" + CompatUtils.generateViewId())
|
|
44
|
-
.setChildRegistry(new ChildControllersRegistry())
|
|
45
|
-
.setTopBarController(topBarController)
|
|
46
|
-
.setStackPresenter(new StackPresenter(activity, new TitleBarReactViewCreatorMock(), new TopBarBackgroundViewCreatorMock(), new TitleBarButtonCreatorMock(), new IconResolver(activity, new ImageLoader()), new TypefaceLoaderMock(), new RenderChecker(), new Options()))
|
|
47
|
-
.setInitialOptions(new Options());
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
public static void hideBackButton(ViewController<?> viewController) {
|
|
51
|
-
viewController.options.topBar.buttons.back.visible = new Bool(false);
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
public static <T extends View> T spyOn(T child) {
|
|
55
|
-
ViewGroup parent = (ViewGroup) child.getParent();
|
|
56
|
-
int indexOf = parent.indexOfChild(child);
|
|
57
|
-
parent.removeView(child);
|
|
58
|
-
T spy = Mockito.spy(child);
|
|
59
|
-
parent.addView(spy, indexOf);
|
|
60
|
-
return spy;
|
|
61
|
-
}
|
|
62
|
-
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
package com.reactnativenavigation.fakes
|
|
2
|
-
|
|
3
|
-
import android.app.Activity
|
|
4
|
-
import com.reactnativenavigation.mocks.ImageLoaderMock
|
|
5
|
-
import com.reactnativenavigation.utils.ImageLoader
|
|
6
|
-
import com.reactnativenavigation.viewcontrollers.stack.topbar.button.IconResolver
|
|
7
|
-
|
|
8
|
-
class IconResolverFake(activity: Activity, imageLoader: ImageLoader = ImageLoaderMock.mock()) : IconResolver(activity, imageLoader)
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
package com.reactnativenavigation.mocks;
|
|
2
|
-
|
|
3
|
-
import android.graphics.Canvas;
|
|
4
|
-
import android.graphics.ColorFilter;
|
|
5
|
-
import android.graphics.drawable.Drawable;
|
|
6
|
-
|
|
7
|
-
import androidx.annotation.NonNull;
|
|
8
|
-
import androidx.annotation.Nullable;
|
|
9
|
-
|
|
10
|
-
public class BackDrawable extends Drawable {
|
|
11
|
-
@Override
|
|
12
|
-
public void draw(@NonNull Canvas canvas) {
|
|
13
|
-
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
@Override
|
|
17
|
-
public void setAlpha(int alpha) {
|
|
18
|
-
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
@Override
|
|
22
|
-
public void setColorFilter(@Nullable ColorFilter colorFilter) {
|
|
23
|
-
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
@Override
|
|
27
|
-
public int getOpacity() {
|
|
28
|
-
return 0;
|
|
29
|
-
}
|
|
30
|
-
}
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
package com.reactnativenavigation.mocks
|
|
2
|
-
|
|
3
|
-
import android.graphics.Canvas
|
|
4
|
-
import android.graphics.ColorFilter
|
|
5
|
-
import android.graphics.drawable.Drawable
|
|
6
|
-
|
|
7
|
-
import com.reactnativenavigation.utils.ImageLoader
|
|
8
|
-
import com.reactnativenavigation.utils.ImageLoader.ImagesLoadingListener
|
|
9
|
-
import org.mockito.Mockito.doAnswer
|
|
10
|
-
import org.mockito.kotlin.any
|
|
11
|
-
import org.mockito.kotlin.mock
|
|
12
|
-
import org.mockito.kotlin.whenever
|
|
13
|
-
import java.util.*
|
|
14
|
-
|
|
15
|
-
object ImageLoaderMock {
|
|
16
|
-
val mockDrawable: Drawable = object : Drawable() {
|
|
17
|
-
override fun draw(canvas: Canvas) {}
|
|
18
|
-
override fun setAlpha(alpha: Int) {}
|
|
19
|
-
override fun setColorFilter(colorFilter: ColorFilter?) {}
|
|
20
|
-
override fun getOpacity(): Int {
|
|
21
|
-
return 0
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
private val backIcon: Drawable = BackDrawable()
|
|
25
|
-
|
|
26
|
-
@JvmStatic
|
|
27
|
-
fun mock(): ImageLoader {
|
|
28
|
-
return this.mock(mockDrawable)
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
@JvmStatic
|
|
32
|
-
fun mock(returnDrawable: Drawable = mockDrawable): ImageLoader {
|
|
33
|
-
val imageLoader = mock<ImageLoader>()
|
|
34
|
-
doAnswer { invocation ->
|
|
35
|
-
val urlCount = (invocation.arguments[1] as Collection<*>).size
|
|
36
|
-
val drawables = Collections.nCopies(urlCount, returnDrawable)
|
|
37
|
-
(invocation.arguments[2] as ImagesLoadingListener).onComplete(drawables)
|
|
38
|
-
null
|
|
39
|
-
}.`when`(imageLoader).loadIcons(any(), any(), any())
|
|
40
|
-
|
|
41
|
-
doAnswer { invocation ->
|
|
42
|
-
(invocation.arguments[2] as ImagesLoadingListener).onComplete(returnDrawable)
|
|
43
|
-
null
|
|
44
|
-
}.`when`(imageLoader).loadIcon(any(), any(), any())
|
|
45
|
-
|
|
46
|
-
whenever(imageLoader.getBackButtonIcon(any())).thenReturn(backIcon)
|
|
47
|
-
return imageLoader
|
|
48
|
-
}
|
|
49
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
package com.reactnativenavigation.mocks
|
|
2
|
-
|
|
3
|
-
import android.view.ViewGroup
|
|
4
|
-
|
|
5
|
-
import com.reactnativenavigation.options.Options
|
|
6
|
-
import com.reactnativenavigation.viewcontrollers.viewcontroller.ViewController
|
|
7
|
-
import org.mockito.kotlin.mock
|
|
8
|
-
import org.mockito.kotlin.whenever
|
|
9
|
-
|
|
10
|
-
object Mocks {
|
|
11
|
-
fun viewController(): ViewController<*> {
|
|
12
|
-
val mock = mock<ViewController<*>>()
|
|
13
|
-
whenever(mock.resolveCurrentOptions()).thenReturn(Options.EMPTY)
|
|
14
|
-
val view = mock<ViewGroup>()
|
|
15
|
-
whenever(mock.view).thenReturn(view)
|
|
16
|
-
return mock
|
|
17
|
-
}
|
|
18
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
package com.reactnativenavigation.mocks;
|
|
2
|
-
|
|
3
|
-
import android.app.*;
|
|
4
|
-
|
|
5
|
-
import com.reactnativenavigation.options.*;
|
|
6
|
-
import com.reactnativenavigation.viewcontrollers.component.ComponentPresenter;
|
|
7
|
-
import com.reactnativenavigation.viewcontrollers.viewcontroller.Presenter;
|
|
8
|
-
import com.reactnativenavigation.viewcontrollers.child.ChildControllersRegistry;
|
|
9
|
-
import com.reactnativenavigation.viewcontrollers.component.ComponentViewController;
|
|
10
|
-
|
|
11
|
-
public class SimpleComponentViewController extends ComponentViewController {
|
|
12
|
-
public SimpleComponentViewController(Activity activity, ChildControllersRegistry childRegistry, String id, Options initialOptions) {
|
|
13
|
-
super(activity, childRegistry,id, "theComponentName", new TestComponentViewCreator(), initialOptions, new Presenter(activity, new Options()), new ComponentPresenter(Options.EMPTY));
|
|
14
|
-
}
|
|
15
|
-
}
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
package com.reactnativenavigation.mocks;
|
|
2
|
-
|
|
3
|
-
import android.content.Context;
|
|
4
|
-
import android.view.MotionEvent;
|
|
5
|
-
import android.view.ViewGroup;
|
|
6
|
-
import android.widget.FrameLayout;
|
|
7
|
-
import android.widget.RelativeLayout;
|
|
8
|
-
|
|
9
|
-
import com.reactnativenavigation.viewcontrollers.viewcontroller.ScrollEventListener;
|
|
10
|
-
import com.reactnativenavigation.viewcontrollers.viewcontroller.IReactView;
|
|
11
|
-
|
|
12
|
-
public class SimpleOverlay extends RelativeLayout implements IReactView {
|
|
13
|
-
public SimpleOverlay(Context context) {
|
|
14
|
-
super(context);
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
@Override
|
|
18
|
-
public boolean isReady() {
|
|
19
|
-
return true;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
@Override
|
|
23
|
-
public ViewGroup asView() {
|
|
24
|
-
FrameLayout root = new FrameLayout(getContext());
|
|
25
|
-
FrameLayout overlay = new FrameLayout(getContext());
|
|
26
|
-
root.addView(overlay);
|
|
27
|
-
return root;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
@Override
|
|
31
|
-
public void destroy() {
|
|
32
|
-
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
@Override
|
|
36
|
-
public void sendOnNavigationButtonPressed(String buttonId) {
|
|
37
|
-
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
@Override
|
|
41
|
-
public ScrollEventListener getScrollEventListener() {
|
|
42
|
-
return null;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
@Override
|
|
46
|
-
public void dispatchTouchEventToJs(MotionEvent event) {
|
|
47
|
-
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
@Override
|
|
51
|
-
public boolean isRendered() {
|
|
52
|
-
return getChildCount() >= 1;
|
|
53
|
-
}
|
|
54
|
-
}
|
package/lib/android/app/src/test/java/com/reactnativenavigation/mocks/SimpleViewController.java
DELETED
|
@@ -1,113 +0,0 @@
|
|
|
1
|
-
package com.reactnativenavigation.mocks;
|
|
2
|
-
|
|
3
|
-
import android.app.Activity;
|
|
4
|
-
import android.content.Context;
|
|
5
|
-
import android.view.MotionEvent;
|
|
6
|
-
|
|
7
|
-
import androidx.annotation.NonNull;
|
|
8
|
-
|
|
9
|
-
import com.facebook.react.ReactInstanceManager;
|
|
10
|
-
import com.reactnativenavigation.options.Options;
|
|
11
|
-
import com.reactnativenavigation.react.ReactView;
|
|
12
|
-
import com.reactnativenavigation.viewcontrollers.child.ChildController;
|
|
13
|
-
import com.reactnativenavigation.viewcontrollers.child.ChildControllersRegistry;
|
|
14
|
-
import com.reactnativenavigation.viewcontrollers.component.ComponentPresenterBase;
|
|
15
|
-
import com.reactnativenavigation.viewcontrollers.viewcontroller.Presenter;
|
|
16
|
-
import com.reactnativenavigation.viewcontrollers.viewcontroller.ScrollEventListener;
|
|
17
|
-
import com.reactnativenavigation.views.component.ReactComponent;
|
|
18
|
-
|
|
19
|
-
import org.mockito.Mockito;
|
|
20
|
-
|
|
21
|
-
import static com.reactnativenavigation.utils.ObjectUtils.perform;
|
|
22
|
-
|
|
23
|
-
public class SimpleViewController extends ChildController<SimpleViewController.SimpleView> {
|
|
24
|
-
private final ComponentPresenterBase presenter = new ComponentPresenterBase();
|
|
25
|
-
|
|
26
|
-
public SimpleViewController(Activity activity, ChildControllersRegistry childRegistry, String id, Options options) {
|
|
27
|
-
this(activity, childRegistry, id, new Presenter(activity, new Options()), options);
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
public SimpleViewController(Activity activity, ChildControllersRegistry childRegistry, String id, Presenter presenter, Options options) {
|
|
31
|
-
super(activity, childRegistry, id, presenter, options);
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
@Override
|
|
35
|
-
public SimpleView createView() {
|
|
36
|
-
return new SimpleView(getActivity());
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
@Override
|
|
40
|
-
public void sendOnNavigationButtonPressed(String buttonId) {
|
|
41
|
-
getView().sendOnNavigationButtonPressed(buttonId);
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
@Override
|
|
45
|
-
public void destroy() {
|
|
46
|
-
if (!isDestroyed()) performOnParentController(parent -> parent.onChildDestroyed(this));
|
|
47
|
-
super.destroy();
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
@NonNull
|
|
51
|
-
@Override
|
|
52
|
-
public String toString() {
|
|
53
|
-
return "SimpleViewController " + getId();
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
@Override
|
|
57
|
-
public int getTopInset() {
|
|
58
|
-
int statusBarInset = resolveCurrentOptions().statusBar.isHiddenOrDrawBehind() ? 0 : 63;
|
|
59
|
-
return statusBarInset + perform(getParentController(), 0, p -> p.getTopInset(this));
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
@Override
|
|
63
|
-
public void applyBottomInset() {
|
|
64
|
-
if (view != null) presenter.applyBottomInset(view, getBottomInset());
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
@Override
|
|
68
|
-
public String getCurrentComponentName() {
|
|
69
|
-
return null;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
public static class SimpleView extends ReactView implements ReactComponent {
|
|
73
|
-
|
|
74
|
-
public SimpleView(@NonNull Context context) {
|
|
75
|
-
super(context, Mockito.mock(ReactInstanceManager.class), "compId", "compName");
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
@Override
|
|
79
|
-
public boolean isRendered() {
|
|
80
|
-
return getChildCount() >= 1;
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
@Override
|
|
84
|
-
public boolean isReady() {
|
|
85
|
-
return false;
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
@Override
|
|
89
|
-
public ReactView asView() {
|
|
90
|
-
return this;
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
@Override
|
|
94
|
-
public void destroy() {
|
|
95
|
-
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
@Override
|
|
99
|
-
public void sendOnNavigationButtonPressed(String buttonId) {
|
|
100
|
-
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
@Override
|
|
104
|
-
public ScrollEventListener getScrollEventListener() {
|
|
105
|
-
return null;
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
@Override
|
|
109
|
-
public void dispatchTouchEventToJs(MotionEvent event) {
|
|
110
|
-
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
}
|
package/lib/android/app/src/test/java/com/reactnativenavigation/mocks/TestComponentLayout.java
DELETED
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
package com.reactnativenavigation.mocks;
|
|
2
|
-
|
|
3
|
-
import android.content.Context;
|
|
4
|
-
import android.view.MotionEvent;
|
|
5
|
-
import android.view.ViewGroup;
|
|
6
|
-
|
|
7
|
-
import androidx.annotation.NonNull;
|
|
8
|
-
|
|
9
|
-
import com.reactnativenavigation.options.ButtonOptions;
|
|
10
|
-
import com.reactnativenavigation.viewcontrollers.viewcontroller.ScrollEventListener;
|
|
11
|
-
import com.reactnativenavigation.options.Options;
|
|
12
|
-
import com.reactnativenavigation.react.ReactView;
|
|
13
|
-
import com.reactnativenavigation.react.events.ComponentType;
|
|
14
|
-
import com.reactnativenavigation.viewcontrollers.stack.topbar.button.ButtonController;
|
|
15
|
-
import com.reactnativenavigation.views.component.ComponentLayout;
|
|
16
|
-
|
|
17
|
-
public class TestComponentLayout extends ComponentLayout implements ButtonController.OnClickListener {
|
|
18
|
-
|
|
19
|
-
private ReactView reactView;
|
|
20
|
-
|
|
21
|
-
public TestComponentLayout(final Context context, ReactView reactView) {
|
|
22
|
-
super(context, reactView);
|
|
23
|
-
this.reactView = reactView;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
@Override
|
|
27
|
-
public boolean isReady() {
|
|
28
|
-
return false;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
@Override
|
|
32
|
-
public ViewGroup asView() {
|
|
33
|
-
return this;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
@Override
|
|
37
|
-
public void destroy() {
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
@Override
|
|
41
|
-
public void sendComponentWillStart() {
|
|
42
|
-
reactView.sendComponentStart(ComponentType.Component);
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
@Override
|
|
46
|
-
public void sendComponentStart() {
|
|
47
|
-
reactView.sendComponentStart(ComponentType.Component);
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
@Override
|
|
51
|
-
public void sendComponentStop() {
|
|
52
|
-
reactView.sendComponentStop(ComponentType.Component);
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
@Override
|
|
56
|
-
public void applyOptions(Options options) {
|
|
57
|
-
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
@Override
|
|
61
|
-
public void sendOnNavigationButtonPressed(String id) {
|
|
62
|
-
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
@Override
|
|
66
|
-
public ScrollEventListener getScrollEventListener() {
|
|
67
|
-
return null;
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
@Override
|
|
71
|
-
public void dispatchTouchEventToJs(MotionEvent event) {
|
|
72
|
-
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
@Override
|
|
76
|
-
public void onPress(@NonNull ButtonOptions button) {
|
|
77
|
-
|
|
78
|
-
}
|
|
79
|
-
}
|
package/lib/android/app/src/test/java/com/reactnativenavigation/mocks/TestComponentViewCreator.java
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
package com.reactnativenavigation.mocks;
|
|
2
|
-
|
|
3
|
-
import android.app.Activity;
|
|
4
|
-
|
|
5
|
-
import com.reactnativenavigation.react.ReactView;
|
|
6
|
-
import com.reactnativenavigation.viewcontrollers.viewcontroller.ReactViewCreator;
|
|
7
|
-
import com.reactnativenavigation.views.component.ComponentLayout;
|
|
8
|
-
import com.reactnativenavigation.views.component.ReactComponent;
|
|
9
|
-
|
|
10
|
-
import static org.mockito.Mockito.spy;
|
|
11
|
-
|
|
12
|
-
public class TestComponentViewCreator implements ReactViewCreator {
|
|
13
|
-
@Override
|
|
14
|
-
public ReactComponent create(final Activity activity, final String componentId, final String componentName) {
|
|
15
|
-
ReactView reactView = spy(new TestReactView(activity));
|
|
16
|
-
return new ComponentLayout(activity, reactView);
|
|
17
|
-
}
|
|
18
|
-
}
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
package com.reactnativenavigation.mocks;
|
|
2
|
-
|
|
3
|
-
import android.content.Context;
|
|
4
|
-
import android.os.Bundle;
|
|
5
|
-
import android.view.MotionEvent;
|
|
6
|
-
|
|
7
|
-
import com.facebook.react.ReactInstanceManager;
|
|
8
|
-
import com.reactnativenavigation.viewcontrollers.viewcontroller.ScrollEventListener;
|
|
9
|
-
import com.reactnativenavigation.react.ReactView;
|
|
10
|
-
import com.reactnativenavigation.react.events.ComponentType;
|
|
11
|
-
import com.reactnativenavigation.viewcontrollers.viewcontroller.IReactView;
|
|
12
|
-
|
|
13
|
-
import androidx.annotation.NonNull;
|
|
14
|
-
import androidx.annotation.Nullable;
|
|
15
|
-
|
|
16
|
-
public class TestReactView extends ReactView implements IReactView {
|
|
17
|
-
|
|
18
|
-
public TestReactView(@NonNull Context context) {
|
|
19
|
-
super(context, null, "", "");
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
@Override
|
|
23
|
-
public void startReactApplication(ReactInstanceManager reactInstanceManager, String moduleName, @Nullable Bundle initialProperties, @Nullable String initialUITemplate) {
|
|
24
|
-
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
@Override
|
|
28
|
-
public void sendComponentWillStart(ComponentType type) {
|
|
29
|
-
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
@Override
|
|
33
|
-
public void sendComponentStart(ComponentType type) {
|
|
34
|
-
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
@Override
|
|
38
|
-
public void sendComponentStop(ComponentType type) {
|
|
39
|
-
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
@Override
|
|
43
|
-
public boolean isReady() {
|
|
44
|
-
return false;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
@Override
|
|
48
|
-
public void destroy() {
|
|
49
|
-
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
@Override
|
|
53
|
-
public void sendOnNavigationButtonPressed(String buttonId) {
|
|
54
|
-
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
@Override
|
|
58
|
-
public ScrollEventListener getScrollEventListener() {
|
|
59
|
-
return null;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
@Override
|
|
63
|
-
public void dispatchTouchEventToJs(MotionEvent event) {
|
|
64
|
-
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
@Override
|
|
68
|
-
public boolean isRendered() {
|
|
69
|
-
return getChildCount() >= 1;
|
|
70
|
-
}
|
|
71
|
-
}
|
package/lib/android/app/src/test/java/com/reactnativenavigation/mocks/TitleBarButtonCreatorMock.java
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
package com.reactnativenavigation.mocks;
|
|
2
|
-
|
|
3
|
-
import android.app.Activity;
|
|
4
|
-
|
|
5
|
-
import com.facebook.react.ReactInstanceManager;
|
|
6
|
-
import com.reactnativenavigation.options.ComponentOptions;
|
|
7
|
-
import com.reactnativenavigation.react.events.ComponentType;
|
|
8
|
-
import com.reactnativenavigation.views.stack.topbar.titlebar.TitleBarButtonCreator;
|
|
9
|
-
import com.reactnativenavigation.views.stack.topbar.titlebar.TitleBarReactButtonView;
|
|
10
|
-
|
|
11
|
-
import static org.mockito.Mockito.mock;
|
|
12
|
-
|
|
13
|
-
public class TitleBarButtonCreatorMock extends TitleBarButtonCreator {
|
|
14
|
-
|
|
15
|
-
public TitleBarButtonCreatorMock() {
|
|
16
|
-
super(null);
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
@Override
|
|
20
|
-
public TitleBarReactButtonView create(Activity activity, ComponentOptions component) {
|
|
21
|
-
final ReactInstanceManager reactInstanceManager = mock(ReactInstanceManager.class);
|
|
22
|
-
return new TitleBarReactButtonView(activity, reactInstanceManager, component) {
|
|
23
|
-
@Override
|
|
24
|
-
public void sendComponentStart(ComponentType type) {
|
|
25
|
-
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
@Override
|
|
29
|
-
public void sendComponentStop(ComponentType type) {
|
|
30
|
-
|
|
31
|
-
}
|
|
32
|
-
};
|
|
33
|
-
}
|
|
34
|
-
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
package com.reactnativenavigation.mocks;
|
|
2
|
-
|
|
3
|
-
import android.app.Activity;
|
|
4
|
-
|
|
5
|
-
import com.facebook.react.ReactInstanceManager;
|
|
6
|
-
import com.reactnativenavigation.views.stack.topbar.titlebar.TitleBarReactView;
|
|
7
|
-
import com.reactnativenavigation.views.stack.topbar.titlebar.TitleBarReactViewCreator;
|
|
8
|
-
|
|
9
|
-
import static org.mockito.Mockito.mock;
|
|
10
|
-
|
|
11
|
-
public class TitleBarReactViewCreatorMock extends TitleBarReactViewCreator {
|
|
12
|
-
public TitleBarReactViewCreatorMock() {
|
|
13
|
-
super(mock(ReactInstanceManager.class));
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
@Override
|
|
17
|
-
public TitleBarReactView create(Activity activity, String componentId, String componentName) {
|
|
18
|
-
return new TitleBarReactView(activity, instanceManager, componentId, componentName);
|
|
19
|
-
}
|
|
20
|
-
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
package com.reactnativenavigation.mocks;
|
|
2
|
-
|
|
3
|
-
import android.app.Activity;
|
|
4
|
-
|
|
5
|
-
import com.facebook.react.ReactInstanceManager;
|
|
6
|
-
import com.reactnativenavigation.views.stack.topbar.TopBarBackgroundView;
|
|
7
|
-
import com.reactnativenavigation.views.stack.topbar.TopBarBackgroundViewCreator;
|
|
8
|
-
|
|
9
|
-
import static org.mockito.Mockito.mock;
|
|
10
|
-
|
|
11
|
-
public class TopBarBackgroundViewCreatorMock extends TopBarBackgroundViewCreator {
|
|
12
|
-
public TopBarBackgroundViewCreatorMock() {
|
|
13
|
-
super(mock(ReactInstanceManager.class));
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
@Override
|
|
17
|
-
public TopBarBackgroundView create(Activity activity, String componentId, String componentName) {
|
|
18
|
-
return new TopBarBackgroundView(activity, instanceManager, componentId, componentName);
|
|
19
|
-
}
|
|
20
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
package com.reactnativenavigation.mocks
|
|
2
|
-
|
|
3
|
-
import android.graphics.Typeface
|
|
4
|
-
import com.reactnativenavigation.options.parsers.TypefaceLoader
|
|
5
|
-
import org.mockito.kotlin.mock
|
|
6
|
-
|
|
7
|
-
class TypefaceLoaderMock() : TypefaceLoader(mock()) {
|
|
8
|
-
private var mockTypefaces: Map<String, Typeface>? = null
|
|
9
|
-
|
|
10
|
-
constructor(mockTypefaces: Map<String, Typeface>?) : this() {
|
|
11
|
-
this.mockTypefaces = mockTypefaces
|
|
12
|
-
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
override val defaultTypeFace: Typeface
|
|
16
|
-
get() = Typeface.DEFAULT
|
|
17
|
-
|
|
18
|
-
override fun getTypeFace(fontFamilyName: String?, fontStyle: String?, fontWeight: String?, defaultTypeFace: Typeface?): Typeface? {
|
|
19
|
-
return mockTypefaces?.getOrDefault(fontFamilyName, defaultTypeFace) ?: defaultTypeFace
|
|
20
|
-
}
|
|
21
|
-
}
|
package/lib/android/app/src/test/java/com/reactnativenavigation/options/LayoutNodeParserTest.java
DELETED
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
package com.reactnativenavigation.options;
|
|
2
|
-
|
|
3
|
-
import com.reactnativenavigation.*;
|
|
4
|
-
import com.reactnativenavigation.options.parsers.LayoutNodeParser;
|
|
5
|
-
|
|
6
|
-
import org.json.*;
|
|
7
|
-
import org.junit.*;
|
|
8
|
-
|
|
9
|
-
import static org.assertj.core.api.Java6Assertions.*;
|
|
10
|
-
|
|
11
|
-
public class LayoutNodeParserTest extends BaseTest {
|
|
12
|
-
@Test
|
|
13
|
-
public void dto() throws Exception {
|
|
14
|
-
LayoutNode node = new LayoutNode("the id", LayoutNode.Type.Component);
|
|
15
|
-
assertThat(node.id).isEqualTo("the id");
|
|
16
|
-
assertThat(node.type).isEqualTo(LayoutNode.Type.Component);
|
|
17
|
-
assertThat(node.data.keys()).isEmpty();
|
|
18
|
-
assertThat(node.children).isEmpty();
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
@Test
|
|
22
|
-
public void parseType() throws Exception {
|
|
23
|
-
assertThat(LayoutNode.Type.valueOf("Component")).isEqualTo(LayoutNode.Type.Component);
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
@Test(expected = RuntimeException.class)
|
|
27
|
-
public void invalidType() throws Exception {
|
|
28
|
-
LayoutNode.Type.valueOf("some type");
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
@Test
|
|
32
|
-
public void parseFromTree() throws Exception {
|
|
33
|
-
JSONObject tree = new JSONObject("{id: node1, " +
|
|
34
|
-
"type: Stack, " +
|
|
35
|
-
"data: {dataKey: dataValue}, " +
|
|
36
|
-
"children: [{id: childId1, type: Component}]}");
|
|
37
|
-
|
|
38
|
-
LayoutNode result = LayoutNodeParser.parse(tree);
|
|
39
|
-
|
|
40
|
-
assertThat(result).isNotNull();
|
|
41
|
-
assertThat(result.id).isEqualTo("node1");
|
|
42
|
-
assertThat(result.type).isEqualTo(LayoutNode.Type.Stack);
|
|
43
|
-
assertThat(result.data.length()).isEqualTo(1);
|
|
44
|
-
assertThat(result.data.getString("dataKey")).isEqualTo("dataValue");
|
|
45
|
-
assertThat(result.children).hasSize(1);
|
|
46
|
-
assertThat(result.children.get(0).id).isEqualTo("childId1");
|
|
47
|
-
assertThat(result.children.get(0).type).isEqualTo(LayoutNode.Type.Component);
|
|
48
|
-
assertThat(result.children.get(0).data.keys()).isEmpty();
|
|
49
|
-
assertThat(result.children.get(0).children).isEmpty();
|
|
50
|
-
}
|
|
51
|
-
}
|