Skip to content

Commit abcff5c

Browse files
authored
Merge branch 'stable29' into automated/noid/stable29-update-nextcloud-ocp
2 parents d38344c + 19855c0 commit abcff5c

File tree

8 files changed

+379
-260
lines changed

8 files changed

+379
-260
lines changed

cypress/e2e/open.spec.js

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,8 @@ describe('Open existing office files', function() {
5656
// Share action
5757
cy.wait(2000)
5858
cy.get('@loleafletframe').within(() => {
59-
cy.get('#main-menu #menu-file > a').click()
60-
cy.get('#main-menu #menu-shareas > a').should('be.visible').click()
59+
cy.verifyOpen(filename)
6160
})
62-
cy.verifyOpen(filename)
6361

6462
// FIXME: wait for sidebar tab content
6563
// FIXME: validate sharing tab
@@ -84,9 +82,8 @@ describe('Open existing office files', function() {
8482

8583
cy.screenshot('open-file_' + filename)
8684
cy.get('@loleafletframe').within(() => {
87-
cy.get('button.icon-nextcloud-sidebar').click()
85+
cy.verifyOpen(filename)
8886
})
89-
cy.verifyOpen(filename)
9087
// FIXME: wait for sidebar tab content
9188
// FIXME: validate sharing tab
9289
cy.screenshot('share-sidebar_' + filename)
@@ -148,9 +145,8 @@ describe('Open PDF with richdocuments', () => {
148145

149146
// Verify that the correct file is open
150147
cy.get('@loleafletframe').within(() => {
151-
cy.get('button.icon-nextcloud-sidebar').click()
148+
cy.verifyOpen('document.pdf')
152149
})
153-
cy.verifyOpen('document.pdf')
154150

155151
// Make sure we can close the document
156152
cy.closeDocument()

cypress/support/commands.js

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -307,11 +307,9 @@ Cypress.Commands.add('closeDocument', () => {
307307
})
308308

309309
Cypress.Commands.add('verifyOpen', (filename) => {
310-
cy.get('#app-sidebar-vue')
311-
.should('be.visible')
312-
cy.get('.app-sidebar-header__mainname')
313-
.should('be.visible')
314-
.should('contain.text', filename)
310+
cy.get('input#document-name-input').should(($docName) => {
311+
expect($docName.val()).to.equal(filename)
312+
})
315313
})
316314

317315
Cypress.Commands.add('uploadSystemTemplate', () => {

lib/Controller/WopiController.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -606,8 +606,7 @@ public function postFile(string $fileId, string $access_token): JSONResponse {
606606
$suggested = $this->request->getHeader('X-WOPI-RequestedName');
607607
$suggested = mb_convert_encoding($suggested, 'utf-8', 'utf-7') . '.' . $file->getExtension();
608608

609-
$parent = $isPublic ? dirname($file->getPath()) : $userFolder->getPath();
610-
$path = $this->normalizePath($suggested, $parent);
609+
$path = $this->normalizePath($suggested, dirname($file->getPath()));
611610

612611
if ($path === '') {
613612
return new JSONResponse([

0 commit comments

Comments
 (0)