|
@@ -9,6 +9,23 @@ describe('LayoutTreeParser', () => {
|
9
|
9
|
uut = new LayoutTreeParser(uniqueIdProvider);
|
10
|
10
|
});
|
11
|
11
|
|
|
12
|
+ it('adds uniqueId to containers', () => {
|
|
13
|
+ const input = { container: {} };
|
|
14
|
+ expect(uut.parseFromSimpleJSON(input))
|
|
15
|
+ .toEqual({
|
|
16
|
+ type: 'ContainerStack',
|
|
17
|
+ id: 'ContainerStack+UNIQUE_ID',
|
|
18
|
+ children: [
|
|
19
|
+ {
|
|
20
|
+ type: 'Container',
|
|
21
|
+ id: 'Container+UNIQUE_ID',
|
|
22
|
+ data: {},
|
|
23
|
+ children: []
|
|
24
|
+ }
|
|
25
|
+ ]
|
|
26
|
+ });
|
|
27
|
+ });
|
|
28
|
+
|
12
|
29
|
it('parses single screen', () => {
|
13
|
30
|
expect(uut.parseFromSimpleJSON(SimpleLayouts.singleScreenApp))
|
14
|
31
|
.toEqual({
|
|
@@ -107,11 +124,6 @@ describe('LayoutTreeParser', () => {
|
107
|
124
|
});
|
108
|
125
|
});
|
109
|
126
|
|
110
|
|
- xit('adds uniqueId to containers', () => {
|
111
|
|
- const input = { container: {} };
|
112
|
|
- expect(uut.parse(input)).toEqual({ container: { id: 'Container+UNIQUE_ID' } });
|
113
|
|
- });
|
114
|
|
-
|
115
|
127
|
xit('parses side menus', () => {
|
116
|
128
|
//const result2 = {
|
117
|
129
|
// type: 'Menus',
|