]> source.dussan.org Git - sonarqube.git/commitdiff
SGB-216 Reduce number of render line to fix slow test
authorMathieu Suen <mathieu.suen@sonarsource.com>
Thu, 14 Nov 2024 09:20:25 +0000 (10:20 +0100)
committersonartech <sonartech@sonarsource.com>
Mon, 18 Nov 2024 20:02:53 +0000 (20:02 +0000)
server/sonar-web/src/main/js/apps/code/__tests__/Code-it.ts

index c620624df310dbec8c6d7ffea4e39b73c8f510f2..daf271f213a77ea29b7bf5ca7fcafe650c780984 100644 (file)
@@ -58,7 +58,7 @@ jest.mock('../../../components/SourceViewer/helpers/lines', () => {
   const lines = jest.requireActual('../../../components/SourceViewer/helpers/lines');
   return {
     ...lines,
-    LINES_TO_LOAD: 20,
+    LINES_TO_LOAD: 5,
   };
 });
 
@@ -66,7 +66,7 @@ jest.mock('../../../api/quality-gates', () => ({
   getQualityGateProjectStatus: jest.fn(),
 }));
 
-const DEFAULT_LINES_LOADED = 19;
+const DEFAULT_LINES_LOADED = 5;
 const originalScrollTo = window.scrollTo;
 
 const branchesHandler = new BranchesServiceMock();