mirror of
https://github.com/nextcloud/richdocuments.git
synced 2025-12-18 05:20:43 +01:00
test: Add test for resharing a federated share as link
Signed-off-by: Julius Knorr <jus@bitgrid.net>
This commit is contained in:
parent
bd19220b7b
commit
b1edddd12d
2 changed files with 21 additions and 0 deletions
|
|
@ -16,6 +16,7 @@ describe('Federated sharing of office documents', function() {
|
|||
cy.createUser(shareOwner)
|
||||
|
||||
cy.uploadFile(shareOwner, 'document.odt', 'application/vnd.oasis.opendocument.text', '/document.odt')
|
||||
cy.uploadFile(shareOwner, 'document.odt', 'application/vnd.oasis.opendocument.text', '/document-reshare.odt')
|
||||
})
|
||||
|
||||
it('Open a remotely shared file', function() {
|
||||
|
|
@ -37,4 +38,23 @@ describe('Federated sharing of office documents', function() {
|
|||
cy.get('#viewer', { timeout: 5000 }).should('not.exist')
|
||||
})
|
||||
})
|
||||
|
||||
it('Open a remotely shared file as a link', function() {
|
||||
cy.login(shareOwner)
|
||||
cy.shareFileToRemoteUser(shareOwner, '/document-reshare.odt', shareRecipient)
|
||||
|
||||
cy.login(shareRecipient)
|
||||
cy.visit('/apps/files')
|
||||
|
||||
cy.shareLink(shareRecipient, '/document-reshare.odt', { permissions: 1 }).then((token) => {
|
||||
cy.logout()
|
||||
cy.visit(`/s/${token}`, {
|
||||
onBeforeLoad(win) {
|
||||
cy.spy(win, 'postMessage').as('postMessage')
|
||||
},
|
||||
})
|
||||
cy.waitForViewer()
|
||||
cy.waitForCollabora(true, true)
|
||||
})
|
||||
})
|
||||
})
|
||||
|
|
|
|||
|
|
@ -118,6 +118,7 @@ Cypress.Commands.add('shareFileToRemoteUser', (user, path, targetUser, shareData
|
|||
body: {
|
||||
path,
|
||||
shareType: 6,
|
||||
permission: 31,
|
||||
shareWith: federatedId,
|
||||
...shareData,
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue