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
pull/28217/head
Andy Balaam 2023-09-28 13:44:29 +01:00 committed by GitHub
parent e0f4b26512
commit 58afa900d5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -285,7 +285,9 @@ function findRoomByName(room: string): Chainable<Room> {
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();