Commit c4db61f8 authored by Tom Quirk's avatar Tom Quirk

Address reviewer feedback

- remove redundant issuable_tabs logic
- set issuesListLoading to false initially
parent 7c3ed64e
...@@ -27,7 +27,7 @@ export default { ...@@ -27,7 +27,7 @@ export default {
return tabName === this.currentTab; return tabName === this.currentTab;
}, },
isTabCountNumeric(tab) { isTabCountNumeric(tab) {
return this.tabCounts ? Number.isInteger(this.tabCounts[tab.name]) : false; return Number.isInteger(this.tabCounts[tab.name]);
}, },
}, },
}; };
......
...@@ -51,7 +51,7 @@ export default { ...@@ -51,7 +51,7 @@ export default {
return { return {
jiraLogo, jiraLogo,
issues: [], issues: [],
issuesListLoading: true, issuesListLoading: false,
issuesListLoadFailed: false, issuesListLoadFailed: false,
totalIssues: 0, totalIssues: 0,
currentState: this.initialState, currentState: this.initialState,
......
...@@ -53,11 +53,13 @@ describe('JiraIssuesListRoot', () => { ...@@ -53,11 +53,13 @@ describe('JiraIssuesListRoot', () => {
describe('on mount', () => { describe('on mount', () => {
describe('while loading', () => { describe('while loading', () => {
it('sets issuesListLoading to `true`', () => { it('sets issuesListLoading to `true`', async () => {
jest.spyOn(axios, 'get').mockResolvedValue(new Promise(() => {})); jest.spyOn(axios, 'get').mockResolvedValue(new Promise(() => {}));
createComponent(); createComponent();
await wrapper.vm.$nextTick();
const issuableList = findIssuableList(); const issuableList = findIssuableList();
expect(issuableList.props('issuablesLoading')).toBe(true); expect(issuableList.props('issuablesLoading')).toBe(true);
}); });
......
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