Skip to content

Commit 6acc760

Browse files
committed
actionContainer test passing
1 parent ca084a3 commit 6acc760

File tree

2 files changed

+23
-9
lines changed

2 files changed

+23
-9
lines changed

src/app/__tests__/actionContainer.test.js

Lines changed: 23 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,36 +20,52 @@ const state = {
2020
branch: 0,
2121
stateSnapshot: {
2222
state: {},
23-
children: [],
23+
children: [{
24+
state: { test: 'test' },
25+
name: 'App',
26+
componentData: { actualDuration: 3.5 },
27+
}],
2428
},
2529
children: [{
2630
index: 1,
2731
name: 2,
2832
branch: 0,
2933
stateSnapshot: {
3034
state: {},
31-
children: [],
35+
children: [{
36+
state: { test: 'test' },
37+
name: 'App',
38+
componentData: { actualDuration: 3.5 },
39+
}],
3240
},
3341
children: [{
3442
index: 2,
3543
name: 3,
3644
branch: 0,
3745
stateSnapshot: {
3846
state: {},
39-
children: [],
47+
children: [{
48+
state: { test: 'test' },
49+
name: 'App',
50+
componentData: { actualDuration: 3.5 },
51+
}],
4052
},
4153
children: [{
4254
index: 3,
4355
name: 4,
4456
branch: 0,
4557
stateSnapshot: {
4658
state: {},
47-
children: [],
59+
children: [{
60+
state: { test: 'test' },
61+
name: 'App',
62+
componentData: { actualDuration: 3.5 },
63+
}],
4864
},
4965
children: [],
50-
}]
51-
}]
52-
}]
66+
}],
67+
}],
68+
}],
5369
},
5470
sliderIndex: 0,
5571
viewIndex: -1,
@@ -83,6 +99,5 @@ describe('testing the emptySnapshot button', () => {
8399
});
84100

85101
test('number of actions should reflect snapshots array', () => {
86-
console.log(wrapper)
87102
expect(wrapper.find(Action).length).toBe(state.tabs[state.currentTab].snapshots.length);
88103
});

src/app/containers/ActionContainer.jsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ function ActionContainer() {
2121

2222
// gabi and nate :: delete function to traverse state from snapshots, now we are tranversing state from hiararchy and alsog getting infromation on display name and component name
2323
const displayArray = obj => {
24-
2524
if (obj.stateSnapshot.children.length > 0 && obj.stateSnapshot.children[0] && obj.stateSnapshot.children[0].state && obj.stateSnapshot.children[0].name) {
2625
const newObj = {
2726
index: obj.index,

0 commit comments

Comments
 (0)