Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/text.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax <max@nextcloud.com>2022-02-24 18:25:34 +0300
committerMax <max@nextcloud.com>2022-03-02 10:21:15 +0300
commit2891fd02552dfd50ebc844580274841b33e198e1 (patch)
tree4a4e8a0973f3c0c9906d324cdfb683304cb985be /cypress
parentaf0253afda35391ca66eff415e75d3d5e8d5a6f9 (diff)
fix: do not try to send steps to a read only doc
Cypress tests were failing because they triggered editor.focus on a read only doc. Focus seems to cause sendable steps - maybe because the current cursor changes. Prevent this on various levels: * Do not autofocus read only docs. * Do not send steps to read only docs. * Handle server response with 403 without content gracefully when sending steps. The last originated here: https://github.com/nextcloud/text/blob/master/lib/Service/ApiService.php#L158 So wither the session was not valid or the document read only. Not entirely sure what best to do in this situation. Logging to console.error for now. Signed-off-by: Max <max@nextcloud.com>
Diffstat (limited to 'cypress')
-rw-r--r--cypress/integration/share.spec.js1
1 files changed, 0 insertions, 1 deletions
diff --git a/cypress/integration/share.spec.js b/cypress/integration/share.spec.js
index ffc9ffbb0..d556a6ef0 100644
--- a/cypress/integration/share.spec.js
+++ b/cypress/integration/share.spec.js
@@ -59,7 +59,6 @@ describe('Open test.md in viewer', function() {
cy.visit(href)
cy.window().then(win => {
win.OC.appswebroots['files_texteditor'] = true
- cy.wait(1000)
cy.get('#editor').should('be.visible')
cy.get('#editor .ProseMirror').should('contain', 'Hello world')
cy.get('#editor .ProseMirror h2').should('contain', 'Hello world')