|
@@ -13,21 +13,21 @@ describe('LayoutTreeCrawler', () => {
|
13
|
13
|
});
|
14
|
14
|
|
15
|
15
|
it('crawls a layout tree and adds unique id to each node', () => {
|
16
|
|
- const node = { type: LayoutTypes.Container, children: [{ type: LayoutTypes.Tabs }] };
|
|
16
|
+ const node = { type: LayoutTypes.Container, children: [{ type: LayoutTypes.BottomTabs }] };
|
17
|
17
|
uut.crawl(node);
|
18
|
18
|
expect(node.id).toEqual('Container+UNIQUE_ID');
|
19
|
|
- expect(node.children[0].id).toEqual('Tabs+UNIQUE_ID');
|
|
19
|
+ expect(node.children[0].id).toEqual('BottomTabs+UNIQUE_ID');
|
20
|
20
|
});
|
21
|
21
|
|
22
|
22
|
it('crawls a layout tree and ensures data exists', () => {
|
23
|
|
- const node = { type: LayoutTypes.Container, children: [{ type: LayoutTypes.Tabs }] };
|
|
23
|
+ const node = { type: LayoutTypes.Container, children: [{ type: LayoutTypes.BottomTabs }] };
|
24
|
24
|
uut.crawl(node);
|
25
|
25
|
expect(node.data).toEqual({});
|
26
|
26
|
expect(node.children[0].data).toEqual({});
|
27
|
27
|
});
|
28
|
28
|
|
29
|
29
|
it('crawls a layout tree and ensures children exists', () => {
|
30
|
|
- const node = { type: LayoutTypes.Container, children: [{ type: LayoutTypes.Tabs }] };
|
|
30
|
+ const node = { type: LayoutTypes.Container, children: [{ type: LayoutTypes.BottomTabs }] };
|
31
|
31
|
uut.crawl(node);
|
32
|
32
|
expect(node.children[0].children).toEqual([]);
|
33
|
33
|
});
|
|
@@ -38,7 +38,7 @@ describe('LayoutTreeCrawler', () => {
|
38
|
38
|
});
|
39
|
39
|
|
40
|
40
|
it('saves passProps into store for Container nodes', () => {
|
41
|
|
- const node = { type: LayoutTypes.Tabs, children: [{ type: LayoutTypes.Container, data: { passProps: { myProp: 123 } } }] };
|
|
41
|
+ const node = { type: LayoutTypes.BottomTabs, children: [{ type: LayoutTypes.Container, data: { passProps: { myProp: 123 } } }] };
|
42
|
42
|
expect(store.getPropsForContainerId('Container+UNIQUE_ID')).toEqual({});
|
43
|
43
|
uut.crawl(node);
|
44
|
44
|
expect(store.getPropsForContainerId('Container+UNIQUE_ID')).toEqual({ myProp: 123 });
|