diff --git a/tests/acceptance/features/webUIPreview/mediaPreview.feature b/tests/acceptance/features/webUIPreview/mediaPreview.feature index 7312d622c19..d2a8939e2e3 100644 --- a/tests/acceptance/features/webUIPreview/mediaPreview.feature +++ b/tests/acceptance/features/webUIPreview/mediaPreview.feature @@ -28,7 +28,7 @@ Feature: display image in preview app on the webUI And user "Alice" has created a public link with following settings in the server | path | simple-empty-folder | When the public uses the webUI to access the last public link created by user "Alice" in a new session - And the public views the file "test_video.mp4" in the preview app using the webUI + And the public views the single share file "test_video.mp4" in the preview app using the webUI Then the file "test_video.mp4" should be displayed in the preview app webUI diff --git a/tests/acceptance/features/webUISharingPublicBasic/publicLinkCreate.feature b/tests/acceptance/features/webUISharingPublicBasic/publicLinkCreate.feature index 4c0714bb150..86365ce1e0a 100644 --- a/tests/acceptance/features/webUISharingPublicBasic/publicLinkCreate.feature +++ b/tests/acceptance/features/webUISharingPublicBasic/publicLinkCreate.feature @@ -22,7 +22,7 @@ Feature: Create public link shares | name | Link | And a link named "Link" should be listed with role "Anyone with the link can view" in the public link list of resource "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 @smokeTest @ocisSmokeTest @issue-ocis-reva-383 Scenario: simple file sharing by public link @@ -38,7 +38,7 @@ Feature: Create public link shares | name | Link | And a link named "Link" should be listed with role "Anyone with the link can view" in the public link list of resource "lorem.txt" 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 @skipOnOC10 @issue-ocis-reva-383 # When this issue is fixed delete this scenario and use the one above @@ -54,7 +54,7 @@ Feature: Create public link shares | permissions | read | | 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 @skipOnOC10 @issue-ocis-reva-383 # When this issue is fixed delete this scenario and use the one above @@ -69,7 +69,7 @@ Feature: Create public link shares | permissions | read | | path | /lorem.txt | 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 @issue-ocis-reva-389 Scenario: user shares a public link with folder longer than 64 chars and shorter link name @@ -79,7 +79,7 @@ Feature: Create public link shares And user "Alice" has logged in using the webUI When the user creates a new public link for folder "aquickbrownfoxjumpsoveraverylazydogaquickbrownfoxjumpsoveralazydog" using the webUI 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 + Then file "lorem.txt" should be listed on the webUI as single share Scenario: share two files with same name but different paths by public link diff --git a/tests/acceptance/features/webUISharingPublicBasic/publicLinkEdit.feature b/tests/acceptance/features/webUISharingPublicBasic/publicLinkEdit.feature index fdf61d58ff3..6936fa8cae6 100644 --- a/tests/acceptance/features/webUISharingPublicBasic/publicLinkEdit.feature +++ b/tests/acceptance/features/webUISharingPublicBasic/publicLinkEdit.feature @@ -69,7 +69,7 @@ Feature: Edit public link shares | password | pass123 | When the user renames the public link named "Public-link" of folder "simple-folder" to "simple-folder Share" And 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: user edits the password of an already existing public link @@ -167,4 +167,4 @@ 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 "lorem.txt" adding a password "pass123" And 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 diff --git a/tests/acceptance/features/webUISharingPublicDifferentRoles/shareByPublicLinkDifferentRoles.feature b/tests/acceptance/features/webUISharingPublicDifferentRoles/shareByPublicLinkDifferentRoles.feature index 462781401d9..b070dbdac89 100644 --- a/tests/acceptance/features/webUISharingPublicDifferentRoles/shareByPublicLinkDifferentRoles.feature +++ b/tests/acceptance/features/webUISharingPublicDifferentRoles/shareByPublicLinkDifferentRoles.feature @@ -27,7 +27,7 @@ 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 + Then file "lorem.txt" should be listed on the webUI as single share Examples: | role | displayed-role | permissions | | Viewer | Anyone with the link can view | 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 8bc0d016a94..f0b04358e76 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) })