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-03-03 17:34:27 +0300
committerMax <max@nextcloud.com>2022-03-03 17:54:13 +0300
commit31fa34280383d29ac517ecc43904be0655017634 (patch)
treefbf1a432869ceabcd8779511d6ddef93443e17c8 /cypress
parent0d7cb5ab7fc3080793e7d91590a6498d5bda1a75 (diff)
fix: workspace with Readme.md open details.
Do not show the spinning wheel unless the file actually changed. * Resolves #2215. * Targets: master. Opening Readme.md in the sidebar triggers a PROPFIND. We parse its response just like the initial file list load. Readme.md is part of the response and our handler attempts to open it. Only set the vm.ready if the file actually changed. Only a changed file will make the editor load again. Only then will it set ready to true and stop the spinning wheel. Signed-off-by: Max <max@nextcloud.com>
Diffstat (limited to 'cypress')
-rw-r--r--cypress/integration/workspace.spec.js14
1 files changed, 13 insertions, 1 deletions
diff --git a/cypress/integration/workspace.spec.js b/cypress/integration/workspace.spec.js
index 665f94d06..06ca947c5 100644
--- a/cypress/integration/workspace.spec.js
+++ b/cypress/integration/workspace.spec.js
@@ -42,7 +42,11 @@ describe('Workspace', function() {
openWorkspace()
.type('Hello')
.should('contain', 'Hello')
- cy.get('#fileList').should('contain', 'Readme.md')
+ openSidebar('Readme.md')
+ cy.log('Regression test for #2215')
+ cy.get('#rich-workspace .ProseMirror')
+ .should('be.visible')
+ .should('contain', 'Hello')
})
it('formats text', function() {
@@ -165,3 +169,11 @@ const openWorkspace = () => {
cy.get('#editor .content-wrapper').click()
return cy.get('#rich-workspace .ProseMirror')
}
+
+const openSidebar = filename => {
+ cy.get(`#fileList tr[data-file="${filename}"]`)
+ .should('contain', filename)
+ cy.get(`#fileList tr[data-file="${filename}"] .icon-more`).click()
+ cy.get(`#fileList tr[data-file="${filename}"] .icon-details`).click()
+ cy.get('.app-sidebar-header').should('contain', filename)
+}