Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nextcloud ocmstub share-with #143

Merged
merged 13 commits into from
Aug 30, 2024
Merged
16 changes: 12 additions & 4 deletions .github/workflows/ocm-test-suite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,11 @@ jobs:
{
platform: seafile,
version: 11.0.5
}
},
{
platform: ocmstub,
version: "1.0"
},
]

# The OS to run tests on, (I believe for OCM testing OS is really not that important).
Expand Down Expand Up @@ -107,7 +111,11 @@ jobs:
{
platform: seafile,
version: 11.0.5
}
},
{
platform: ocmstub,
version: "1.0"
},
]
exclude:
# seafile doesn't support receiving ocm shares to other platforms yet! exclude tests.
Expand Down Expand Up @@ -206,7 +214,7 @@ jobs:
{
platform: owncloud,
version: v10.14.0
}
},
]
receiver: [
{
Expand All @@ -220,7 +228,7 @@ jobs:
{
platform: owncloud,
version: v10.14.0
}
},
]

# The OS to run tests on, (I believe for OCM testing OS is really not that important).
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
import {
createShareV27,
renameFileV27,
navigationSwitchLeftSideV27,
selectAppFromLeftSideV27,
} from '../utils/nextcloud-v27'

describe('Native federated sharing functionality for Nextcloud', () => {
it('Send federated share <file> from Nextcloud v27 to Nextcloud v27', () => {
// share from Nextcloud 1.
cy.loginNextcloud('https://nextcloud1.docker', 'einstein', 'relativity')

renameFileV27('welcome.txt', 'nc1-to-nc2-share.txt')
createShareV27('nc1-to-nc2-share.txt', 'michiel', 'nextcloud2.docker')
})

it('Receive federated share <file> from Nextcloud v27 to OcmStub 1.0', () => {
// accept share from OcmStub 2.
cy.loginOcmStub('https://ocmstub2.docker/?')

cy.contains('"shareWith": "michiel@https://ocmstub2.docker"').should('be.visible')
cy.contains('"shareType": "user"').should('be.visible')
cy.contains('"name": "nc1-to-os2-share.txt"').should('be.visible')
cy.contains('"resourceType": "file"').should('be.visible')
cy.contains('"owner": "einstein@https://nextcloud1.docker/"').should('be.visible')
cy.contains('"sharedBy": "einstein@https://nextcloud1.docker/"').should('be.visible')
cy.contains('"ownerDisplayName": "einstein"').should('be.visible')
cy.contains('"description": ""').should('be.visible')
cy.contains('"shareWith": "michiel@https://ocmstub2.docker"').should('be.visible')
cy.contains('"protocol": { "name": "webdav", "options": { "sharedSecret": "').should('be.visible')
cy.contains('"permissions": "{http://open-cloud-mesh.org/ns}share-permissions"').should('be.visible')
})
})
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { createShareV28, renameFileV28 } from '../utils/nextcloud-v28'

describe('Native federated sharing functionality for Nextcloud v2.8', () => {
describe('Native federated sharing functionality for Nextcloud v28', () => {
it('Send federated share <file> from Nextcloud to Nextcloud', () => {
// share from Nextcloud 1.
cy.loginNextcloud('https://nextcloud1.docker', 'einstein', 'relativity')
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import { createShareV28, renameFileV28 } from '../utils/nextcloud-v28'

describe('Native federated sharing functionality for Nextcloud v28', () => {
it('Send federated share <file> from Nextcloud to Nextcloud', () => {
// share from Nextcloud 1.
cy.loginNextcloud('https://nextcloud1.docker', 'einstein', 'relativity')

renameFileV28('welcome.txt', 'nc1-to-os2-share.txt')
createShareV28('nc1-to-os2-share.txt', 'michiel', 'ocmstub2.docker')
})

it('Receive federated share <file> from Nextcloud v28 to OcmStub 1.0', () => {
// accept share from OcmStub 2.
cy.loginOcmStub('https://ocmstub2.docker/?')

cy.contains('"shareWith": "michiel@https://ocmstub2.docker"').should('be.visible')
cy.contains('"shareType": "user"').should('be.visible')
cy.contains('"name": "nc1-to-os2-share.txt"').should('be.visible')
cy.contains('"resourceType": "file"').should('be.visible')
cy.contains('"owner": "einstein@https://nextcloud1.docker/"').should('be.visible')
cy.contains('"sharedBy": "einstein@https://nextcloud1.docker/"').should('be.visible')
cy.contains('"ownerDisplayName": "einstein"').should('be.visible')
cy.contains('"description": ""').should('be.visible')
cy.contains('"shareWith": "michiel@https://ocmstub2.docker"').should('be.visible')
cy.contains('"protocol": { "name": "webdav", "options": { "sharedSecret": "').should('be.visible')
cy.contains('"permissions": "{http://open-cloud-mesh.org/ns}share-permissions"').should('be.visible')
})
})
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
import {
createShare,
renameFile,
selectAppFromLeftSide
} from '../utils/owncloud'

describe('Native federated sharing functionality for ownCloud', () => {
it('Send federated share <file> from ownCloud v10 to ownCloud v10', () => {
// share from ownCloud 1.
cy.loginOwncloud('https://owncloud1.docker', 'marie', 'radioactivity')

renameFile('welcome.txt', 'oc1-to-oc2-share.txt')
createShare('oc1-to-oc2-share.txt', 'mahdi', 'owncloud2.docker')
})

it('Receive federated share <file> from ownCloud v10 to OcmStub 1.0', () => {
// accept share from OcmStub 2.
cy.loginOcmStub('https://ocmstub2.docker/?')

cy.contains('"shareWith": "michiel@https://ocmstub2.docker"').should('be.visible')
cy.contains('"shareType": "user"').should('be.visible')
cy.contains('"name": "nc1-to-os2-share.txt"').should('be.visible')
cy.contains('"resourceType": "file"').should('be.visible')
cy.contains('"owner": "einstein@https://owncloud1.docker/"').should('be.visible')
cy.contains('"sharedBy": "einstein@https://owncloud1.docker/"').should('be.visible')
cy.contains('"ownerDisplayName": "einstein"').should('be.visible')
cy.contains('"description": ""').should('be.visible')
cy.contains('"shareWith": "michiel@https://ocmstub2.docker"').should('be.visible')
cy.contains('"protocol": { "name": "webdav", "options": { "sharedSecret": "').should('be.visible')
cy.contains('"permissions": "{http://open-cloud-mesh.org/ns}share-permissions"').should('be.visible')
})
})
Loading
Loading