An error occurred while fetching this tab.
Fix "Vulnerability report errors out when users select `Show 100 items` and switch tabs"
- Jul 08, 2022
-
-
Paul Gascou-Vaillancourt authored
This ensures the `VulnerabilityListGraphql` component retrieves the user-selected page size from the local storage as soon as it initializes its state. This ensures that the GraphQL query won't be fire twice: once with the default page size, and a second time when the LocalStorageSync emits an event with the actual size from the local storage. Changelog: fixed EE: true
-
Paul Gascou-Vaillancourt authored
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.
-