diff --git a/cypress/e2e/read-receipts/read-receipts-utils.ts b/cypress/e2e/read-receipts/read-receipts-utils.ts index 2f78b46041..ced2b4d97f 100644 --- a/cypress/e2e/read-receipts/read-receipts-utils.ts +++ b/cypress/e2e/read-receipts/read-receipts-utils.ts @@ -285,7 +285,9 @@ function findRoomByName(room: string): Chainable { export function openThread(rootMessage: string) { cy.log("Open thread", rootMessage); cy.get(".mx_RoomView_body", { log: false }).within(() => { - cy.contains(".mx_EventTile[data-scroll-tokens]", rootMessage, { log: false }) + cy.findAllByText(rootMessage) + .filter(".mx_EventTile_body") + .parents(".mx_EventTile[data-scroll-tokens]") .realHover() .findByRole("button", { name: "Reply in thread", log: false }) .click();