]> source.dussan.org Git - sonarqube.git/commitdiff
SGB-90 Fixing flaky rtl test for ProjectActivityApp-it.tsx
authorRevanshu Paliwal <revanshu.paliwal@sonarsource.com>
Tue, 16 Jul 2024 08:47:36 +0000 (10:47 +0200)
committersonartech <sonartech@sonarsource.com>
Mon, 22 Jul 2024 20:02:47 +0000 (20:02 +0000)
server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/ProjectActivityApp-it.tsx

index 431f9553c2495f9683c353cc006c5a4f69740f7f..908a4f2424b6c1c7d1d37e3b7cc14f166c18e865 100644 (file)
@@ -605,6 +605,10 @@ function getPageObject() {
     ui: {
       ...ui,
       async appLoaded({ doNotWaitForBranch }: { doNotWaitForBranch?: boolean } = {}) {
+        await waitFor(() => {
+          expect(byText('loading').query()).not.toBeInTheDocument();
+        });
+
         expect(await ui.graphs.findAll()).toHaveLength(1);
 
         if (!doNotWaitForBranch) {