From 58afa900d5b5e760ac16893ee1631e681f4a7575 Mon Sep 17 00:00:00 2001 From: Andy Balaam Date: Thu, 28 Sep 2023 13:44:29 +0100 Subject: [PATCH] Target specific thread name to unflake redaction tests (#11662) * Disambiguate thread root names to unflake redaction tests * Revert "Disambiguate thread root names to unflake redaction tests" This reverts commit f21ffa5554e7d49322acc8f8c1c1ef4063b9efdd. * Find thread root by text, not contains --- cypress/e2e/read-receipts/read-receipts-utils.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cypress/e2e/read-receipts/read-receipts-utils.ts b/cypress/e2e/read-receipts/read-receipts-utils.ts index 2f78b46041f..ced2b4d97ff 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();