Skip to content
Snippets Groups Projects

Fix "Vulnerability report errors out when users select `Show 100 items` and switch tabs"

Merged Paul Gascou-Vaillancourt requested to merge 366951-vuln-report-query-complexity into master
All threads resolved!
2 files
+ 17
1
Compare changes
  • Side-by-side
  • Inline
Files
2
  • This adds a test to ensure the vulnerabilities query is only triggered
    once with the correct `first` parameter when the page size is set in the
    local storage. This covers a bug that was uncovered recently and that
    results in the query being triggered twice when the component mounts
    because it first tries to get the default page size, and immediately
    makes another attempt with the page size retrieved by the
    LocalStorageSync component.
    This test voluntarily fails in this revision, the next commit will fix
    the component to make this test pass.
@@ -13,7 +13,7 @@ import VulnerabilityList from './vulnerability_list.vue';
import { FIELDS } from './constants';
export const DEFAULT_PAGE_SIZE = 20;
const PAGE_SIZE_STORAGE_KEY = 'vulnerability_list_page_size';
export const PAGE_SIZE_STORAGE_KEY = 'vulnerability_list_page_size';
const GRAPHQL_DATA_PATH = {
[DASHBOARD_TYPES.PROJECT]: 'project.vulnerabilities',
Loading