From e15d118ff0f39b34eba226bdbac6772e393a36e0 Mon Sep 17 00:00:00 2001
From: Arie Peterson <arie@greenhost.nl>
Date: Tue, 26 Jul 2022 15:04:11 +0200
Subject: [PATCH] Adapt test to same-tab setting

---
 cypress/e2e/test-nextcloud.cy.js | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/cypress/e2e/test-nextcloud.cy.js b/cypress/e2e/test-nextcloud.cy.js
index 56f8b6a9..69dd7bf0 100644
--- a/cypress/e2e/test-nextcloud.cy.js
+++ b/cypress/e2e/test-nextcloud.cy.js
@@ -55,10 +55,13 @@ describe('Test nextcloud', () => {
     cy.get('.icon-confirm').click()
 
     // Test Onlyoffice
-    cy.frameLoaded('[name="frameEditor"]')
-    cy.enter('[name="frameEditor"]').then(getBody => {
-      getBody().find('#id-toolbar-btn-italic').should('be.visible').click()
-      getBody().find('#id_main').click().type('Hi from Cypress!')
+    cy.frameLoaded('#onlyofficeFrame')
+    cy.iframe('#onlyofficeFrame').within(() => {
+      cy.frameLoaded('[name="frameEditor"]')
+      cy.iframe('[name="frameEditor"]').within(() => {
+        cy.get('#id-toolbar-btn-italic').should('be.visible').click()
+        cy.get('#id_main').click().type('Hi from Cypress!')
+      })
     })
   })
 })
-- 
GitLab