Skip to content

Commit cd16ea4

Browse files
Dean OhashiDean Ohashi
authored andcommitted
resolved conflicts again
2 parents cbd91c2 + d6615dc commit cd16ea4

File tree

14 files changed

+154
-78
lines changed

14 files changed

+154
-78
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ node_modules
66
/src-cordova/node_modules
77
/src-cordova/platforms
88
/src-cordova/plugins
9-
/src-cordova/www
9+
/src-cordova/www\
10+
/test/jest/coverage
1011
npm-debug.log*
1112
yarn-debug.log*
1213
yarn-error.log*

src/store/mutations.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,13 @@ const mutations = {
207207
[types.REMOVE_ACTION_FROM_COMPONENT]: (state, payload) => {
208208
let index = state.componentMap[state.activeComponent].mapActions.indexOf(payload)
209209
state.componentMap[state.activeComponent].mapActions.splice(index, 1)
210-
210+
},
211+
[types.ADD_TO_COMPONENT_ACTIONS]: (state, payload) => {
212+
state.componentMap[state.activeComponent].componentActions.push(payload)
213+
},
214+
[types.ADD_TO_COMPONENT_STATE]: (state, payload) => {
215+
state.componentMap[state.activeComponent].componentState.push(payload)
216+
211217
},
212218
[types.ADD_USER_ACTION]: (state, payload) => {
213219
if (typeof(payload)==='string') state.userActions.push(payload);

src/store/state/index.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ const newState = {
2323
HomeView: []
2424
// NewView: []
2525
},
26+
userActions: [],
27+
userState: {},
2628
/**
2729
*
2830
*/

src/store/types.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@ export const DELETE_ROUTE = 'DELETE_ROUTE'
4343
export const DELETE_COMPONENT = 'DELETE_COMPONENT'
4444
export const DELETE_USER_ACTIONS = 'DELETE_USER_ACTIONS'
4545
export const REMOVE_ACTION_FROM_COMPONENT = 'REMOVE_ACTION_FROM_COMPONENT'
46+
export const ADD_TO_COMPONENT_ACTIONS = 'ADD_TO_COMPONENT_ACTIONS'
47+
export const ADD_TO_COMPONENT_STATE = 'ADD_TO_COMPONENT_STATE'
4648
export const ADD_USER_ACTION = 'ADD_USER_ACTION'
4749
export const ADD_TO_USER_STORE = 'ADD_TO_USER_STORE'
4850

test/jest/__tests__/App.spec.js

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,36 @@ describe('Test mutations + actions to remove action from component and userActio
3535
})
3636
})
3737

38+
describe('Adding actions and state to components', () => {
39+
let state;
40+
beforeEach(() => {
41+
state = {
42+
componentMap: {
43+
testComponent: {
44+
componentName: 'testComponent',
45+
children: [],
46+
htmlList: [],
47+
componentActions: [],
48+
componentState: []
49+
}
50+
},
51+
activeComponent: 'testComponent'
52+
}
53+
})
54+
describe('Adding actions to components', () => {
55+
it('should add a single action to active component', () => {
56+
mutations.ADD_TO_COMPONENT_ACTIONS(state, 'testAction')
57+
expect(state.componentMap[state.activeComponent].componentActions).toEqual(['testAction'])
58+
})
59+
})
60+
describe('Adding state to components', () => {
61+
it('should add a single state string to active component', () => {
62+
mutations.ADD_TO_COMPONENT_STATE(state, 'testState')
63+
expect(state.componentMap[state.activeComponent].componentState).toEqual(['testState'])
64+
})
65+
})
66+
})
67+
3868
describe('userActions mutation', () => {
3969
let actions;
4070
let store;

test/jest/coverage/clover.xml

Lines changed: 34 additions & 34 deletions
Large diffs are not rendered by default.

test/jest/coverage/coverage-final.json

Lines changed: 35 additions & 0 deletions
Large diffs are not rendered by default.

test/jest/coverage/lcov-report/src/components/CodeSnippet.vue.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -432,7 +432,7 @@ <h1>
432432
font-size: 12px;
433433
}
434434
.codesnippet-container {
435-
margin-bottom: 1rem;
435+
margin-bottom: 1rem;
436436
}
437437
::-webkit-scrollbar {
438438
display: none;

test/jest/coverage/lcov-report/src/components/ComponentDisplay.vue.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -615,7 +615,7 @@ <h1>
615615
},
616616
<span class="fstat-no" title="function not covered" > childList () {</span>
617617
<span class="cstat-no" title="statement not covered" > return this.componentMap[componentData.componentName].children</span>
618-
},
618+
},
619619
<span class="fstat-no" title="function not covered" > options () {</span>
620620
// PROBLEM: the objects on childrenmultiselectvalue are applied
621621
<span class="cstat-no" title="statement not covered" > const routes = Object.keys(this.routes)</span>

test/jest/coverage/lcov-report/src/components/Footer.vue.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -456,11 +456,11 @@ <h1>
456456
background: #11120F;
457457
}
458458
.toolbar-background {
459-
background: black;
459+
background: black;
460460
}
461461
.full-footer {
462462
// height: 100vh;
463-
padding-bottom: 0px;
463+
padding-bottom: 0px;
464464
}
465465
&lt;/style&gt;
466466
&nbsp;</pre></td></tr>

0 commit comments

Comments
 (0)