diff --git a/.drone.star b/.drone.star index f73c49f46dc..51518ceddf4 100644 --- a/.drone.star +++ b/.drone.star @@ -99,9 +99,6 @@ config = { "webUIPreview", "webUILogin", ], - "oCISSharingBasic": [ - "webUISharingAcceptShares", - ], "oCISFiles1": [ "webUICreateFilesFolders", "webUIDeleteFilesFolders", 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 853ee14fdab..28dcb6a447c 100644 --- a/tests/acceptance/expected-failures-with-ocis-server-ocis-storage.md +++ b/tests/acceptance/expected-failures-with-ocis-server-ocis-storage.md @@ -24,7 +24,3 @@ Other free text and markdown formatting can be used elsewhere in the document if ### [empty subfolder inside a folder to be uploaded is not created on the server](https://github.com/owncloud/web/issues/6348) - [webUIUpload/upload.feature:43](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUIUpload/upload.feature#L43) - -### [PROPFIND to sub-folder of a shared resources with same name gives 404](https://github.com/owncloud/ocis/issues/3859) - -- [webUISharingAcceptShares/acceptShares.feature:16](https://github.com/owncloud/web/blob/master/tests/acceptance/features/webUISharingAcceptShares/acceptShares.feature#L16) diff --git a/tests/acceptance/features/webUISharingAcceptShares/acceptShares.feature b/tests/acceptance/features/webUISharingAcceptShares/acceptShares.feature deleted file mode 100644 index 6b7ece6e5ae..00000000000 --- a/tests/acceptance/features/webUISharingAcceptShares/acceptShares.feature +++ /dev/null @@ -1,28 +0,0 @@ -Feature: accept/decline shares coming from internal users - As a user - I want to have control of which received shares I accept - So that I can keep my file system clean - - Background: - Given the administrator has set the default folder for received shares to "Shares" in the server - And these users have been created with default attributes and without skeleton files in the server: - | username | - | Alice | - | Brian | - And user "Brian" has logged in using the webUI - - - @issue-3859 - Scenario: receive shares with same name from different users, accept one by one - Given user "Carol" has been created with default attributes and without skeleton files in the server - And user "Carol" has created folder "/simple-folder" in the server - And user "Carol" has created folder "/simple-folder/from_Carol" in the server - And user "Carol" has shared folder "/simple-folder" with user "Brian" in the server - And user "Alice" has created folder "/simple-folder" in the server - And user "Alice" has created folder "/simple-folder/from_Alice" in the server - And user "Alice" has shared folder "/simple-folder" with user "Brian" in the server - And the user has browsed to the shared-with-me page - Then folder "simple-folder" shared by "Alice Hansen" should be in "Accepted" state on the webUI - Then folder "simple-folder (2)" shared by "Carol King" should be in "Accepted" state on the webUI - And as "Brian" folder "from_Alice" should exist inside folder "/Shares/simple-folder" in the server - And as "Brian" folder "from_Carol" should exist inside folder "/Shares/simple-folder (2)" in the server diff --git a/tests/e2e/cucumber/features/smoke/shares/share.feature b/tests/e2e/cucumber/features/smoke/shares/share.feature index 907c30222f4..287bc4b7226 100644 --- a/tests/e2e/cucumber/features/smoke/shares/share.feature +++ b/tests/e2e/cucumber/features/smoke/shares/share.feature @@ -158,3 +158,44 @@ Feature: share And "Brian" navigates to the shared with me page And "Brian" logs out + + + Scenario: receive two shares with same name + Given "Admin" creates following users using API + | id | + | Carol | + And "Alice" logs in + And "Alice" creates the following folder in personal space using API + | name | + | test-folder | + And "Alice" creates the following files into personal space using API + | pathToFile | content | + | testfile.txt | example text | + And "Alice" opens the "files" app + And "Alice" shares the following resource using the sidebar panel + | resource | recipient | type | role | + | testfile.txt | Brian | user | Can view | + | test-folder | Brian | user | Can view | + And "Alice" logs out + And "Carol" logs in + And "Carol" creates the following folder in personal space using API + | name | + | test-folder | + And "Carol" creates the following files into personal space using API + | pathToFile | content | + | testfile.txt | example text | + And "Carol" opens the "files" app + And "Carol" shares the following resource using the sidebar panel + | resource | recipient | type | role | + | testfile.txt | Brian | user | Can view | + | test-folder | Brian | user | Can view | + And "Carol" logs out + When "Brian" navigates to the shared with me page + Then following resources should be displayed in the Shares for user "Brian" + | resource | + | testfile.txt | + | test-folder | + # https://github.com/owncloud/ocis/issues/8471 + # | testfile (1).txt | + # | test-folder (1) | + And "Brian" logs out diff --git a/tests/e2e/cucumber/steps/ui/resources.ts b/tests/e2e/cucumber/steps/ui/resources.ts index 562bbd1f31c..2daf04eb84a 100644 --- a/tests/e2e/cucumber/steps/ui/resources.ts +++ b/tests/e2e/cucumber/steps/ui/resources.ts @@ -319,7 +319,7 @@ When( ) Then( - /^following resources (should|should not) be displayed in the (search list|files list) for user "([^"]*)"$/, + /^following resources (should|should not) be displayed in the (search list|files list|Shares) for user "([^"]*)"$/, async function ( this: World, actionType: string, diff --git a/tests/e2e/support/objects/app-files/resource/actions.ts b/tests/e2e/support/objects/app-files/resource/actions.ts index 187b405e511..bb2adfcaf30 100644 --- a/tests/e2e/support/objects/app-files/resource/actions.ts +++ b/tests/e2e/support/objects/app-files/resource/actions.ts @@ -113,6 +113,7 @@ const highlightedFileRowSelector = '#files-space-table tr.oc-table-highlighted' const emptyTrashbinButtonSelector = '.oc-files-actions-empty-trash-bin-trigger' const resourceLockIcon = '//*[@data-test-resource-name="%s"]/ancestor::tr//td//span[contains(@class, "oc-resource-icon-status-badge-inner")]' +const sharesNavigationButtonSelector = '.oc-sidebar-nav [data-nav-name="files-shares"]' export const clickResource = async ({ page, @@ -1355,6 +1356,19 @@ export const getDisplayedResourcesFromFilesList = async (page): Promise => { + const files = [] + await page.locator(sharesNavigationButtonSelector).click() + const result = await page.locator('[data-test-resource-path]') + + const count = await result.count() + for (let i = 0; i < count; i++) { + files.push(await result.nth(i).getAttribute('data-test-resource-name')) + } + + return files +} + export interface switchViewModeArgs { page: Page target: 'resource-table' | 'resource-tiles' diff --git a/tests/e2e/support/objects/app-files/resource/index.ts b/tests/e2e/support/objects/app-files/resource/index.ts index d302e4b0bf1..dce63168cfb 100644 --- a/tests/e2e/support/objects/app-files/resource/index.ts +++ b/tests/e2e/support/objects/app-files/resource/index.ts @@ -187,6 +187,8 @@ export class Resource { return po.getDisplayedResourcesFromFilesList(this.#page) } else if (args.keyword === 'search list') { return po.getDisplayedResourcesFromSearch(this.#page) + } else if (args.keyword === 'Shares') { + return po.getDisplayedResourcesFromShares(this.#page) } else { throw new Error('Unknown keyword') }