Commit b1ce5132 authored by Scott Stern's avatar Scott Stern Committed by Frédéric Caplette

Remove isSwimlanesOn from board_card.vue

parent 3e1346f9
<script> <script>
import { mapActions, mapGetters, mapState } from 'vuex'; import { mapActions, mapState } from 'vuex';
import BoardCardInner from './board_card_inner.vue'; import BoardCardInner from './board_card_inner.vue';
export default { export default {
...@@ -31,7 +31,6 @@ export default { ...@@ -31,7 +31,6 @@ export default {
}, },
computed: { computed: {
...mapState(['selectedBoardItems', 'activeId']), ...mapState(['selectedBoardItems', 'activeId']),
...mapGetters(['isSwimlanesOn']),
isActive() { isActive() {
return this.item.id === this.activeId; return this.item.id === this.activeId;
}, },
......
...@@ -15,7 +15,7 @@ describe('Board card', () => { ...@@ -15,7 +15,7 @@ describe('Board card', () => {
const localVue = createLocalVue(); const localVue = createLocalVue();
localVue.use(Vuex); localVue.use(Vuex);
const createStore = ({ initialState = {}, isSwimlanesOn = false } = {}) => { const createStore = ({ initialState = {} } = {}) => {
mockActions = { mockActions = {
toggleBoardItem: jest.fn(), toggleBoardItem: jest.fn(),
toggleBoardItemMultiSelection: jest.fn(), toggleBoardItemMultiSelection: jest.fn(),
...@@ -30,7 +30,6 @@ describe('Board card', () => { ...@@ -30,7 +30,6 @@ describe('Board card', () => {
}, },
actions: mockActions, actions: mockActions,
getters: { getters: {
isSwimlanesOn: () => isSwimlanesOn,
isEpicBoard: () => false, isEpicBoard: () => false,
}, },
}); });
...@@ -90,12 +89,8 @@ describe('Board card', () => { ...@@ -90,12 +89,8 @@ describe('Board card', () => {
}); });
}); });
describe.each`
isSwimlanesOn
${true} | ${false}
`('when isSwimlanesOn is $isSwimlanesOn', ({ isSwimlanesOn }) => {
it('should not highlight the card by default', async () => { it('should not highlight the card by default', async () => {
createStore({ isSwimlanesOn }); createStore();
mountComponent(); mountComponent();
expect(wrapper.classes()).not.toContain('is-active'); expect(wrapper.classes()).not.toContain('is-active');
...@@ -107,7 +102,6 @@ describe('Board card', () => { ...@@ -107,7 +102,6 @@ describe('Board card', () => {
initialState: { initialState: {
activeId: mockIssue.id, activeId: mockIssue.id,
}, },
isSwimlanesOn,
}); });
mountComponent(); mountComponent();
...@@ -121,7 +115,6 @@ describe('Board card', () => { ...@@ -121,7 +115,6 @@ describe('Board card', () => {
activeId: inactiveId, activeId: inactiveId,
selectedBoardItems: [mockIssue], selectedBoardItems: [mockIssue],
}, },
isSwimlanesOn,
}); });
mountComponent(); mountComponent();
...@@ -131,7 +124,7 @@ describe('Board card', () => { ...@@ -131,7 +124,7 @@ describe('Board card', () => {
describe('when mouseup event is called on the card', () => { describe('when mouseup event is called on the card', () => {
beforeEach(() => { beforeEach(() => {
createStore({ isSwimlanesOn }); createStore();
mountComponent(); mountComponent();
}); });
...@@ -158,5 +151,4 @@ describe('Board card', () => { ...@@ -158,5 +151,4 @@ describe('Board card', () => {
}); });
}); });
}); });
});
}); });
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment