Commit f87e3bcf authored by Ezekiel Kigbo's avatar Ezekiel Kigbo

Merge branch...

Merge branch '344641-group-by-epic-on-issue-board-doesn-t-show-the-right-amount-of-issues' into 'master'

Fix bug not all issues showing in Swimlanes

See merge request gitlab-org/gitlab!77922
parents a1a79b1b eb661ecb
...@@ -102,9 +102,7 @@ export default { ...@@ -102,9 +102,7 @@ export default {
}, },
}, },
mounted() { mounted() {
if (this.issuesCount === 0) {
this.fetchIssuesForEpic(this.epic.id); this.fetchIssuesForEpic(this.epic.id);
}
}, },
methods: { methods: {
...mapActions(['updateBoardEpicUserPreferences', 'setError', 'fetchIssuesForEpic']), ...mapActions(['updateBoardEpicUserPreferences', 'setError', 'fetchIssuesForEpic']),
......
...@@ -13,6 +13,7 @@ describe('EpicLane', () => { ...@@ -13,6 +13,7 @@ describe('EpicLane', () => {
let wrapper; let wrapper;
const updateBoardEpicUserPreferencesSpy = jest.fn(); const updateBoardEpicUserPreferencesSpy = jest.fn();
const fetchIssuesForEpicSpy = jest.fn();
const findChevronButton = () => wrapper.findComponent(GlButton); const findChevronButton = () => wrapper.findComponent(GlButton);
...@@ -20,7 +21,7 @@ describe('EpicLane', () => { ...@@ -20,7 +21,7 @@ describe('EpicLane', () => {
return new Vuex.Store({ return new Vuex.Store({
actions: { actions: {
updateBoardEpicUserPreferences: updateBoardEpicUserPreferencesSpy, updateBoardEpicUserPreferences: updateBoardEpicUserPreferencesSpy,
fetchIssuesForEpic: jest.fn(), fetchIssuesForEpic: fetchIssuesForEpicSpy,
}, },
state: { state: {
boardItemsByListId, boardItemsByListId,
...@@ -61,6 +62,16 @@ describe('EpicLane', () => { ...@@ -61,6 +62,16 @@ describe('EpicLane', () => {
wrapper.destroy(); wrapper.destroy();
}); });
describe('mounted', () => {
beforeEach(() => {
createComponent();
});
it('calls fetchIssuesForEpic action on mount', () => {
expect(fetchIssuesForEpicSpy).toHaveBeenCalledWith(expect.any(Object), mockEpic.id);
});
});
describe('template', () => { describe('template', () => {
beforeEach(() => { beforeEach(() => {
createComponent(); 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