]> source.dussan.org Git - sonarqube.git/commitdiff
NO JIRA Improve frontend IT performance
authorMathieu Suen <mathieu.suen@sonarsource.com>
Fri, 26 Jan 2024 13:11:43 +0000 (14:11 +0100)
committersonartech <sonartech@sonarsource.com>
Mon, 29 Jan 2024 20:03:17 +0000 (20:03 +0000)
server/sonar-web/src/main/js/apps/background-tasks/__tests__/BackgroundTasks-it.tsx

index ca39fcc981f6a783efeb4fdb29a44dd746dc758e..8d849cd1f4b404156c75343437ad7ef1c6fc15ac 100644 (file)
@@ -36,6 +36,11 @@ import { TaskStatuses, TaskTypes } from '../../../types/tasks';
 import { PAGE_SIZE } from '../constants';
 import routes from '../routes';
 
+jest.mock('../constants', () => ({
+  ...jest.requireActual('../constants'),
+  PAGE_SIZE: 9,
+}));
+
 const computeEngineServiceMock = new ComputeEngineServiceMock();
 
 beforeAll(() => {
@@ -185,7 +190,7 @@ describe('The Global background task page', () => {
 
     computeEngineServiceMock.clearTasks();
 
-    const TOTAL_TASKS = 101;
+    const TOTAL_TASKS = 10;
 
     computeEngineServiceMock.createTasks(TOTAL_TASKS);