diff --git a/packages/web-app-files/src/components/SideBar/Actions/SpaceActions.vue b/packages/web-app-files/src/components/SideBar/Actions/SpaceActions.vue index 817614406d3..c06d62081d9 100644 --- a/packages/web-app-files/src/components/SideBar/Actions/SpaceActions.vue +++ b/packages/web-app-files/src/components/SideBar/Actions/SpaceActions.vue @@ -5,7 +5,12 @@ :cancel="closeReadmeContentModal" :space="resources[0]" /> - + " 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 + Then file "lorem.txt" should be listed on the webUI as single share Examples: | role | permissions | | Viewer | read | @@ -48,7 +48,7 @@ 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 + Then file "lorem.txt" should be listed on the webUI as single share Examples: | role | permissions | | Viewer | read | @@ -237,7 +237,7 @@ Feature: Share by public link with different roles And the public uploads file "'single'quotes.txt" in files-drop page And the public uploads file "new-lorem.txt" in files-drop page Then the following files should be listed on the files-drop page: - | new-lorem.txt | + | new-lorem.txt | And as "Alice" the content of "simple-folder/'single'quotes.txt" in the server should be the same as the content of local file "'single'quotes.txt" And as "Alice" the content of "simple-folder/new-lorem.txt" in the server should be the same as the content of local file "new-lorem.txt" @@ -266,7 +266,7 @@ Feature: Share by public link with different roles And the public uploads file "'single'quotes.txt" in files-drop page And the public uploads file "new-lorem.txt" in files-drop page Then the following files should be listed on the files-drop page: - | new-lorem.txt | + | new-lorem.txt | And as "Alice" the content of "simple-folder/'single'quotes.txt" in the server should be the same as the content of local file "'single'quotes.txt" And as "Alice" the content of "simple-folder/new-lorem.txt" in the server should be the same as the content of local file "new-lorem.txt" diff --git a/tests/acceptance/features/webUISharingPublicManagement/shareByPublicLink.feature b/tests/acceptance/features/webUISharingPublicManagement/shareByPublicLink.feature index 967c8f1bb08..ff48c1ec015 100644 --- a/tests/acceptance/features/webUISharingPublicManagement/shareByPublicLink.feature +++ b/tests/acceptance/features/webUISharingPublicManagement/shareByPublicLink.feature @@ -77,7 +77,7 @@ Feature: Public link share management And user "Alice" has logged in using the webUI When the user copies the url of public link named "Public-link" of folder "simple-folder" using the webUI And the user navigates to the copied public link using the webUI - Then file "lorem.txt" should be listed on the webUI + Then file "lorem.txt" should be listed on the webUI as single share Scenario: access details dialog of public share and check the tabs displayed @@ -148,7 +148,7 @@ Feature: Public link share management | name | public link | | permissions | read | 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 + Then file "lorem.txt" should be listed on the webUI as single share And the create button should not be visible on the webUI diff --git a/tests/acceptance/features/webUISharingPublicManagement/sharingPublicSession.feature b/tests/acceptance/features/webUISharingPublicManagement/sharingPublicSession.feature index b730f9102ac..4f1669c7b72 100644 --- a/tests/acceptance/features/webUISharingPublicManagement/sharingPublicSession.feature +++ b/tests/acceptance/features/webUISharingPublicManagement/sharingPublicSession.feature @@ -12,9 +12,9 @@ Feature: Session storage for public link And 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 and password "pass123" in the server When the public uses the webUI to access the last public link created by user "Alice" with password "pass123" in a new session - Then file "lorem.txt" should be listed on the webUI + Then file "lorem.txt" should be listed on the webUI as single share When the user reloads the current page of the webUI - Then file "lorem.txt" should be listed on the webUI + Then file "lorem.txt" should be listed on the webUI as single share Scenario: Public accesses the public link files page in a new session after visiting once (folder share) @@ -22,14 +22,14 @@ Feature: Session storage for public link And 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 and password "pass123" in the server When the public uses the webUI to access the last public link created by user "Alice" with password "pass123" in a new session - Then file "lorem.txt" should be listed on the webUI + Then file "lorem.txt" should be listed on the webUI as single share Scenario: Public accesses the public link files page in a new session after visiting once (file share) Given user "Alice" has created file "lorem.txt" in the server And user "Alice" has shared folder "lorem.txt" with link with "read" permissions and password "pass123" in the server When the public uses the webUI to access the last public link created by user "Alice" with password "pass123" in a new session - Then file "lorem.txt" should be listed on the webUI + Then file "lorem.txt" should be listed on the webUI as single share Scenario: Public link author changes the password when the public is in public link files page session (folder share) @@ -37,21 +37,21 @@ Feature: Session storage for public link And 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 and password "pass123" in the server When the public uses the webUI to access the last public link created by user "Alice" with password "pass123" in a new session - Then file "lorem.txt" should be listed on the webUI + Then file "lorem.txt" should be listed on the webUI as single share And user "Alice" changes the password of last public link to "newpass" using the Sharing API in the server When the user reloads the current page of the webUI Then the password input for the public link should appear on the webUI When the user accesses the public link with password "newpass" using the webUI - Then file "lorem.txt" should be listed on the webUI + Then file "lorem.txt" should be listed on the webUI as single share Scenario: Public link author changes the password when the public is in public link files page session (file share) Given user "Alice" has created file "lorem.txt" in the server And user "Alice" has shared folder "lorem.txt" with link with "read" permissions and password "pass123" in the server When the public uses the webUI to access the last public link created by user "Alice" with password "pass123" in a new session - Then file "lorem.txt" should be listed on the webUI + Then file "lorem.txt" should be listed on the webUI as single share And user "Alice" changes the password of last public link to "newpass" using the Sharing API in the server When the user reloads the current page of the webUI Then the password input for the public link should appear on the webUI When the user accesses the public link with password "newpass" using the webUI - Then file "lorem.txt" should be listed on the webUI + Then file "lorem.txt" should be listed on the webUI as single share diff --git a/tests/acceptance/pageObjects/FilesPageElement/filesList.js b/tests/acceptance/pageObjects/FilesPageElement/filesList.js index 7031ffdf9eb..7fb94c3c9bd 100644 --- a/tests/acceptance/pageObjects/FilesPageElement/filesList.js +++ b/tests/acceptance/pageObjects/FilesPageElement/filesList.js @@ -343,6 +343,10 @@ module.exports = { await this.waitForElementPresent({ selector: '@anyAfterLoading', abortOnFailure }) return this }, + waitForFileVisibleAsSingleShare: async function (resource) { + await this.waitForElementPresent({ selector: '@sharedDetailResource' }) + return this + }, /** * Wait for a filerow with given filename to be visible * @@ -699,6 +703,9 @@ module.exports = { filesListProgressBar: { selector: '#files-list-progress' }, + sharedDetailResource: { + selector: '.resource-details .oc-resource-name' + }, anyAfterLoading: { selector: '//*[self::table[contains(@class, "files-table")] or self::div[contains(@class, "files-empty")] or self::div[contains(@class, "files-not-found")] or self::div[contains(@class, "resource-details")]]', diff --git a/tests/acceptance/stepDefinitions/filesContext.js b/tests/acceptance/stepDefinitions/filesContext.js index 392848b0c43..d45b29d88ac 100644 --- a/tests/acceptance/stepDefinitions/filesContext.js +++ b/tests/acceptance/stepDefinitions/filesContext.js @@ -359,6 +359,10 @@ Then('folder {string} should be listed on the webUI', (folder) => { return client.page.FilesPageElement.filesList().waitForFileVisible(folder, 'folder') }) +Then('file/folder {string} should be listed on the webUI as single share', (resource) => { + return client.page.FilesPageElement.filesList().waitForFileVisibleAsSingleShare(resource) +}) + Then('file/folder with path {string} should be listed on the webUI', function (path) { return client.page.FilesPageElement.filesList().waitForFileVisible(path) })