Skip to content

Commit

Permalink
Fix lint and test
Browse files Browse the repository at this point in the history
  • Loading branch information
richard-cox committed Dec 10, 2024
1 parent 9d01007 commit 439f223
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
16 changes: 8 additions & 8 deletions shell/components/nav/TopLevelMenu.vue
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export default {
canPagination,
helper,
debouncedHelperUpdateSlow: debounce((...args) => this.helper.update(...args), 750),
debouncedHelperUpdateSlow: debounce((...args) => this.helper.update(...args), 750),
debouncedHelperUpdateQuick: debounce((...args) => this.helper.update(...args), 200),
provClusters,
mgmtClusters,
Expand Down Expand Up @@ -432,15 +432,15 @@ export default {
pinnedIds,
searchTerm: this.search,
unPinnedMax: this.maxClustersToShow
}
};
switch (speed) {
case 'slow':
this.debouncedHelperUpdateSlow(args);
return;
case 'quick':
this.debouncedHelperUpdateQuick(args);
return;
case 'slow':
this.debouncedHelperUpdateSlow(args);
break;
case 'quick':
this.debouncedHelperUpdateQuick(args);
break;
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion shell/components/nav/__tests__/TopLevelMenu.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ const generateStore = (clusters: any[], settings = [{}]) => {
};

const waitForIt = async() => {
jest.advanceTimersByTime(250); // Wait for debounced call to fetch updated cluster list
jest.advanceTimersByTime(1000); // Wait for debounced call to fetch updated cluster list
await nextTick(); // Wait for changes to cluster list to trigger changes
};

Expand Down

0 comments on commit 439f223

Please sign in to comment.