From c3157ee535b0191a252669dc0ace9cdd75df052b Mon Sep 17 00:00:00 2001 From: Sai Kumar Battinoju Date: Sun, 1 Dec 2024 12:13:21 +0530 Subject: [PATCH] chore: update sanity suite app to fix intermittent failures --- packages/sanity-suite/src/testBook/TestBook.js | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/packages/sanity-suite/src/testBook/TestBook.js b/packages/sanity-suite/src/testBook/TestBook.js index 0110d2252..f99a505d5 100644 --- a/packages/sanity-suite/src/testBook/TestBook.js +++ b/packages/sanity-suite/src/testBook/TestBook.js @@ -319,10 +319,6 @@ class TestBook { const statusElement = document.getElementById(`test-case-status-${testCaseId}`); statusElement.textContent = assertionResult; statusElement.className = `badge badge-${assertionResult} testCaseStatus`; - statusElement.scrollIntoView({ - behavior: 'smooth', - block: 'center', - }); const viewDiffElement = document.getElementById(`view-diff-${testCaseId}`); if (assertionResult === 'success') { @@ -360,16 +356,6 @@ class TestBook { const resultStatusElement = document.getElementById('resultStatus'); resultStatusElement.innerHTML = finalStatus; resultStatusElement.className = `badge badge-${finalStatus}`; - - // We need to use a timeout to ensure the scrollIntoView is called after the - // last test case result scrolling has been completed - // Otherwise the scrollIntoView will not work as expected - setTimeout(() => { - resultStatusElement.scrollIntoView({ - behavior: 'smooth', - block: 'center', - }); - }, 1000); } executeNextTestCase() {