|
@@ -1,9 +1,9 @@
|
1
|
1
|
const Root = require('./Root');
|
2
|
2
|
|
3
|
|
-const CONTAINER = { name: 'myScreen' };
|
|
3
|
+const COMPONENT = { name: 'myScreen' };
|
4
|
4
|
const SIDE_MENU = {
|
5
|
5
|
left: {
|
6
|
|
- container: {
|
|
6
|
+ component: {
|
7
|
7
|
name: 'navigation.playground.TextScreen',
|
8
|
8
|
passProps: {
|
9
|
9
|
text: 'This is a left side menu screen'
|
|
@@ -11,7 +11,7 @@ const SIDE_MENU = {
|
11
|
11
|
}
|
12
|
12
|
},
|
13
|
13
|
right: {
|
14
|
|
- container: {
|
|
14
|
+ component: {
|
15
|
15
|
name: 'navigation.playground.TextScreen',
|
16
|
16
|
passProps: {
|
17
|
17
|
text: 'This is a right side menu screen'
|
|
@@ -21,7 +21,7 @@ const SIDE_MENU = {
|
21
|
21
|
};
|
22
|
22
|
const BOTTOM_TABS = [
|
23
|
23
|
{
|
24
|
|
- container: {
|
|
24
|
+ component: {
|
25
|
25
|
name: 'navigation.playground.TextScreen',
|
26
|
26
|
passProps: {
|
27
|
27
|
text: 'This is a side menu center screen tab 1'
|
|
@@ -29,7 +29,7 @@ const BOTTOM_TABS = [
|
29
|
29
|
}
|
30
|
30
|
},
|
31
|
31
|
{
|
32
|
|
- container: {
|
|
32
|
+ component: {
|
33
|
33
|
name: 'navigation.playground.TextScreen',
|
34
|
34
|
passProps: {
|
35
|
35
|
text: 'This is a side menu center screen tab 2'
|
|
@@ -37,7 +37,7 @@ const BOTTOM_TABS = [
|
37
|
37
|
}
|
38
|
38
|
},
|
39
|
39
|
{
|
40
|
|
- container: {
|
|
40
|
+ component: {
|
41
|
41
|
name: 'navigation.playground.TextScreen',
|
42
|
42
|
passProps: {
|
43
|
43
|
text: 'This is a side menu center screen tab 3'
|
|
@@ -49,12 +49,12 @@ const BOTTOM_TABS = [
|
49
|
49
|
describe('Root', () => {
|
50
|
50
|
it('Parses Root', () => {
|
51
|
51
|
const uut = new Root(simpleRoot());
|
52
|
|
- expect(uut.container.name).toEqual(CONTAINER.name);
|
|
52
|
+ expect(uut.component.name).toEqual(COMPONENT.name);
|
53
|
53
|
});
|
54
|
54
|
|
55
|
55
|
it('parses root with sideMenu', () => {
|
56
|
56
|
const uut = new Root(rootWithSideMenu());
|
57
|
|
- expect(uut.container.name).toEqual(CONTAINER.name);
|
|
57
|
+ expect(uut.component.name).toEqual(COMPONENT.name);
|
58
|
58
|
expect(uut.sideMenu).toEqual(SIDE_MENU);
|
59
|
59
|
});
|
60
|
60
|
|
|
@@ -66,18 +66,18 @@ describe('Root', () => {
|
66
|
66
|
|
67
|
67
|
function rootWithBottomTabs() {
|
68
|
68
|
return {
|
69
|
|
- container: CONTAINER,
|
|
69
|
+ component: COMPONENT,
|
70
|
70
|
bottomTabs: BOTTOM_TABS
|
71
|
71
|
};
|
72
|
72
|
}
|
73
|
73
|
|
74
|
74
|
function simpleRoot() {
|
75
|
|
- return { container: CONTAINER };
|
|
75
|
+ return { component: COMPONENT };
|
76
|
76
|
}
|
77
|
77
|
|
78
|
78
|
function rootWithSideMenu() {
|
79
|
79
|
return {
|
80
|
|
- container: CONTAINER,
|
|
80
|
+ component: COMPONENT,
|
81
|
81
|
sideMenu: SIDE_MENU
|
82
|
82
|
};
|
83
|
83
|
}
|