Commit eb661ecb authored by Florie Guibert's avatar Florie Guibert

Fix bug not all issues showing in Swimlanes

Always fetch issues when mounting epic lane
Changelog: fixed
EE: true
parent c946f083
......@@ -102,9 +102,7 @@ export default {
},
},
mounted() {
if (this.issuesCount === 0) {
this.fetchIssuesForEpic(this.epic.id);
}
},
methods: {
...mapActions(['updateBoardEpicUserPreferences', 'setError', 'fetchIssuesForEpic']),
......
......@@ -13,6 +13,7 @@ describe('EpicLane', () => {
let wrapper;
const updateBoardEpicUserPreferencesSpy = jest.fn();
const fetchIssuesForEpicSpy = jest.fn();
const findChevronButton = () => wrapper.findComponent(GlButton);
......@@ -20,7 +21,7 @@ describe('EpicLane', () => {
return new Vuex.Store({
actions: {
updateBoardEpicUserPreferences: updateBoardEpicUserPreferencesSpy,
fetchIssuesForEpic: jest.fn(),
fetchIssuesForEpic: fetchIssuesForEpicSpy,
},
state: {
boardItemsByListId,
......@@ -61,6 +62,16 @@ describe('EpicLane', () => {
wrapper.destroy();
});
describe('mounted', () => {
beforeEach(() => {
createComponent();
});
it('calls fetchIssuesForEpic action on mount', () => {
expect(fetchIssuesForEpicSpy).toHaveBeenCalledWith(expect.any(Object), mockEpic.id);
});
});
describe('template', () => {
beforeEach(() => {
createComponent();
......
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