From d21498de947e4a9cf2e51eb94975d1e542c8d8e4 Mon Sep 17 00:00:00 2001
From: Travis Ralston <travisr@matrix.org>
Date: Thu, 11 Aug 2022 15:26:22 -0600
Subject: [PATCH] Add even more stability to view source test case (#9176)

Follow-on from https://github.com/matrix-org/matrix-react-sdk/pull/9156 after seeing more failures from the test case.
---
 cypress/e2e/timeline/timeline.spec.ts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/cypress/e2e/timeline/timeline.spec.ts b/cypress/e2e/timeline/timeline.spec.ts
index 73de28dd30..df0a1809b3 100644
--- a/cypress/e2e/timeline/timeline.spec.ts
+++ b/cypress/e2e/timeline/timeline.spec.ts
@@ -238,7 +238,7 @@ describe("Timeline", () => {
             cy.contains(".mx_RoomView_body .mx_EventTile[data-scroll-tokens]", "MessageEdit").should("exist");
 
             // Click top left of the event toggle, which should not be covered by MessageActionBar's safe area
-            cy.get(".mx_EventTile .mx_ViewSourceEvent").realHover().within(() => {
+            cy.get(".mx_EventTile .mx_ViewSourceEvent").should("exist").realHover().within(() => {
                 cy.get(".mx_ViewSourceEvent_toggle").click('topLeft', { force: false });
             });