From b70a8de6ec5adbc245f52530cb1a62db07e0d3a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julius=20H=C3=A4rtl?= Date: Fri, 24 Jan 2020 12:19:12 +0100 Subject: [PATCH 01/13] Fix public modal and rich workspace menubar index (fixes #603) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Julius Härtl --- src/components/EditorWrapper.vue | 1 + src/views/RichWorkspace.vue | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/EditorWrapper.vue b/src/components/EditorWrapper.vue index 4635a32a0f4..d274f5f02fc 100644 --- a/src/components/EditorWrapper.vue +++ b/src/components/EditorWrapper.vue @@ -478,6 +478,7 @@ export default { max-width: 100%; height: 100%; left: 0; + top: 50px; margin: 0 auto; position: relative; background-color: var(--color-main-background); diff --git a/src/views/RichWorkspace.vue b/src/views/RichWorkspace.vue index b344dfd7a45..521197a59a0 100644 --- a/src/views/RichWorkspace.vue +++ b/src/views/RichWorkspace.vue @@ -193,7 +193,7 @@ export default { } #rich-workspace::v-deep .menubar { - z-index: 90; + z-index: 50; /* Slightly reduce vertical space */ margin-bottom: -10px; } From 68d653cc5ff37a62e29b8fe2aecba1a4c5c922af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julius=20H=C3=A4rtl?= Date: Fri, 24 Jan 2020 12:20:38 +0100 Subject: [PATCH 02/13] Add test skeleton for folder link shares MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Julius Härtl --- cypress/integration/share.spec.js | 31 ++++++++++++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/cypress/integration/share.spec.js b/cypress/integration/share.spec.js index 3e8fcde5758..d0f5d4ed8aa 100644 --- a/cypress/integration/share.spec.js +++ b/cypress/integration/share.spec.js @@ -34,6 +34,8 @@ describe('Open test.md in viewer', function() { // Upload test files cy.uploadFile('test.md', 'text/markdown') cy.uploadFile('test.md', 'text/markdown', 'test2.md') + cy.createFolder('folder') + cy.uploadFile('test.md', 'text/markdown', 'folder/test.md') cy.visit('/apps/files') cy.get('#fileList tr[data-file="test.md"]', {timeout: 10000}) .should('contain', 'test.md') @@ -51,7 +53,8 @@ describe('Open test.md in viewer', function() { }) it('Shares the file as a public read only link', function () { - cy.visit('/apps/files') + cy.visit('/apps/files', { timeout: 10000 }) + cy.wait(1000) cy.get('#fileList tr[data-file="test.md"] a.action-share', {timeout: 10000}).trigger('click') cy.get('#app-sidebar') .should('be.visible') @@ -73,6 +76,7 @@ describe('Open test.md in viewer', function() { it('Shares the file as a public link with write permissions', function () { cy.visit('/apps/files') + cy.wait(1000) cy.get('#fileList tr[data-file="test2.md"] a.action-share', {timeout: 10000}).trigger('click') cy.get('#app-sidebar') .should('be.visible') @@ -88,6 +92,7 @@ describe('Open test.md in viewer', function() { cy.window().then(win => { win.OC.appswebroots['files_texteditor'] = true cy.wait(1000) + cy.openFile('test.md') cy.get('#editor', {timeout: 10000}).should('be.visible') cy.get('#editor .ProseMirror').should('contain', 'Hello world') cy.get('#editor .ProseMirror h2').should('contain', 'Hello world') @@ -100,6 +105,7 @@ describe('Open test.md in viewer', function() { it('Opens the editor as guest', function () { cy.visit('/apps/files') + cy.wait(1000) cy.get('#fileList tr[data-file="test2.md"] a.action-share', {timeout: 10000}).trigger('click') cy.get('#app-sidebar') .should('be.visible') @@ -122,5 +128,28 @@ describe('Open test.md in viewer', function() { }) }) + it('Shares a folder as a public read only link', function () { + cy.visit('/apps/files', { timeout: 10000 }) + cy.wait(1000) + cy.get('#fileList tr[data-file="folder"] a.action-share', {timeout: 10000}).trigger('click') + cy.get('#app-sidebar') + .should('be.visible') + cy.get('#app-sidebar a#sharing').trigger('click') + cy.get('#app-sidebar button.new-share-link').trigger('click') + cy.get('#app-sidebar a.sharing-entry__copy') + .should('have.attr', 'href').and('include', '/s/') + .then((href) => { + cy.visit(href) + cy.window().then(win => { + win.OC.appswebroots['files_texteditor'] = true + cy.wait(1000) + cy.openFile('test.md') + cy.get('#editor-container', { timeout: 4000 }).should('be.visible') + cy.get('#editor .ProseMirror').should('contain', 'Hello world') + cy.get('#editor .ProseMirror h2').should('contain', 'Hello world') + }) + }) + }) + }) From 516036ee2a31829490a2faa478c09a23eb350fff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julius=20H=C3=A4rtl?= Date: Fri, 24 Jan 2020 12:53:50 +0100 Subject: [PATCH 03/13] Fix duplicate settings id (fixes #602) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Julius Härtl --- src/views/FilesSettings.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/views/FilesSettings.vue b/src/views/FilesSettings.vue index 78ad4526c90..c7d2aaaef8f 100644 --- a/src/views/FilesSettings.vue +++ b/src/views/FilesSettings.vue @@ -20,7 +20,7 @@ - -->