From 675756a69956bce98180b83a85f3fe3875922a51 Mon Sep 17 00:00:00 2001 From: Kerry Date: Thu, 11 May 2023 14:32:32 +1200 Subject: [PATCH] Flaky Cypress test - `should handle long room address and long room name` on right-panel.spec.ts (#10835) * wait for room alias to be set before closing modal * retrigger sonar --- cypress/e2e/right-panel/right-panel.spec.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/cypress/e2e/right-panel/right-panel.spec.ts b/cypress/e2e/right-panel/right-panel.spec.ts index 7af722515a..ec84084463 100644 --- a/cypress/e2e/right-panel/right-panel.spec.ts +++ b/cypress/e2e/right-panel/right-panel.spec.ts @@ -73,10 +73,12 @@ describe("RightPanel", () => { cy.openRoomSettings(); // Set a local room address - cy.findByTestId("local-address-fieldset").within(() => { - cy.get(".mx_AliasSettings_localAddresses").click(); - cy.findByLabelText("Room address").type(ROOM_ADDRESS_LONG); + cy.contains(".mx_SettingsFieldset", "Local Addresses").within(() => { + cy.findByRole("textbox").type(ROOM_ADDRESS_LONG); cy.findByRole("button", { name: "Add" }).click(); + cy.findByText(`#${ROOM_ADDRESS_LONG}:localhost`) + .should("have.class", "mx_EditableItem_item") + .should("exist"); }); cy.closeDialog();