diff --git a/e2e-tests/cypress/tests/support/ui_commands.ts b/e2e-tests/cypress/tests/support/ui_commands.ts index ed999ed0a6..e9cf9286c6 100644 --- a/e2e-tests/cypress/tests/support/ui_commands.ts +++ b/e2e-tests/cypress/tests/support/ui_commands.ts @@ -172,7 +172,7 @@ Cypress.Commands.add('getLastPostId', getLastPostId); function uiWaitUntilMessagePostedIncludes(message: string): ChainableT { const checkFn = () => { - return cy.getLastPost().then((el) => { + return cy.getLastPost().scrollIntoView().then((el) => { const postedMessageEl = el.find('.post-message__text')[0]; return Boolean(postedMessageEl && postedMessageEl.textContent.includes(message)); });