Skip to content

Commit 7f42069

Browse files
atvanekrachelk585MatteoDitersophia-bui
committed
Added customization panel test
Co-authored-by: rachelk585 <[email protected]> Co-authored-by: Matteo <[email protected]> Co-authored-by: Sophia Bui <[email protected]>
1 parent f33a813 commit 7f42069

File tree

1 file changed

+54
-0
lines changed

1 file changed

+54
-0
lines changed

__tests__/BottomTabs.test.tsx

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,40 @@ import store from '../app/src/redux/store';
88
import ComponentPanel from '../app/src/components/right/ComponentPanel';
99
import HTMLPanel from '../app/src/components/left/HTMLPanel';
1010
import StateManager from '../app/src/components/StateManagement/StateManagement';
11+
import CustomizationPanel from '../app/src/containers/CustomizationPanel';
12+
import { BrowserRouter } from 'react-router-dom';
13+
14+
15+
// newState.appState.components[0].children = [
16+
// {
17+
// type: 'HTML Element',
18+
// typeId: 1000,
19+
// name: 'separator',
20+
// childId: 1000,
21+
// style: {
22+
// border: 'none'
23+
// },
24+
// attributes: {},
25+
// events: {},
26+
// children: [],
27+
// stateProps: [],
28+
// passedInProps: []
29+
// },
30+
// {
31+
// type: 'HTML Element',
32+
// typeId: 11,
33+
// name: 'div',
34+
// childId: 1,
35+
// style: {},
36+
// attributes: {},
37+
// events: {},
38+
// children: [],
39+
// stateProps: [],
40+
// passedInProps: []
41+
// }
42+
// ];
43+
44+
// newState.canvasFocus.childId = 1;
1145

1246
describe('Bottom Panel Render Test', () => {
1347
test('should render all seven tabs', () => {
@@ -145,3 +179,23 @@ describe('State Manager', () => {
145179
expect(screen.getAllByRole('columnheader')).toHaveLength(9);
146180
});
147181
});
182+
183+
describe('Customization Panel', () => {
184+
test('Should render customization container with no elements added', () => {
185+
render(
186+
<Provider store={store}>
187+
<BrowserRouter>
188+
<CustomizationPanel />
189+
</BrowserRouter>
190+
</Provider>
191+
);
192+
console.log(store.appState);
193+
expect(screen.getByText('Parent Component:')).toBeInTheDocument();
194+
expect(screen.getByText('App')).toBeInTheDocument();
195+
expect(
196+
screen.getByText(
197+
'Drag and drop an html element (or focus one) to see what happens!'
198+
)
199+
).toBeInTheDocument();
200+
});
201+
});

0 commit comments

Comments
 (0)