Skip to content

Commit

Permalink
chore: update sanity suite app to fix intermittent failures
Browse files Browse the repository at this point in the history
  • Loading branch information
saikumarrs committed Dec 1, 2024
1 parent 5a07000 commit c3157ee
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions packages/sanity-suite/src/testBook/TestBook.js
Original file line number Diff line number Diff line change
Expand Up @@ -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') {
Expand Down Expand Up @@ -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() {
Expand Down

0 comments on commit c3157ee

Please sign in to comment.