diff --git a/test/specs/dom_components/model/Symbols.js b/test/specs/dom_components/model/Symbols.js
index ea1f2ddf3..211b9e202 100644
--- a/test/specs/dom_components/model/Symbols.js
+++ b/test/specs/dom_components/model/Symbols.js
@@ -15,11 +15,18 @@ describe('Symbols', () => {
return cloned;
};
const simpleComp = '
Component
';
+ const simpleComp2 = 'Component 2
';
const compMultipleNodes = ``;
+ let allInst, all, comp, symbol, compInitChild;
+ let secComp;
+ const getInnerComp = (cmp, i = 0) => cmp.components().at(i);
+ const getFirstInnSymbol = cmp => getInnerComp(cmp).__getSymbol();
+ const getInnSymbol = (cmp, i = 0) => getInnerComp(cmp, i).__getSymbol();
+
beforeAll(() => {
editor = new Editor();
wrapper = editor.getWrapper();
@@ -124,19 +131,6 @@ describe('Symbols', () => {
});
describe('Creating 3 symbols in the wrapper', () => {
- let allInst, all, comp, symbol, compInitChild;
- const getInnerComp = (cmp, i = 0) => cmp.components().at(i);
- const getFirstInnSymbol = cmp =>
- cmp
- .components()
- .at(0)
- .__getSymbol();
- const getInnSymbol = (cmp, i = 0) =>
- cmp
- .components()
- .at(i)
- .__getSymbol();
-
beforeEach(() => {
comp = wrapper.append(compMultipleNodes)[0];
compInitChild = comp.components().length;
@@ -287,4 +281,22 @@ describe('Symbols', () => {
expect(clonedSymb.__getSymbols()).toEqual(innerSymb);
});
});
+
+ describe('Nested symbols', () => {
+ beforeEach(() => {
+ comp = wrapper.append(compMultipleNodes)[0];
+ compInitChild = comp.components().length;
+ symbol = createSymbol(comp);
+ const comp2 = createSymbol(comp);
+ const comp3 = createSymbol(comp);
+ allInst = [comp, comp2, comp3];
+ all = [...allInst, symbol];
+ // For the second symbol
+ secComp = wrapper.append(simpleComp2)[0];
+ });
+
+ afterEach(() => {
+ wrapper.components().reset();
+ });
+ });
});