diff options
author | Max <max@nextcloud.com> | 2022-03-03 17:34:27 +0300 |
---|---|---|
committer | Max <max@nextcloud.com> | 2022-03-03 17:54:13 +0300 |
commit | 31fa34280383d29ac517ecc43904be0655017634 (patch) | |
tree | fbf1a432869ceabcd8779511d6ddef93443e17c8 /cypress | |
parent | 0d7cb5ab7fc3080793e7d91590a6498d5bda1a75 (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.js | 14 |
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) +} |