diff --git a/cypress/e2e/crypto/crypto.spec.ts b/cypress/e2e/crypto/crypto.spec.ts index a829acbd56..d465f0c1e1 100644 --- a/cypress/e2e/crypto/crypto.spec.ts +++ b/cypress/e2e/crypto/crypto.spec.ts @@ -58,10 +58,10 @@ const startDMWithBob = function(this: CryptoTestContext) { const testMessages = function(this: CryptoTestContext) { // check the invite message - cy.contains(".mx_EventTile_body", "Hey!") - .closest(".mx_EventTile") - .should("not.have.descendants", ".mx_EventTile_e2eIcon_warning") - .should("have.descendants", ".mx_EventTile_receiptSent"); + cy.contains(".mx_EventTile_body", "Hey!").closest(".mx_EventTile").within(() => { + cy.get(".mx_EventTile_e2eIcon_warning").should("not.exist"); + cy.get(".mx_EventTile_receiptSent").should("exist"); + }); // Bob sends a response cy.get("@bobsRoom").then((room) => { diff --git a/cypress/e2e/register/register.spec.ts b/cypress/e2e/register/register.spec.ts index 5e9cfd3e5f..8d1076f0b7 100644 --- a/cypress/e2e/register/register.spec.ts +++ b/cypress/e2e/register/register.spec.ts @@ -37,7 +37,8 @@ describe("Registration", () => { cy.get(".mx_ServerPicker_change", { timeout: 15000 }).click(); cy.get(".mx_ServerPickerDialog_continue").should("be.visible"); - cy.percySnapshot("Server Picker"); + // Only snapshot the server picker otherwise in the background `matrix.org` may or may not be available + cy.get(".mx_Dialog").percySnapshotElement("Server Picker", { widths: [516] }); cy.checkA11y(); cy.get(".mx_ServerPickerDialog_otherHomeserver").type(synapse.baseUrl);