Skip to content

Commit

Permalink
upload or create into folder Shares
Browse files Browse the repository at this point in the history
  • Loading branch information
ScharfViktor authored and phil-davis committed Aug 10, 2021
1 parent c778eda commit f0daf59
Show file tree
Hide file tree
Showing 7 changed files with 143 additions and 9 deletions.
23 changes: 16 additions & 7 deletions .drone.star
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ config = {
"oC10MoveUpload": [
"webUIMoveFilesFolders",
"webUIUpload",
"webUIOperationsWithFolderShares",
],
"oC10Resharing": [
"webUIResharing1",
Expand Down Expand Up @@ -141,6 +142,7 @@ config = {
},
"visualTesting": False,
"screenShots": False,
"filterTags": "not @skipOnOC10 and not @notToImplementOnOC10",
},
"webUINotification": {
"type": NOTIFICATIONS,
Expand All @@ -159,6 +161,7 @@ config = {
},
"visualTesting": False,
"screenShots": False,
"filterTags": "not @skipOnOC10 and not @notToImplementOnOC10",
"notificationsAppNeeded": True,
},
"webUIFederation": {
Expand All @@ -172,6 +175,7 @@ config = {
"EXPECTED_FAILURES_FILE": "%s/tests/acceptance/expected-failures-with-oc10-server-oauth2-login.md" % dir["web"],
},
"notificationsAppNeeded": True,
"filterTags": "not @skipOnOC10 and not @notToImplementOnOC10",
"federatedServerNeeded": True,
"federatedServerVersion": "daily-master-qa",
},
Expand All @@ -189,7 +193,7 @@ config = {
"SCREEN_RESOLUTION": "768x1024",
},
"notificationsAppNeeded": True,
"filterTags": "@smokeTest and not @skipOnXGAPortraitResolution and not @skip and not @skipOnOC10",
"filterTags": "@smokeTest and not @skipOnXGAPortraitResolution and not @skip and not @skipOnOC10 and not @notToImplementOnOC10",
},
"webUI-XGA": {
"type": FULL,
Expand All @@ -206,6 +210,7 @@ config = {
"webUIFilesList",
"webUIFilesSearch",
"webUILogin",
"webUIOperationsWithFolderShares",
"webUIPreview",
"webUIPrivateLinks",
"webUIRenameFiles",
Expand Down Expand Up @@ -267,7 +272,7 @@ config = {
"EXPECTED_FAILURES_FILE": "%s/tests/acceptance/expected-failures-XGA-with-oc10-server-oauth2-login.md" % dir["web"],
"SCREEN_RESOLUTION": "768x1024",
},
"filterTags": "@smokeTest and not @skipOnXGAPortraitResolution and not @skip and not @skipOnOC10",
"filterTags": "@smokeTest and not @skipOnXGAPortraitResolution and not @skip and not @skipOnOC10 and not @notToImplementOnOC10",
},
"webUI-Notifications-iPhone": {
"type": NOTIFICATIONS,
Expand All @@ -283,7 +288,7 @@ config = {
"SCREEN_RESOLUTION": "375x812",
},
"notificationsAppNeeded": True,
"filterTags": "@smokeTest and not @skipOnIphoneResolution and not @skip and not @skipOnOC10",
"filterTags": "@smokeTest and not @skipOnIphoneResolution and not @skip and not @skipOnOC10 and not @notToImplementOnOC10",
},
"webUI-iPhone": {
"type": FULL,
Expand All @@ -300,6 +305,7 @@ config = {
"webUIFilesList",
"webUIFilesSearch",
"webUILogin",
"webUIOperationsWithFolderShares",
"webUIPreview",
"webUIPrivateLinks",
"webUIRenameFiles",
Expand Down Expand Up @@ -361,7 +367,7 @@ config = {
"EXPECTED_FAILURES_FILE": "%s/tests/acceptance/expected-failures-Iphone-oc10-server-oauth2-login.md" % dir["web"],
"SCREEN_RESOLUTION": "375x812",
},
"filterTags": "@smokeTest and not @skipOnIphoneResolution and not @skip and not @skipOnOC10",
"filterTags": "@smokeTest and not @skipOnIphoneResolution and not @skip and not @skipOnOC10 and not @notToImplementOnOC10",
},
"webUI-ocis": {
"type": FULL,
Expand Down Expand Up @@ -451,6 +457,7 @@ config = {
"webUIUpload",
"webUIMoveFilesFolders",
"webUIUserJourney",
"webUIOperationsWithFolderShares",
],
},
"extraEnvironment": {
Expand Down Expand Up @@ -481,7 +488,7 @@ config = {
"SERVER_HOST": "http://owncloud/index.php/apps/web/index.html",
"EXPECTED_FAILURES_FILE": "%s/tests/acceptance/expected-failures-with-oc10-server-oauth2-login-and-web-integration-app.md" % dir["web"],
},
"filterTags": "not @skip and not @skipOnOC10 and not @openIdLogin and @smokeTest",
"filterTags": "not @skip and not @skipOnOC10 and not @notToImplementOnOC10 and not @openIdLogin and @smokeTest",
"oc10IntegrationAppIncluded": True,
"notificationsAppNeeded": True,
"screenShots": False,
Expand All @@ -501,6 +508,7 @@ config = {
"webUIFilesList",
"webUIFilesSearch",
"webUILogin",
"webUIOperationsWithFolderShares",
"webUIPreview",
"webUIPrivateLinks",
"webUIRenameFiles",
Expand Down Expand Up @@ -563,7 +571,7 @@ config = {
"SERVER_HOST": "http://owncloud/index.php/apps/web/index.html",
"EXPECTED_FAILURES_FILE": "%s/tests/acceptance/expected-failures-with-oc10-server-oauth2-login-and-web-integration-app.md" % dir["web"],
},
"filterTags": "not @skip and not @skipOnOC10 and not @openIdLogin and @smokeTest",
"filterTags": "not @skip and not @skipOnOC10 and not @notToImplementOnOC10 and not @openIdLogin and @smokeTest",
"oc10IntegrationAppIncluded": True,
"screenShots": False,
},
Expand Down Expand Up @@ -621,6 +629,7 @@ basicTestSuites = [
"webUILogin",
"webUIMarkdownEditor",
"webUIMoveFilesFolders",
"webUIOperationsWithFolderShares",
"webUIPreview",
"webUIPrivateLinks",
"webUIRenameFiles",
Expand Down Expand Up @@ -1064,7 +1073,7 @@ def acceptance(ctx):
"databases": ["mysql:5.5"],
"extraEnvironment": {},
"cronOnly": False,
"filterTags": "not @skip and not @skipOnOC10 and not @openIdLogin",
"filterTags": "not @skip and not @skipOnOC10 and not @notToImplementOnOC10 and not @openIdLogin",
"logLevel": "2",
"notificationsAppNeeded": False,
"federatedServerNeeded": False,
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"lint": "eslint '{packages,tests}/**/*.{js,ts,vue}' --color",
"serve": "SERVER=true yarn build:w",
"test:acceptance:drone": "cucumber-js --retry 1 --require-module @babel/register --require-module @babel/polyfill --require tests/acceptance/setup.js --require tests/acceptance/stepDefinitions --format node_modules/cucumber-pretty",
"test:acceptance:oc10": "cucumber-js --require-module @babel/register --require-module @babel/polyfill --require tests/acceptance/setup.js --require tests/acceptance/stepDefinitions --format node_modules/cucumber-pretty -t \"${TEST_TAGS:-not @skip and not @skipOnOC10}\"",
"test:acceptance:oc10": "cucumber-js --require-module @babel/register --require-module @babel/polyfill --require tests/acceptance/setup.js --require tests/acceptance/stepDefinitions --format node_modules/cucumber-pretty -t \"${TEST_TAGS:-not @skip and not @skipOnOC10 and not @notToImplementOnOC10}\"",
"test:acceptance:ocis": "NODE_TLS_REJECT_UNAUTHORIZED=0 RUN_ON_OCIS=true cucumber-js --require-module @babel/register --require-module @babel/polyfill --require tests/acceptance/setup.js --require tests/acceptance/stepDefinitions --format node_modules/cucumber-pretty -t \"${TEST_TAGS:-not @skip and not @skipOnOCIS and not @notToImplementOnOCIS}\"",
"test:unit": "jest --coverage --config ./tests/unit/config/jest.config.js",
"test:integration": "jest --config ./tests/integration/config/jest.config.js"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -167,4 +167,4 @@ Other free text and markdown formatting can be used elsewhere in the document if
- [webUISharingAcceptShares/acceptShares.feature:31](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingAcceptShares/acceptShares.feature#L31)

### [Change the file content of a received shared file](https://github.com/owncloud/ocis/issues/2319)
- [webUIFilesActionMenu/versions.feature:88](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUIFilesActionMenu/versions.feature#L88)
- [webUIFilesActionMenu/versions.feature:88](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUIFilesActionMenu/versions.feature#L88)
Original file line number Diff line number Diff line change
Expand Up @@ -524,6 +524,11 @@ Other free text and markdown formatting can be used elsewhere in the document if
- [webUIUpload/upload.feature:138](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUIUpload/upload.feature#L138)
- [webUIUpload/uploadEdgecases.feature:67](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUIUpload/uploadEdgecases.feature#L67)

### [user cannot upload new folder/file into folder Shares](https://github.com/owncloud/ocis/issues/2322)
- [webUIOperationsWithFolderShares/accessToSharesFolder.feature:29](https://github.com/owncloud/web/blob/master/tests/acceptance/webUIOperationsWithFolderShares/accessToSharesFolder.feature#L29)
- [webUIOperationsWithFolderShares/accessToSharesFolder.feature:38](https://github.com/owncloud/web/blob/master/tests/acceptance/webUIOperationsWithFolderShares/accessToSharesFolder.feature#L38)
- [webUIOperationsWithFolderShares/accessToSharesFolder.feature:89](https://github.com/owncloud/web/blob/master/tests/acceptance/webUIOperationsWithFolderShares/accessToSharesFolder.feature#L89)

### [browsing directly to a details 'tab' is not possible](https://github.com/owncloud/web/issues/5464)
- [webUIFiles/browseDirectlyToDetailsTab.feature:21](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUIFiles/browseDirectlyToDetailsTab.feature#L21)
- [webUIFiles/browseDirectlyToDetailsTab.feature:22](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUIFiles/browseDirectlyToDetailsTab.feature#L22)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
Feature: Upload into a folder Shares
This suite of tests describes different behavior in oCIS and os ownCloud10 with respect to
the folder "Shares".
The folder "Shares" in oCIS is the mount point for all incoming shares so it is only used for reading
The folder "Shares" in ownCloud10 is a folder in which you can download or save files

Background:
Given the setting "shareapi_auto_accept_share" of app "core" has been set to "no"
And the administrator has set the default folder for received shares to "Shares"
And user "Alice" has been created with default attributes and without skeleton files
And user "Brian" has been created with default attributes and without skeleton files

@issue-ocis-2322
Scenario: the Shares folder does not exist if no share has been accepted
Given user "Brian" has created file "lorem.txt"
And user "Brian" has shared file "lorem.txt" with user "Alice" with "all" permissions
When user "Alice" logs in using the webUI
Then folder "Shares" should not be listed on the webUI

@issue-ocis-2322
Scenario: the Shares folder exists after accepting the first shared file
Given user "Brian" has created file "lorem.txt"
And user "Brian" has shared file "lorem.txt" with user "Alice" with "all" permissions
And user "Alice" has accepted the share "lorem.txt" offered by user "Brian"
When user "Alice" logs in using the webUI
Then folder "Shares" should be listed on the webUI

@issue-ocis-2322 @notToImplementOnOC10
Scenario: try to upload a file or a folder into a folder Shares with all permissions in oCIS
Given user "Brian" has created file "lorem.txt"
And user "Brian" has shared file "lorem.txt" with user "Alice" with "all" permissions
And user "Alice" has accepted the share "lorem.txt" offered by user "Brian"
And user "Alice" has logged in using the webUI
When the user opens folder "Shares" using the webUI
Then it should not be possible to create files using the webUI

@issue-ocis-2322 @notToImplementOnOC10
Scenario: try to upload a file or a folder into a folder Shares with read permissions in oCIS
Given user "Brian" has created file "lorem.txt"
And user "Brian" has shared file "lorem.txt" with user "Alice" with "read" permissions
And user "Alice" has accepted the share "lorem.txt" offered by user "Brian"
And user "Alice" has logged in using the webUI
When the user opens folder "Shares" using the webUI
Then it should not be possible to create files using the webUI

@issue-ocis-2322 @notToImplementOnOCIS
Scenario: upload of a file into a folder Shares in oc10
Given user "Brian" has created file "lorem.txt"
And user "Brian" has shared file "lorem.txt" with user "Alice" with "all" permissions
And user "Alice" has accepted the share "lorem.txt" offered by user "Brian"
And user "Alice" has logged in using the webUI
And the user has opened folder "Shares"
When the user uploads file "new-lorem.txt" using the webUI
Then file "new-lorem.txt" should be listed on the webUI

@issue-ocis-2322 @notToImplementOnOCIS
Scenario: upload of a folder into a folder Shares in oc 10
Given user "Brian" has created file "lorem.txt"
And user "Brian" has shared file "lorem.txt" with user "Alice" with "all" permissions
And user "Alice" has accepted the share "lorem.txt" offered by user "Brian"
And user "Alice" has logged in using the webUI
And the user has opened folder "Shares"
When the user uploads folder "PARENT" using the webUI
Then no message should be displayed on the webUI
And folder "PARENT" should be listed on the webUI

@issue-ocis-2322 @notToImplementOnOCIS
Scenario: create a new folder into a folder Shares in oc10
Given user "Brian" has been created with default attributes and without skeleton files
And user "Brian" has created file "lorem.txt"
And user "Brian" has shared file "lorem.txt" with user "Alice" with "all" permissions
And user "Alice" has accepted the share "lorem.txt" offered by user "Brian"
And user "Alice" has logged in using the webUI
And the user has opened folder "Shares"
When the user creates a folder with the name "New folder" using the webUI
Then folder "New folder" should be listed on the webUI

@issue-ocis-2322 @notToImplementOnOCIS
Scenario: move a file or a folder into a folder Shares in oc10
Given user "Brian" has created file "lorem.txt"
And user "Brian" has shared file "lorem.txt" with user "Alice" with "read" permissions
And user "Alice" has accepted the share "lorem.txt" offered by user "Brian"
And user "Alice" has created folder "NewFolder"
And user "Alice" has logged in using the webUI
When the user moves folder "NewFolder" into folder "Shares" using the webUI
Then folder "NewFolder" should be listed on the webUI

@issue-ocis-2322 @notToImplementOnOC10
Scenario: try to move a file or a folder into a folder Shares in oCIS
Given user "Brian" has created file "lorem.txt"
And user "Brian" has shared file "lorem.txt" with user "Alice" with "read" permissions
And user "Alice" has accepted the share "lorem.txt" offered by user "Brian"
And user "Alice" has created folder "NewFolder"
And user "Alice" has logged in using the webUI
When the user tries to move folder "NewFolder" into folder "Shares" using the webUI
Then the move here folder button should be disabled

@issue-ocis-2322 @notToImplementOnOCIS
Scenario: the user can delete files that they wrote into the folder Shares
Given user "Brian" has created file "lorem.txt"
And user "Brian" has shared file "lorem.txt" with user "Alice" with "all" permissions
And user "Alice" has accepted the share "lorem.txt" offered by user "Brian"
And user "Alice" has logged in using the webUI
And user "Alice" has created folder "Shares/NewFolder"
And user "Alice" has uploaded file with content "some data" to "Shares/textfile.txt"
And the user has opened folder "Shares"
When the user deletes folder "NewFolder" using the webUI
And the user deletes file "textfile.txt" using the webUI
Then folder "NewFolder" should not be listed on the webUI
And file "textfile.tx" should not be listed on the webUI
6 changes: 6 additions & 0 deletions tests/acceptance/pageObjects/personalPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,9 @@ module.exports = {
.waitForElementVisible('@clearSelectionBtn')
.click('@clearSelectionBtn')
.waitForElementNotPresent('@clearSelectionBtn')
},
checkForButtonMoveHereDisabled: function() {
return this.waitForElementVisible('@moveHereConfirmBtn')
}
},
elements: {
Expand Down Expand Up @@ -436,6 +439,9 @@ module.exports = {
},
dialogBoxInputTextInRed: {
selector: '.oc-text-input-danger'
},
moveHereConfirmBtn: {
selector: '#location-picker-btn-confirm:disabled'
}
}
}
4 changes: 4 additions & 0 deletions tests/acceptance/stepDefinitions/filesContext.js
Original file line number Diff line number Diff line change
Expand Up @@ -1250,6 +1250,10 @@ When('the user tries to move file/folder {string} into folder {string} using the
)
})

Then('the move here file/folder button should be disabled', function() {
return client.page.personalPage().checkForButtonMoveHereDisabled()
})

When('the user selects move action for folder/file {string} using the webUI', async function(
resource
) {
Expand Down

0 comments on commit f0daf59

Please sign in to comment.