Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/richdocuments.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulius Härtl <jus@bitgrid.net>2021-08-13 10:45:03 +0300
committerJulius Härtl <jus@bitgrid.net>2021-08-13 14:55:41 +0300
commit95985564d0113c380ae16e89bafb1c85ba87bf15 (patch)
treee916bab7391dc855cc8b9aa2fbcf5935a5c32d48 /tests/features/direct.feature
parent95a559512f53314ad8cc9d91683936e64ec8f921 (diff)
Add API to set the guest name for an existing WOPI token
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Diffstat (limited to 'tests/features/direct.feature')
-rw-r--r--tests/features/direct.feature87
1 files changed, 84 insertions, 3 deletions
diff --git a/tests/features/direct.feature b/tests/features/direct.feature
index 8359b020..b09103d1 100644
--- a/tests/features/direct.feature
+++ b/tests/features/direct.feature
@@ -129,7 +129,8 @@ Feature: Direct editing
And Collabora fetches and receives the following in the checkFileInfo response
| BaseFileName | document-share-link.odt |
| OwnerId | user1 |
- | UserFriendlyName | user2-displayname (Guest) |
+ | UserId | user2 |
+ | UserFriendlyName | user2-displayname |
And checkFileInfo "UserCanWrite" is true
And both Collabora files used the same file id
And Collabora can save the file with the content of "./../assets/template.ods"
@@ -151,8 +152,8 @@ Feature: Direct editing
And Collabora fetches and receives the following in the checkFileInfo response
| BaseFileName | document-share-link.odt |
| OwnerId | user1 |
- | UserFriendlyName | user2-displayname (Guest) |
- And checkFileInfo "UserId" matches "/Guest-/"
+ | UserId | user2 |
+ | UserFriendlyName | user2-displayname |
And both Collabora files used the same file id
And Collabora can not save the file with the content of "./../assets/template.ods"
Then Collabora downoads the file and it is equal to "./../assets/template.odt"
@@ -174,6 +175,57 @@ Feature: Direct editing
And Collabora fetches and receives the following in the checkFileInfo response
| BaseFileName | document-share-link.odt |
| OwnerId | user1 |
+ | UserId | user2 |
+ | UserFriendlyName | user2-displayname |
+ And checkFileInfo "UserCanWrite" is true
+ And both Collabora files used the same file id
+ And Collabora can save the file with the content of "./../assets/template.ods"
+ Then Collabora downoads the file and it is equal to "./../assets/template.ods"
+
+ Scenario: Open a file in a shared folder of a share link with direct editing as writable as a guest
+ Given on instance "serverA"
+ And as user "user1"
+ And User "user1" creates a folder "Folder"
+ And User "user1" uploads file "./../assets/template.odt" to "/Folder/document-share-link.odt"
+ When User "user1" opens "/Folder/document-share-link.odt" through direct editing
+ And Collabora fetches checkFileInfo
+ And as "user1" create a share with
+ | path | /Folder/ |
+ | shareType | 3 |
+ And Updating last share with
+ | permissions | 3 |
+ When A guest opens the file "/document-share-link.odt" in the last share link through direct editing
+ And Collabora fetches and receives the following in the checkFileInfo response
+ | BaseFileName | document-share-link.odt |
+ | OwnerId | user1 |
+ | UserFriendlyName | Anonymous guest |
+ When the guest updates the display name to "Random name"
+ And Collabora fetches checkFileInfo
+ And checkFileInfo "UserFriendlyName" is "Random name (Guest)"
+ And checkFileInfo "UserId" matches "/Guest-/"
+ And checkFileInfo "UserCanWrite" is true
+ And both Collabora files used the same file id
+ And Collabora can save the file with the content of "./../assets/template.ods"
+ Then Collabora downoads the file and it is equal to "./../assets/template.ods"
+
+ Scenario: Open a file in a shared folder of a share link with direct editing as writable as a remote user
+ Given on instance "serverA"
+ And as user "user1"
+ And User "user1" creates a folder "Folder"
+ And User "user1" uploads file "./../assets/template.odt" to "/Folder/document-share-link.odt"
+ When User "user1" opens "/Folder/document-share-link.odt" through direct editing
+ And Collabora fetches checkFileInfo
+ And as "user1" create a share with
+ | path | /Folder/ |
+ | shareType | 3 |
+ And Updating last share with
+ | permissions | 3 |
+ Given on instance "serverB"
+ And as user "user2"
+ When User "user2" opens the file "/document-share-link.odt" in the last share link through direct editing from server "serverA"
+ And Collabora fetches and receives the following in the checkFileInfo response
+ | BaseFileName | document-share-link.odt |
+ | OwnerId | user1 |
| UserFriendlyName | user2-displayname (Guest) |
And checkFileInfo "UserId" matches "/Guest-/"
And checkFileInfo "UserCanWrite" is true
@@ -181,6 +233,35 @@ Feature: Direct editing
And Collabora can save the file with the content of "./../assets/template.ods"
Then Collabora downoads the file and it is equal to "./../assets/template.ods"
+ Scenario: Open a file in a shared folder of a share link with direct editing as writable as a remote user with password
+ Given on instance "serverA"
+ And as user "user1"
+ And User "user1" creates a folder "Folder"
+ And User "user1" uploads file "./../assets/template.odt" to "/Folder/document-share-link.odt"
+ When User "user1" opens "/Folder/document-share-link.odt" through direct editing
+ And Collabora fetches checkFileInfo
+ And as "user1" create a share with
+ | path | /Folder/ |
+ | shareType | 3 |
+ | password | mysecret |
+ And Updating last share with
+ | permissions | 3 |
+ Given on instance "serverB"
+ And as user "user2"
+ When User "user2" opens the file "/document-share-link.odt" in the last share link through direct editing from server "serverA" with password "mysecret"
+ And Collabora fetches and receives the following in the checkFileInfo response
+ | BaseFileName | document-share-link.odt |
+ | OwnerId | user1 |
+ | UserFriendlyName | user2-displayname (Guest) |
+ And checkFileInfo "UserId" matches "/Guest-/"
+ And checkFileInfo "UserCanWrite" is true
+ And both Collabora files used the same file id
+ And Collabora can save the file with the content of "./../assets/template.ods"
+ Then Collabora downoads the file and it is equal to "./../assets/template.ods"
+
+ And as user "user2"
+ When User "user2" cannot open the file "/document-share-link.odt" in the last share link through direct editing from server "serverA" with password "wrongpassword"
+
@federation @known-failure-ci
Scenario: Open a link that originates on a federated share through direct editing
Given user "user3" exists