diff --git a/tests/acceptance/expected-failures-with-oc10-server-oauth2-login.md b/tests/acceptance/expected-failures-with-oc10-server-oauth2-login.md index 64c0aa62982..e2576413bb5 100644 --- a/tests/acceptance/expected-failures-with-oc10-server-oauth2-login.md +++ b/tests/acceptance/expected-failures-with-oc10-server-oauth2-login.md @@ -18,7 +18,7 @@ Other free text and markdown formatting can be used elsewhere in the document if - [webUISharingPublicManagement/shareByPublicLink.feature:24](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingPublicManagement/shareByPublicLink.feature#L24) ### [Uploading folders does not work in files-drop](https://github.com/owncloud/web/issues/2443) -- [webUISharingPublicDifferentRoles/shareByPublicLinkDifferentRoles.feature:245](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingPublicDifferentRoles/shareByPublicLinkDifferentRoles.feature#L245) +- [webUISharingPublicDifferentRoles/shareByPublicLinkDifferentRoles.feature:263](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingPublicDifferentRoles/shareByPublicLinkDifferentRoles.feature#L263) ### [Writing to locked files/folders give only a generic error message](https://github.com/owncloud/web/issues/5741) - [webUIWebdavLockProtection/upload.feature:32](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUIWebdavLockProtection/upload.feature#L32) diff --git a/tests/acceptance/expected-failures-with-ocis-server-ocis-storage.md b/tests/acceptance/expected-failures-with-ocis-server-ocis-storage.md index 9987d7e594b..45222dcaf94 100644 --- a/tests/acceptance/expected-failures-with-ocis-server-ocis-storage.md +++ b/tests/acceptance/expected-failures-with-ocis-server-ocis-storage.md @@ -84,7 +84,7 @@ Other free text and markdown formatting can be used elsewhere in the document if - [webUISharingPublicManagement/shareByPublicLink.feature:24](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingPublicManagement/shareByPublicLink.feature#L24) ### [Uploading folders does not work in files-drop](https://github.com/owncloud/web/issues/2443) -- [webUISharingPublicDifferentRoles/shareByPublicLinkDifferentRoles.feature:245](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingPublicDifferentRoles/shareByPublicLinkDifferentRoles.feature#L245) +- [webUISharingPublicDifferentRoles/shareByPublicLinkDifferentRoles.feature:263](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingPublicDifferentRoles/shareByPublicLinkDifferentRoles.feature#L263) ### [Resources cannot be locked under ocis](https://github.com/owncloud/ocis/issues/1284) - [webUIWebdavLockProtection/delete.feature:33](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUIWebdavLockProtection/delete.feature#L33) diff --git a/tests/acceptance/features/webUISharingPublicBasic/publicLinkEdit.feature b/tests/acceptance/features/webUISharingPublicBasic/publicLinkEdit.feature index 6936fa8cae6..ebaf0dfea3d 100644 --- a/tests/acceptance/features/webUISharingPublicBasic/publicLinkEdit.feature +++ b/tests/acceptance/features/webUISharingPublicBasic/publicLinkEdit.feature @@ -110,8 +110,8 @@ Feature: Edit public link shares And user "Alice" has logged in using the webUI When the user tries to edit the public link named "Public-link" of folder "simple-folder" changing the role to "Viewer" And the public uses the webUI to access the last public link created by user "Alice" in a new session - Then file "lorem.txt" should be listed on the webUI - And it should not be possible to delete file "lorem.txt" using the webUI + Then file "lorem.txt" should be listed on the webUI as single share + And it should not be possible to delete file "lorem.txt" as single share using the webUI @issue-ocis-reva-292 @disablePreviews Scenario: user edits the permission of an already existing public link from read to read-write diff --git a/tests/acceptance/features/webUISharingPublicDifferentRoles/shareByPublicLinkDifferentRoles.feature b/tests/acceptance/features/webUISharingPublicDifferentRoles/shareByPublicLinkDifferentRoles.feature index b5825758d1c..d3b1ba07ef6 100644 --- a/tests/acceptance/features/webUISharingPublicDifferentRoles/shareByPublicLinkDifferentRoles.feature +++ b/tests/acceptance/features/webUISharingPublicDifferentRoles/shareByPublicLinkDifferentRoles.feature @@ -12,6 +12,26 @@ Feature: Share by public link with different roles Given user "Alice" has been created with default attributes and without skeleton files in the server And user "Alice" has created folder "simple-folder" in the server + Scenario Outline: simple sharing by public link with read-only role + Given user "Alice" has created file "simple-folder/lorem.txt" in the server + And user "Alice" has logged in using the webUI + When the user creates a new public link for folder "simple-folder" using the webUI + And the user sets the role of the most recently created public link of resource "simple-folder" to "" + Then user "Alice" should have a share with these details in the server: + | field | value | + | share_type | public_link | + | uid_owner | Alice | + | permissions | | + | path | /simple-folder | + # Once issue @issue-ocis-reva-383 is resolved uncomment lines below + # | name | Link | + # And a link named "Link" should be listed with role "" in the public link list of folder "simple-folder" on the webUI + When the public uses the webUI to access the last public link created by user "Alice" in a new session + Then file "lorem.txt" should be listed on the webUI as single share + Examples: + | role | permissions | + | Viewer | read | + @smokeTest @ocisSmokeTest @issue-ocis-reva-383 Scenario Outline: simple sharing by public link with different roles Given user "Alice" has created file "simple-folder/lorem.txt" in the server @@ -27,10 +47,9 @@ Feature: Share by public link with different roles | name | Link | And a link named "Link" should be listed with role "" in the public link list of folder "simple-folder" on the webUI When the public uses the webUI to access the last public link created by user "Alice" in a new session - Then file "lorem.txt" should be listed on the webUI as single share + Then file "lorem.txt" should be listed on the webUI Examples: | role | permissions | - | Viewer | read | | Editor | read, update, create, delete | | Contributor | read, create | @@ -48,10 +67,9 @@ Feature: Share by public link with different roles | permissions | | | path | /simple-folder | When the public uses the webUI to access the last public link created by user "Alice" in a new session - Then file "lorem.txt" should be listed on the webUI as single share + Then file "lorem.txt" should be listed on the webUI Examples: | role | permissions | - | Viewer | read | | Editor | read, update, create, delete | | Contributor | read, create | @@ -133,7 +151,7 @@ Feature: Share by public link with different roles Given user "Alice" has created file "simple-folder/lorem.txt" in the server And user "Alice" has shared folder "simple-folder" with link with "read" permissions in the server When the public uses the webUI to access the last public link created by user "Alice" in a new session - Then it should not be possible to delete file "lorem.txt" using the webUI + Then it should not be possible to delete file "lorem.txt" as single share using the webUI Scenario: creating a public link with "Editor" role makes it possible to upload a file diff --git a/tests/acceptance/pageObjects/personalPage.js b/tests/acceptance/pageObjects/personalPage.js index 3b9dd698246..77472035437 100644 --- a/tests/acceptance/pageObjects/personalPage.js +++ b/tests/acceptance/pageObjects/personalPage.js @@ -228,6 +228,9 @@ module.exports = { ) return canCreate }, + checkForNonPresentDeleteButtonInSingleShareView: function () { + return this.waitForElementNotPresent('@deleteSelectedButton') + }, deleteAllCheckedFiles: function () { return this.waitForElementVisible('@deleteSelectedButton') .click('@deleteSelectedButton') diff --git a/tests/acceptance/stepDefinitions/filesContext.js b/tests/acceptance/stepDefinitions/filesContext.js index d45b29d88ac..ad3d8d57d48 100644 --- a/tests/acceptance/stepDefinitions/filesContext.js +++ b/tests/acceptance/stepDefinitions/filesContext.js @@ -1067,6 +1067,12 @@ Then( ) } ) +Then( + 'it should not be possible to delete file {string} as single share using the webUI', + function (resource) { + return client.page.personalPage().checkForNonPresentDeleteButtonInSingleShareView() + } +) Then( 'it should be possible to delete file/folder {string} using the webUI',