Renames assets folder.

Fixes #1916

Signed-off-by: Pierre Ozoux <pierre@ozoux.net>
This commit is contained in:
Pierre Ozoux 2021-12-14 11:05:38 +01:00
parent ffbaf373fd
commit 1a92294647
18 changed files with 115 additions and 115 deletions

View file

@ -151,12 +151,12 @@ class Application extends App implements IBootstrap {
if (class_exists('\OC\Files\Type\TemplateManager')) { if (class_exists('\OC\Files\Type\TemplateManager')) {
$manager = \OC_Helper::getFileTemplateManager(); $manager = \OC_Helper::getFileTemplateManager();
$manager->registerTemplate('application/vnd.openxmlformats-officedocument.wordprocessingml.document', dirname(__DIR__) . '/assets/docxtemplate.docx'); $manager->registerTemplate('application/vnd.openxmlformats-officedocument.wordprocessingml.document', dirname(__DIR__) . '/emptyTemplates/docxtemplate.docx');
$manager->registerTemplate('application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', dirname(__DIR__) . '/assets/xlsxtemplate.xlsx'); $manager->registerTemplate('application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', dirname(__DIR__) . '/emptyTemplates/xlsxtemplate.xlsx');
$manager->registerTemplate('application/vnd.openxmlformats-officedocument.presentationml.presentation', dirname(__DIR__) . '/assets/pptxtemplate.pptx'); $manager->registerTemplate('application/vnd.openxmlformats-officedocument.presentationml.presentation', dirname(__DIR__) . '/emptyTemplates/pptxtemplate.pptx');
$manager->registerTemplate('application/vnd.oasis.opendocument.presentation', dirname(__DIR__) . '/assets/template.odp'); $manager->registerTemplate('application/vnd.oasis.opendocument.presentation', dirname(__DIR__) . '/emptyTemplates/template.odp');
$manager->registerTemplate('application/vnd.oasis.opendocument.text', dirname(__DIR__) . '/assets/template.odt'); $manager->registerTemplate('application/vnd.oasis.opendocument.text', dirname(__DIR__) . '/emptyTemplates/template.odt');
$manager->registerTemplate('application/vnd.oasis.opendocument.spreadsheet', dirname(__DIR__) . '/assets/template.ods'); $manager->registerTemplate('application/vnd.oasis.opendocument.spreadsheet', dirname(__DIR__) . '/emptyTemplates/template.ods');
} }
$this->registerProvider(); $this->registerProvider();

View file

@ -68,7 +68,7 @@ class DocumentController extends Controller {
/** @var InitialStateService */ /** @var InitialStateService */
private $initialState; private $initialState;
const ODT_TEMPLATE_PATH = '/assets/odttemplate.odt'; const ODT_TEMPLATE_PATH = '/emptyTemplates/odttemplate.odt';
public function __construct( public function __construct(

View file

@ -216,7 +216,7 @@ class TemplateManager {
foreach ($templates as $template) { foreach ($templates as $template) {
$file = $folder->newFile($template); $file = $folder->newFile($template);
$file->putContent(file_get_contents(__DIR__ . '/../assets/' . $template)); $file->putContent(file_get_contents(__DIR__ . '/../emptyTemplates/' . $template));
$templateFiles[] = $file; $templateFiles[] = $file;
} }
} }

View file

@ -8,7 +8,7 @@ Feature: Direct editing
Scenario: Open a file through direct editing Scenario: Open a file through direct editing
Given on instance "serverA" Given on instance "serverA"
And as user "user1" And as user "user1"
And User "user1" uploads file "./../assets/template.odt" to "/document.odt" And User "user1" uploads file "./../emptyTemplates/template.odt" to "/document.odt"
When User "user1" opens "/document.odt" through direct editing When User "user1" opens "/document.odt" through direct editing
And Collabora fetches checkFileInfo And Collabora fetches checkFileInfo
Then checkFileInfo "BaseFileName" is "document.odt" Then checkFileInfo "BaseFileName" is "document.odt"
@ -17,12 +17,12 @@ Feature: Direct editing
Scenario: Open a shared file through direct editing Scenario: Open a shared file through direct editing
Given on instance "serverA" Given on instance "serverA"
And as user "user1" And as user "user1"
And User "user1" uploads file "./../assets/template.odt" to "/document-shared.odt" And User "user1" uploads file "./../emptyTemplates/template.odt" to "/document-shared.odt"
When User "user1" opens "/document-shared.odt" through direct editing When User "user1" opens "/document-shared.odt" through direct editing
And Collabora fetches checkFileInfo And Collabora fetches checkFileInfo
Then checkFileInfo "BaseFileName" is "document-shared.odt" Then checkFileInfo "BaseFileName" is "document-shared.odt"
And checkFileInfo "UserCanWrite" is true And checkFileInfo "UserCanWrite" is true
And Collabora can save the file with the content of "./../assets/template.ods" And Collabora can save the file with the content of "./../emptyTemplates/template.ods"
And as "user1" create a share with And as "user1" create a share with
| path | /document-shared.odt | | path | /document-shared.odt |
| shareType | 0 | | shareType | 0 |
@ -35,18 +35,18 @@ Feature: Direct editing
And checkFileInfo "BaseFileName" is "document-shared.odt" And checkFileInfo "BaseFileName" is "document-shared.odt"
And checkFileInfo "UserCanWrite" is false And checkFileInfo "UserCanWrite" is false
And both Collabora files used the same file id And both Collabora files used the same file id
And Collabora can not save the file with the content of "./../assets/template.odt" And Collabora can not save the file with the content of "./../emptyTemplates/template.odt"
Then Collabora downoads the file and it is equal to "./../assets/template.ods" Then Collabora downoads the file and it is equal to "./../emptyTemplates/template.ods"
Scenario: Open a reshared file through direct editing Scenario: Open a reshared file through direct editing
Given on instance "serverA" Given on instance "serverA"
And as user "user1" And as user "user1"
And User "user1" uploads file "./../assets/template.odt" to "/document-shared-reshare.odt" And User "user1" uploads file "./../emptyTemplates/template.odt" to "/document-shared-reshare.odt"
When User "user1" opens "/document-shared-reshare.odt" through direct editing When User "user1" opens "/document-shared-reshare.odt" through direct editing
And Collabora fetches checkFileInfo And Collabora fetches checkFileInfo
Then checkFileInfo "BaseFileName" is "document-shared-reshare.odt" Then checkFileInfo "BaseFileName" is "document-shared-reshare.odt"
And checkFileInfo "UserCanWrite" is true And checkFileInfo "UserCanWrite" is true
And Collabora can save the file with the content of "./../assets/template.ods" And Collabora can save the file with the content of "./../emptyTemplates/template.ods"
And as "user1" create a share with And as "user1" create a share with
| path | /document-shared-reshare.odt | | path | /document-shared-reshare.odt |
| shareType | 0 | | shareType | 0 |
@ -65,19 +65,19 @@ Feature: Direct editing
And checkFileInfo "BaseFileName" is "document-shared-reshare.odt" And checkFileInfo "BaseFileName" is "document-shared-reshare.odt"
And checkFileInfo "UserCanWrite" is false And checkFileInfo "UserCanWrite" is false
And both Collabora files used the same file id And both Collabora files used the same file id
And Collabora can not save the file with the content of "./../assets/template.odt" And Collabora can not save the file with the content of "./../emptyTemplates/template.odt"
Then Collabora downoads the file and it is equal to "./../assets/template.ods" Then Collabora downoads the file and it is equal to "./../emptyTemplates/template.ods"
@federation @federation
Scenario: Open a federated shared file through direct editing Scenario: Open a federated shared file through direct editing
Given on instance "serverA" Given on instance "serverA"
And as user "user1" And as user "user1"
And User "user1" uploads file "./../assets/template.odt" to "/document-shared-federated.odt" And User "user1" uploads file "./../emptyTemplates/template.odt" to "/document-shared-federated.odt"
When User "user1" opens "/document-shared-federated.odt" through direct editing When User "user1" opens "/document-shared-federated.odt" through direct editing
And Collabora fetches checkFileInfo And Collabora fetches checkFileInfo
Then checkFileInfo "BaseFileName" is "document-shared-federated.odt" Then checkFileInfo "BaseFileName" is "document-shared-federated.odt"
And checkFileInfo "UserCanWrite" is true And checkFileInfo "UserCanWrite" is true
And Collabora can save the file with the content of "./../assets/template.ods" And Collabora can save the file with the content of "./../emptyTemplates/template.ods"
And share the file "/document-shared-federated.odt" with permission 1 as a federated share to "user2" on "serverB" And share the file "/document-shared-federated.odt" with permission 1 as a federated share to "user2" on "serverB"
Given on instance "serverB" Given on instance "serverB"
And as user "user2" And as user "user2"
@ -87,20 +87,20 @@ Feature: Direct editing
And checkFileInfo "BaseFileName" is "document-shared-federated.odt" And checkFileInfo "BaseFileName" is "document-shared-federated.odt"
And checkFileInfo "UserCanWrite" is false And checkFileInfo "UserCanWrite" is false
And both Collabora files used the same file id And both Collabora files used the same file id
And Collabora can not save the file with the content of "./../assets/template.odt" And Collabora can not save the file with the content of "./../emptyTemplates/template.odt"
Then Collabora downoads the file and it is equal to "./../assets/template.ods" Then Collabora downoads the file and it is equal to "./../emptyTemplates/template.ods"
@federation @federation
Scenario: Open a file in a federated shared folder through direct editing Scenario: Open a file in a federated shared folder through direct editing
Given on instance "serverA" Given on instance "serverA"
And as user "user1" And as user "user1"
And User "user1" creates a folder "FederatedShareFolder" And User "user1" creates a folder "FederatedShareFolder"
And User "user1" uploads file "./../assets/template.odt" to "/FederatedShareFolder/document-shared-federated.odt" And User "user1" uploads file "./../emptyTemplates/template.odt" to "/FederatedShareFolder/document-shared-federated.odt"
When User "user1" opens "/FederatedShareFolder/document-shared-federated.odt" through direct editing When User "user1" opens "/FederatedShareFolder/document-shared-federated.odt" through direct editing
And Collabora fetches checkFileInfo And Collabora fetches checkFileInfo
Then checkFileInfo "BaseFileName" is "document-shared-federated.odt" Then checkFileInfo "BaseFileName" is "document-shared-federated.odt"
And checkFileInfo "UserCanWrite" is true And checkFileInfo "UserCanWrite" is true
And Collabora can save the file with the content of "./../assets/template.ods" And Collabora can save the file with the content of "./../emptyTemplates/template.ods"
And share the file "/FederatedShareFolder" with permission 1 as a federated share to "user2" on "serverB" And share the file "/FederatedShareFolder" with permission 1 as a federated share to "user2" on "serverB"
Given on instance "serverB" Given on instance "serverB"
And as user "user2" And as user "user2"
@ -110,13 +110,13 @@ Feature: Direct editing
And checkFileInfo "BaseFileName" is "document-shared-federated.odt" And checkFileInfo "BaseFileName" is "document-shared-federated.odt"
And checkFileInfo "UserCanWrite" is false And checkFileInfo "UserCanWrite" is false
And both Collabora files used the same file id And both Collabora files used the same file id
And Collabora can not save the file with the content of "./../assets/template.odt" And Collabora can not save the file with the content of "./../emptyTemplates/template.odt"
Then Collabora downoads the file and it is equal to "./../assets/template.ods" Then Collabora downoads the file and it is equal to "./../emptyTemplates/template.ods"
Scenario: Open a share link with direct editing Scenario: Open a share link with direct editing
Given on instance "serverA" Given on instance "serverA"
And as user "user1" And as user "user1"
And User "user1" uploads file "./../assets/template.odt" to "/document-share-link.odt" And User "user1" uploads file "./../emptyTemplates/template.odt" to "/document-share-link.odt"
When User "user1" opens "/document-share-link.odt" through direct editing When User "user1" opens "/document-share-link.odt" through direct editing
And Collabora fetches checkFileInfo And Collabora fetches checkFileInfo
And as "user1" create a share with And as "user1" create a share with
@ -133,15 +133,15 @@ Feature: Direct editing
| UserFriendlyName | user2-displayname | | UserFriendlyName | user2-displayname |
And checkFileInfo "UserCanWrite" is true And checkFileInfo "UserCanWrite" is true
And both Collabora files used the same file id And both Collabora files used the same file id
And Collabora can save the file with the content of "./../assets/template.ods" And Collabora can save the file with the content of "./../emptyTemplates/template.ods"
Then Collabora downoads the file and it is equal to "./../assets/template.ods" Then Collabora downoads the file and it is equal to "./../emptyTemplates/template.ods"
And the direct editing link is only valid once And the direct editing link is only valid once
Scenario: Open a file in a shared folder of a share link with direct editing as read only Scenario: Open a file in a shared folder of a share link with direct editing as read only
Given on instance "serverA" Given on instance "serverA"
And as user "user1" And as user "user1"
And User "user1" creates a folder "Folder" And User "user1" creates a folder "Folder"
And User "user1" uploads file "./../assets/template.odt" to "/Folder/document-share-link.odt" And User "user1" uploads file "./../emptyTemplates/template.odt" to "/Folder/document-share-link.odt"
When User "user1" opens "/Folder/document-share-link.odt" through direct editing When User "user1" opens "/Folder/document-share-link.odt" through direct editing
And Collabora fetches checkFileInfo And Collabora fetches checkFileInfo
And as "user1" create a share with And as "user1" create a share with
@ -155,14 +155,14 @@ Feature: Direct editing
| UserId | user2 | | UserId | user2 |
| UserFriendlyName | user2-displayname | | UserFriendlyName | user2-displayname |
And both Collabora files used the same file id And both Collabora files used the same file id
And Collabora can not save the file with the content of "./../assets/template.ods" And Collabora can not save the file with the content of "./../emptyTemplates/template.ods"
Then Collabora downoads the file and it is equal to "./../assets/template.odt" Then Collabora downoads the file and it is equal to "./../emptyTemplates/template.odt"
Scenario: Open a file in a shared folder of a share link with direct editing as writable Scenario: Open a file in a shared folder of a share link with direct editing as writable
Given on instance "serverA" Given on instance "serverA"
And as user "user1" And as user "user1"
And User "user1" creates a folder "Folder" And User "user1" creates a folder "Folder"
And User "user1" uploads file "./../assets/template.odt" to "/Folder/document-share-link.odt" And User "user1" uploads file "./../emptyTemplates/template.odt" to "/Folder/document-share-link.odt"
When User "user1" opens "/Folder/document-share-link.odt" through direct editing When User "user1" opens "/Folder/document-share-link.odt" through direct editing
And Collabora fetches checkFileInfo And Collabora fetches checkFileInfo
And as "user1" create a share with And as "user1" create a share with
@ -179,14 +179,14 @@ Feature: Direct editing
| UserFriendlyName | user2-displayname | | UserFriendlyName | user2-displayname |
And checkFileInfo "UserCanWrite" is true And checkFileInfo "UserCanWrite" is true
And both Collabora files used the same file id And both Collabora files used the same file id
And Collabora can save the file with the content of "./../assets/template.ods" And Collabora can save the file with the content of "./../emptyTemplates/template.ods"
Then Collabora downoads the file and it is equal to "./../assets/template.ods" Then Collabora downoads the file and it is equal to "./../emptyTemplates/template.ods"
Scenario: Open a file in a shared folder of a share link with direct editing as writable as a guest Scenario: Open a file in a shared folder of a share link with direct editing as writable as a guest
Given on instance "serverA" Given on instance "serverA"
And as user "user1" And as user "user1"
And User "user1" creates a folder "Folder" And User "user1" creates a folder "Folder"
And User "user1" uploads file "./../assets/template.odt" to "/Folder/document-share-link.odt" And User "user1" uploads file "./../emptyTemplates/template.odt" to "/Folder/document-share-link.odt"
When User "user1" opens "/Folder/document-share-link.odt" through direct editing When User "user1" opens "/Folder/document-share-link.odt" through direct editing
And Collabora fetches checkFileInfo And Collabora fetches checkFileInfo
And as "user1" create a share with And as "user1" create a share with
@ -205,14 +205,14 @@ Feature: Direct editing
And checkFileInfo "UserId" matches "/Guest-/" And checkFileInfo "UserId" matches "/Guest-/"
And checkFileInfo "UserCanWrite" is true And checkFileInfo "UserCanWrite" is true
And both Collabora files used the same file id And both Collabora files used the same file id
And Collabora can save the file with the content of "./../assets/template.ods" And Collabora can save the file with the content of "./../emptyTemplates/template.ods"
Then Collabora downoads the file and it is equal to "./../assets/template.ods" Then Collabora downoads the file and it is equal to "./../emptyTemplates/template.ods"
Scenario: Open a file in a shared folder of a share link with direct editing as writable as a remote user 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" Given on instance "serverA"
And as user "user1" And as user "user1"
And User "user1" creates a folder "Folder" And User "user1" creates a folder "Folder"
And User "user1" uploads file "./../assets/template.odt" to "/Folder/document-share-link.odt" And User "user1" uploads file "./../emptyTemplates/template.odt" to "/Folder/document-share-link.odt"
When User "user1" opens "/Folder/document-share-link.odt" through direct editing When User "user1" opens "/Folder/document-share-link.odt" through direct editing
And Collabora fetches checkFileInfo And Collabora fetches checkFileInfo
And as "user1" create a share with And as "user1" create a share with
@ -230,14 +230,14 @@ Feature: Direct editing
And checkFileInfo "UserId" matches "/Guest-/" And checkFileInfo "UserId" matches "/Guest-/"
And checkFileInfo "UserCanWrite" is true And checkFileInfo "UserCanWrite" is true
And both Collabora files used the same file id And both Collabora files used the same file id
And Collabora can save the file with the content of "./../assets/template.ods" And Collabora can save the file with the content of "./../emptyTemplates/template.ods"
Then Collabora downoads the file and it is equal to "./../assets/template.ods" Then Collabora downoads the file and it is equal to "./../emptyTemplates/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 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" Given on instance "serverA"
And as user "user1" And as user "user1"
And User "user1" creates a folder "Folder" And User "user1" creates a folder "Folder"
And User "user1" uploads file "./../assets/template.odt" to "/Folder/document-share-link.odt" And User "user1" uploads file "./../emptyTemplates/template.odt" to "/Folder/document-share-link.odt"
When User "user1" opens "/Folder/document-share-link.odt" through direct editing When User "user1" opens "/Folder/document-share-link.odt" through direct editing
And Collabora fetches checkFileInfo And Collabora fetches checkFileInfo
And as "user1" create a share with And as "user1" create a share with
@ -256,8 +256,8 @@ Feature: Direct editing
And checkFileInfo "UserId" matches "/Guest-/" And checkFileInfo "UserId" matches "/Guest-/"
And checkFileInfo "UserCanWrite" is true And checkFileInfo "UserCanWrite" is true
And both Collabora files used the same file id And both Collabora files used the same file id
And Collabora can save the file with the content of "./../assets/template.ods" And Collabora can save the file with the content of "./../emptyTemplates/template.ods"
Then Collabora downoads the file and it is equal to "./../assets/template.ods" Then Collabora downoads the file and it is equal to "./../emptyTemplates/template.ods"
And as user "user2" 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" 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"
@ -267,7 +267,7 @@ Feature: Direct editing
Given user "user3" exists Given user "user3" exists
Given on instance "serverA" Given on instance "serverA"
And as user "user1" And as user "user1"
And User "user1" uploads file "./../assets/template.odt" to "/document-reshare-fed-link.odt" And User "user1" uploads file "./../emptyTemplates/template.odt" to "/document-reshare-fed-link.odt"
When User "user1" opens "/document-reshare-fed-link.odt" through direct editing When User "user1" opens "/document-reshare-fed-link.odt" through direct editing
And Collabora fetches checkFileInfo And Collabora fetches checkFileInfo
And share the file "/document-reshare-fed-link.odt" with permission 31 as a federated share to "user2" on "serverB" And share the file "/document-reshare-fed-link.odt" with permission 31 as a federated share to "user2" on "serverB"
@ -292,6 +292,6 @@ Feature: Direct editing
And checkFileInfo "UserId" matches "/Guest-/" And checkFileInfo "UserId" matches "/Guest-/"
And checkFileInfo "UserCanWrite" is false And checkFileInfo "UserCanWrite" is false
And both Collabora files used the same file id And both Collabora files used the same file id
And Collabora can not save the file with the content of "./../assets/template.ods" And Collabora can not save the file with the content of "./../emptyTemplates/template.ods"
Then Collabora downoads the file and it is equal to "./../assets/template.odt" Then Collabora downoads the file and it is equal to "./../emptyTemplates/template.odt"
And the direct editing link is only valid once And the direct editing link is only valid once

View file

@ -8,7 +8,7 @@ Background:
Scenario: Share a file by federation and open it Scenario: Share a file by federation and open it
Given on instance "serverA" Given on instance "serverA"
And as user "user1" And as user "user1"
And User "user1" uploads file "./../assets/template.odt" to "/document.odt" And User "user1" uploads file "./../emptyTemplates/template.odt" to "/document.odt"
And share the file "/document.odt" as a federated share to "user2" on "serverB" And share the file "/document.odt" as a federated share to "user2" on "serverB"
When User "user1" opens "/document.odt" When User "user1" opens "/document.odt"
And Collabora fetches checkFileInfo And Collabora fetches checkFileInfo
@ -25,7 +25,7 @@ Background:
Scenario: Share a file by federation and open it Scenario: Share a file by federation and open it
Given on instance "serverA" Given on instance "serverA"
Given as user "user1" Given as user "user1"
And User "user1" uploads file "./../assets/template.odt" to "/reshare.odt" And User "user1" uploads file "./../emptyTemplates/template.odt" to "/reshare.odt"
And share the file "/reshare.odt" as a federated share to "user2" on "serverB" And share the file "/reshare.odt" as a federated share to "user2" on "serverB"
Given on instance "serverB" Given on instance "serverB"
@ -36,10 +36,10 @@ Background:
And checkFileInfo "BaseFileName" is "reshare.odt" And checkFileInfo "BaseFileName" is "reshare.odt"
And checkFileInfo "UserCanWrite" is true And checkFileInfo "UserCanWrite" is true
And Collabora downloads the file And Collabora downloads the file
Then the file is equal to "./../assets/template.odt" Then the file is equal to "./../emptyTemplates/template.odt"
And Collabora saved the file with the content of "./../assets/template.ods" And Collabora saved the file with the content of "./../emptyTemplates/template.ods"
And Collabora downloads the file And Collabora downloads the file
Then the file is equal to "./../assets/template.ods" Then the file is equal to "./../emptyTemplates/template.ods"
Given on instance "serverA" Given on instance "serverA"
Given as user "user1" Given as user "user1"
@ -47,17 +47,17 @@ Background:
And Collabora fetches checkFileInfo And Collabora fetches checkFileInfo
And checkFileInfo "BaseFileName" is "reshare.odt" And checkFileInfo "BaseFileName" is "reshare.odt"
And checkFileInfo "UserCanWrite" is true And checkFileInfo "UserCanWrite" is true
Then the file is equal to "./../assets/template.ods" Then the file is equal to "./../emptyTemplates/template.ods"
And Collabora saved the file with the content of "./../assets/template.odt" And Collabora saved the file with the content of "./../emptyTemplates/template.odt"
And Collabora downloads the file And Collabora downloads the file
Then the file is equal to "./../assets/template.odt" Then the file is equal to "./../emptyTemplates/template.odt"
And both Collabora files used the same file id And both Collabora files used the same file id
Scenario: Share a file by federation and reshare it read-only Scenario: Share a file by federation and reshare it read-only
Given on instance "serverA" Given on instance "serverA"
And as user "user1" And as user "user1"
And User "user1" uploads file "./../assets/template.odt" to "/file-reshare-readonly.odt" And User "user1" uploads file "./../emptyTemplates/template.odt" to "/file-reshare-readonly.odt"
And share the file "/file-reshare-readonly.odt" as a federated share to "user2" on "serverB" And share the file "/file-reshare-readonly.odt" as a federated share to "user2" on "serverB"
Given on instance "serverB" Given on instance "serverB"
@ -67,8 +67,8 @@ Background:
And Collabora fetches checkFileInfo And Collabora fetches checkFileInfo
And checkFileInfo "BaseFileName" is "file-reshare-readonly.odt" And checkFileInfo "BaseFileName" is "file-reshare-readonly.odt"
And checkFileInfo "UserCanWrite" is true And checkFileInfo "UserCanWrite" is true
Then Collabora downoads the file and it is equal to "./../assets/template.odt" Then Collabora downoads the file and it is equal to "./../emptyTemplates/template.odt"
And Collabora can save the file with the content of "./../assets/template.ods" And Collabora can save the file with the content of "./../emptyTemplates/template.ods"
And as "user2" create a share with And as "user2" create a share with
| path | /file-reshare-readonly.odt | | path | /file-reshare-readonly.odt |
@ -82,13 +82,13 @@ Background:
And checkFileInfo "BaseFileName" is "file-reshare-readonly.odt" And checkFileInfo "BaseFileName" is "file-reshare-readonly.odt"
And checkFileInfo "UserCanWrite" is false And checkFileInfo "UserCanWrite" is false
And both Collabora files used the same file id And both Collabora files used the same file id
And Collabora can not save the file with the content of "./../assets/template.odt" And Collabora can not save the file with the content of "./../emptyTemplates/template.odt"
Then Collabora downoads the file and it is equal to "./../assets/template.ods" Then Collabora downoads the file and it is equal to "./../emptyTemplates/template.ods"
Scenario: Share a file by federation and reshare it with write permissions Scenario: Share a file by federation and reshare it with write permissions
Given on instance "serverA" Given on instance "serverA"
And as user "user1" And as user "user1"
And User "user1" uploads file "./../assets/template.odt" to "/file-reshare-rw.odt" And User "user1" uploads file "./../emptyTemplates/template.odt" to "/file-reshare-rw.odt"
And share the file "/file-reshare-rw.odt" as a federated share to "user2" on "serverB" And share the file "/file-reshare-rw.odt" as a federated share to "user2" on "serverB"
Given on instance "serverB" Given on instance "serverB"
@ -98,8 +98,8 @@ Background:
And Collabora fetches checkFileInfo And Collabora fetches checkFileInfo
And checkFileInfo "BaseFileName" is "file-reshare-rw.odt" And checkFileInfo "BaseFileName" is "file-reshare-rw.odt"
And checkFileInfo "UserCanWrite" is true And checkFileInfo "UserCanWrite" is true
Then Collabora downoads the file and it is equal to "./../assets/template.odt" Then Collabora downoads the file and it is equal to "./../emptyTemplates/template.odt"
And Collabora can save the file with the content of "./../assets/template.ods" And Collabora can save the file with the content of "./../emptyTemplates/template.ods"
And as "user2" create a share with And as "user2" create a share with
| path | /file-reshare-rw.odt | | path | /file-reshare-rw.odt |
@ -113,14 +113,14 @@ Background:
Then checkFileInfo "BaseFileName" is "file-reshare-rw.odt" Then checkFileInfo "BaseFileName" is "file-reshare-rw.odt"
And checkFileInfo "UserCanWrite" is true And checkFileInfo "UserCanWrite" is true
And both Collabora files used the same file id And both Collabora files used the same file id
And Collabora can save the file with the content of "./../assets/template.ods" And Collabora can save the file with the content of "./../emptyTemplates/template.ods"
And Collabora downoads the file and it is equal to "./../assets/template.ods" And Collabora downoads the file and it is equal to "./../emptyTemplates/template.ods"
@known-failure-ci @known-failure-ci
Scenario: Share a file by federation and reshare it as a link Scenario: Share a file by federation and reshare it as a link
Given on instance "serverA" Given on instance "serverA"
And as user "user1" And as user "user1"
And User "user1" uploads file "./../assets/template.odt" to "/file-reshare-link.odt" And User "user1" uploads file "./../emptyTemplates/template.odt" to "/file-reshare-link.odt"
And share the file "/file-reshare-link.odt" as a federated share to "user2" on "serverB" And share the file "/file-reshare-link.odt" as a federated share to "user2" on "serverB"
Then User "user1" opens "/file-reshare-link.odt" Then User "user1" opens "/file-reshare-link.odt"
And Collabora fetches checkFileInfo And Collabora fetches checkFileInfo
@ -135,8 +135,8 @@ Background:
And checkFileInfo "BaseFileName" is "file-reshare-link.odt" And checkFileInfo "BaseFileName" is "file-reshare-link.odt"
And checkFileInfo "UserCanWrite" is true And checkFileInfo "UserCanWrite" is true
And both Collabora files used the same file id And both Collabora files used the same file id
Then Collabora downoads the file and it is equal to "./../assets/template.odt" Then Collabora downoads the file and it is equal to "./../emptyTemplates/template.odt"
And Collabora can save the file with the content of "./../assets/template.ods" And Collabora can save the file with the content of "./../emptyTemplates/template.ods"
# This might fail curently due to using the same instance # This might fail curently due to using the same instance
And as "user2" create a share with And as "user2" create a share with
@ -153,5 +153,5 @@ Background:
## And checkFileInfo "OwnerId" is "user1" ## And checkFileInfo "OwnerId" is "user1"
## And both Collabora files used the same file id ## And both Collabora files used the same file id
And checkFileInfo "UserCanWrite" is false And checkFileInfo "UserCanWrite" is false
And Collabora downoads the file and it is equal to "./../assets/template.ods" And Collabora downoads the file and it is equal to "./../emptyTemplates/template.ods"
And Collabora can not save the file with the content of "./../assets/template.odt" And Collabora can not save the file with the content of "./../emptyTemplates/template.odt"

View file

@ -6,7 +6,7 @@ Feature: WOPI
Scenario: Create a new wopi token for a user and open it Scenario: Create a new wopi token for a user and open it
Given as user "user1" Given as user "user1"
And User "user1" uploads file "./../assets/template.odt" to "/file.odt" And User "user1" uploads file "./../emptyTemplates/template.odt" to "/file.odt"
Then User "user1" opens "/file.odt" Then User "user1" opens "/file.odt"
And Collabora fetches checkFileInfo And Collabora fetches checkFileInfo
And Collabora fetches and receives the following in the checkFileInfo response And Collabora fetches and receives the following in the checkFileInfo response
@ -18,7 +18,7 @@ Feature: WOPI
Scenario: Fetch checkFileInfo for public share link Scenario: Fetch checkFileInfo for public share link
Given as user "user1" Given as user "user1"
And User "user1" uploads file "./../assets/template.odt" to "/file.odt" And User "user1" uploads file "./../emptyTemplates/template.odt" to "/file.odt"
And as "user1" create a share with And as "user1" create a share with
| path | /file.odt | | path | /file.odt |
| shareType | 3 | | shareType | 3 |
@ -29,15 +29,15 @@ Feature: WOPI
And checkFileInfo "UserId" matches "/Guest-/" And checkFileInfo "UserId" matches "/Guest-/"
And checkFileInfo "OwnerId" is "user1" And checkFileInfo "OwnerId" is "user1"
And checkFileInfo "UserCanWrite" is false And checkFileInfo "UserCanWrite" is false
And Collabora saved the file with the content of "./../assets/template.ods" And Collabora saved the file with the content of "./../emptyTemplates/template.ods"
And the WOPI HTTP status code should be "403" And the WOPI HTTP status code should be "403"
And Collabora downloads the file And Collabora downloads the file
Then the file is equal to "./../assets/template.odt" Then the file is equal to "./../emptyTemplates/template.odt"
Scenario: Open a file in a folder shared by link Scenario: Open a file in a folder shared by link
Given as user "user1" Given as user "user1"
And User "user1" creates a folder "NewFolder" And User "user1" creates a folder "NewFolder"
And User "user1" uploads file "./../assets/template.odt" to "/NewFolder/file.odt" And User "user1" uploads file "./../emptyTemplates/template.odt" to "/NewFolder/file.odt"
And as "user1" create a share with And as "user1" create a share with
| path | /NewFolder | | path | /NewFolder |
| shareType | 3 | | shareType | 3 |
@ -50,14 +50,14 @@ Feature: WOPI
| UserCanWrite | | | UserCanWrite | |
| OwnerId | user1 | | OwnerId | user1 |
And checkFileInfo "UserId" matches "/Guest-/" And checkFileInfo "UserId" matches "/Guest-/"
And Collabora downoads the file and it is equal to "./../assets/template.odt" And Collabora downoads the file and it is equal to "./../emptyTemplates/template.odt"
And Collabora can not save the file with the content of "./../assets/template.ods" And Collabora can not save the file with the content of "./../emptyTemplates/template.ods"
Then both Collabora files used the same file id Then both Collabora files used the same file id
Scenario: Open a file in a folder shared by link with a guest name Scenario: Open a file in a folder shared by link with a guest name
Given as user "user1" Given as user "user1"
And User "user1" creates a folder "NewFolder" And User "user1" creates a folder "NewFolder"
And User "user1" uploads file "./../assets/template.odt" to "/NewFolder/file.odt" And User "user1" uploads file "./../emptyTemplates/template.odt" to "/NewFolder/file.odt"
And as "user1" create a share with And as "user1" create a share with
| path | /NewFolder | | path | /NewFolder |
| shareType | 3 | | shareType | 3 |
@ -71,14 +71,14 @@ Feature: WOPI
| OwnerId | user1 | | OwnerId | user1 |
| UserFriendlyName | Anonymous (Guest) | | UserFriendlyName | Anonymous (Guest) |
And checkFileInfo "UserId" matches "/Guest-/" And checkFileInfo "UserId" matches "/Guest-/"
And Collabora downoads the file and it is equal to "./../assets/template.odt" And Collabora downoads the file and it is equal to "./../emptyTemplates/template.odt"
And Collabora can not save the file with the content of "./../assets/template.ods" And Collabora can not save the file with the content of "./../emptyTemplates/template.ods"
Then both Collabora files used the same file id Then both Collabora files used the same file id
Scenario: Open a file in a folder shared by link as the owner Scenario: Open a file in a folder shared by link as the owner
Given as user "user1" Given as user "user1"
And User "user1" creates a folder "NewFolder" And User "user1" creates a folder "NewFolder"
And User "user1" uploads file "./../assets/template.odt" to "/NewFolder/file.odt" And User "user1" uploads file "./../emptyTemplates/template.odt" to "/NewFolder/file.odt"
And as "user1" create a share with And as "user1" create a share with
| path | /NewFolder | | path | /NewFolder |
| shareType | 3 | | shareType | 3 |
@ -90,13 +90,13 @@ Feature: WOPI
| UserCanWrite | | | UserCanWrite | |
| OwnerId | user1 | | OwnerId | user1 |
| UserId | user1 | | UserId | user1 |
And Collabora downoads the file and it is equal to "./../assets/template.odt" And Collabora downoads the file and it is equal to "./../emptyTemplates/template.odt"
And Collabora can not save the file with the content of "./../assets/template.ods" And Collabora can not save the file with the content of "./../emptyTemplates/template.ods"
Then both Collabora files used the same file id Then both Collabora files used the same file id
Scenario: Fetch checkFileInfo for public share link as the owner Scenario: Fetch checkFileInfo for public share link as the owner
Given as user "user1" Given as user "user1"
And User "user1" uploads file "./../assets/template.odt" to "/file.odt" And User "user1" uploads file "./../emptyTemplates/template.odt" to "/file.odt"
And as "user1" create a share with And as "user1" create a share with
| path | /file.odt | | path | /file.odt |
| shareType | 3 | | shareType | 3 |
@ -106,12 +106,12 @@ Feature: WOPI
| UserCanWrite | | | UserCanWrite | |
| OwnerId | user1 | | OwnerId | user1 |
| UserId | user1 | | UserId | user1 |
And Collabora downoads the file and it is equal to "./../assets/template.odt" And Collabora downoads the file and it is equal to "./../emptyTemplates/template.odt"
And Collabora can not save the file with the content of "./../assets/template.ods" And Collabora can not save the file with the content of "./../emptyTemplates/template.ods"
Scenario: Fetch checkFileInfo for public share link with download hidden Scenario: Fetch checkFileInfo for public share link with download hidden
Given as user "user1" Given as user "user1"
And User "user1" uploads file "./../assets/template.odt" to "/file.odt" And User "user1" uploads file "./../emptyTemplates/template.odt" to "/file.odt"
And as "user1" create a share with And as "user1" create a share with
| path | /file.odt | | path | /file.odt |
| shareType | 3 | | shareType | 3 |
@ -142,7 +142,7 @@ Feature: WOPI
Scenario: Fetch checkFileInfo for public share link with write permission Scenario: Fetch checkFileInfo for public share link with write permission
Given as user "user1" Given as user "user1"
And User "user1" uploads file "./../assets/template.odt" to "/file.odt" And User "user1" uploads file "./../emptyTemplates/template.odt" to "/file.odt"
And as "user1" create a share with And as "user1" create a share with
| path | /file.odt | | path | /file.odt |
| shareType | 3 | | shareType | 3 |
@ -156,27 +156,27 @@ Feature: WOPI
And checkFileInfo "OwnerId" is "user1" And checkFileInfo "OwnerId" is "user1"
And checkFileInfo "UserCanWrite" is true And checkFileInfo "UserCanWrite" is true
And Collabora downloads the file And Collabora downloads the file
Then the file is equal to "./../assets/template.odt" Then the file is equal to "./../emptyTemplates/template.odt"
And Collabora saved the file with the content of "./../assets/template.odt" And Collabora saved the file with the content of "./../emptyTemplates/template.odt"
And Collabora downloads the file And Collabora downloads the file
Then the file is equal to "./../assets/template.odt" Then the file is equal to "./../emptyTemplates/template.odt"
Scenario: Save a file as the owner Scenario: Save a file as the owner
Given as user "user1" Given as user "user1"
And User "user1" uploads file "./../assets/template.odt" to "/file.odt" And User "user1" uploads file "./../emptyTemplates/template.odt" to "/file.odt"
Then User "user1" opens "/file.odt" Then User "user1" opens "/file.odt"
And Collabora fetches checkFileInfo And Collabora fetches checkFileInfo
And Collabora downloads the file And Collabora downloads the file
Then the file is equal to "./../assets/template.odt" Then the file is equal to "./../emptyTemplates/template.odt"
And checkFileInfo "UserCanWrite" is true And checkFileInfo "UserCanWrite" is true
And Collabora saved the file with the content of "./../assets/template.odt" And Collabora saved the file with the content of "./../emptyTemplates/template.odt"
And Collabora downloads the file And Collabora downloads the file
Then the file is equal to "./../assets/template.odt" Then the file is equal to "./../emptyTemplates/template.odt"
Scenario: Save a file as guest with write permissions Scenario: Save a file as guest with write permissions
Given as user "user1" Given as user "user1"
And User "user1" uploads file "./../assets/template.odt" to "/file.odt" And User "user1" uploads file "./../emptyTemplates/template.odt" to "/file.odt"
And as "user1" create a share with And as "user1" create a share with
| path | /file.odt | | path | /file.odt |
| shareType | 3 | | shareType | 3 |
@ -191,15 +191,15 @@ Feature: WOPI
And checkFileInfo "OwnerId" is "user1" And checkFileInfo "OwnerId" is "user1"
And checkFileInfo "UserCanWrite" is true And checkFileInfo "UserCanWrite" is true
And Collabora downloads the file And Collabora downloads the file
Then the file is equal to "./../assets/template.odt" Then the file is equal to "./../emptyTemplates/template.odt"
And Collabora saved the file with the content of "./../assets/template.ods" And Collabora saved the file with the content of "./../emptyTemplates/template.ods"
And Collabora downloads the file And Collabora downloads the file
Then the file is equal to "./../assets/template.ods" Then the file is equal to "./../emptyTemplates/template.ods"
Scenario: Create different WOPI file ids Scenario: Create different WOPI file ids
Given as user "user1" Given as user "user1"
And User "user1" uploads file "./../assets/template.odt" to "/file1.odt" And User "user1" uploads file "./../emptyTemplates/template.odt" to "/file1.odt"
And User "user1" uploads file "./../assets/template.odt" to "/file2.odt" And User "user1" uploads file "./../emptyTemplates/template.odt" to "/file2.odt"
Then User "user1" opens "/file1.odt" Then User "user1" opens "/file1.odt"
And Collabora fetches checkFileInfo And Collabora fetches checkFileInfo
Then User "user1" opens "/file2.odt" Then User "user1" opens "/file2.odt"
@ -208,7 +208,7 @@ Feature: WOPI
Scenario: Open a shared file Scenario: Open a shared file
Given as user "user1" Given as user "user1"
And User "user1" uploads file "./../assets/template.odt" to "/file-readonly.odt" And User "user1" uploads file "./../emptyTemplates/template.odt" to "/file-readonly.odt"
And as "user1" create a share with And as "user1" create a share with
| path | /file-readonly.odt | | path | /file-readonly.odt |
| shareType | 0 | | shareType | 0 |
@ -216,14 +216,14 @@ Feature: WOPI
| permissions | 1 | | permissions | 1 |
Then User "user2" opens "/file-readonly.odt" Then User "user2" opens "/file-readonly.odt"
And Collabora fetches checkFileInfo And Collabora fetches checkFileInfo
And Collabora downoads the file and it is equal to "./../assets/template.odt" And Collabora downoads the file and it is equal to "./../emptyTemplates/template.odt"
And checkFileInfo "UserCanWrite" is false And checkFileInfo "UserCanWrite" is false
And Collabora can not save the file with the content of "./../assets/template.ods" And Collabora can not save the file with the content of "./../emptyTemplates/template.ods"
Scenario: Open a shared file with write permissions Scenario: Open a shared file with write permissions
Given as user "user1" Given as user "user1"
And User "user1" uploads file "./../assets/template.odt" to "/file-rw.odt" And User "user1" uploads file "./../emptyTemplates/template.odt" to "/file-rw.odt"
And as "user1" create a share with And as "user1" create a share with
| path | /file-rw.odt | | path | /file-rw.odt |
| shareType | 0 | | shareType | 0 |
@ -232,13 +232,13 @@ Feature: WOPI
Then User "user2" opens "/file-rw.odt" Then User "user2" opens "/file-rw.odt"
And Collabora fetches checkFileInfo And Collabora fetches checkFileInfo
And checkFileInfo "UserCanWrite" is true And checkFileInfo "UserCanWrite" is true
And Collabora downoads the file and it is equal to "./../assets/template.odt" And Collabora downoads the file and it is equal to "./../emptyTemplates/template.odt"
And Collabora can save the file with the content of "./../assets/template.ods" And Collabora can save the file with the content of "./../emptyTemplates/template.ods"
Scenario: Open a reshared file with read permissions Scenario: Open a reshared file with read permissions
Given user "user3" exists Given user "user3" exists
When as user "user1" When as user "user1"
And User "user1" uploads file "./../assets/template.odt" to "/file-reshare-ro.odt" And User "user1" uploads file "./../emptyTemplates/template.odt" to "/file-reshare-ro.odt"
And as "user1" create a share with And as "user1" create a share with
| path | /file-reshare-ro.odt | | path | /file-reshare-ro.odt |
| shareType | 0 | | shareType | 0 |
@ -253,9 +253,9 @@ Feature: WOPI
Then User "user3" opens "/file-reshare-ro.odt" Then User "user3" opens "/file-reshare-ro.odt"
And Collabora fetches checkFileInfo And Collabora fetches checkFileInfo
And Collabora downloads the file And Collabora downloads the file
Then the file is equal to "./../assets/template.odt" Then the file is equal to "./../emptyTemplates/template.odt"
And checkFileInfo "UserCanWrite" is false And checkFileInfo "UserCanWrite" is false
And Collabora downoads the file and it is equal to "./../assets/template.odt" And Collabora downoads the file and it is equal to "./../emptyTemplates/template.odt"
Scenario: Create a new wopi token from a template for a user and open it Scenario: Create a new wopi token from a template for a user and open it
@ -273,7 +273,7 @@ Feature: WOPI
Scenario: Save as Scenario: Save as
Given as user "user1" Given as user "user1"
And User "user1" uploads file "./../assets/template.odt" to "/file-origin.odt" And User "user1" uploads file "./../emptyTemplates/template.odt" to "/file-origin.odt"
Then User "user1" opens "/file-origin.odt" Then User "user1" opens "/file-origin.odt"
And Collabora fetches and receives the following in the checkFileInfo response And Collabora fetches and receives the following in the checkFileInfo response
| BaseFileName | file-origin.odt | | BaseFileName | file-origin.odt |
@ -281,7 +281,7 @@ Feature: WOPI
| UserId | user1 | | UserId | user1 |
| UserFriendlyName | user1-displayname | | UserFriendlyName | user1-displayname |
And checkFileInfo "UserCanWrite" is true And checkFileInfo "UserCanWrite" is true
And Collabora saves the content of "./../assets/template.ods" as "saveas.odt" And Collabora saves the content of "./../emptyTemplates/template.ods" as "saveas.odt"
And the WOPI HTTP status code should be "200" And the WOPI HTTP status code should be "200"
Then User "user1" opens "/saveas.odt" Then User "user1" opens "/saveas.odt"
@ -291,11 +291,11 @@ Feature: WOPI
| UserId | user1 | | UserId | user1 |
| UserFriendlyName | user1-displayname | | UserFriendlyName | user1-displayname |
And Collabora downloads the file And Collabora downloads the file
And Collabora downoads the file and it is equal to "./../assets/template.ods" And Collabora downoads the file and it is equal to "./../emptyTemplates/template.ods"
Scenario: Save as different user Scenario: Save as different user
Given as user "user1" Given as user "user1"
And User "user1" uploads file "./../assets/template.odt" to "/file-origin.odt" And User "user1" uploads file "./../emptyTemplates/template.odt" to "/file-origin.odt"
And as "user1" create a share with And as "user1" create a share with
| path | /file-origin.odt | | path | /file-origin.odt |
| shareType | 0 | | shareType | 0 |
@ -307,7 +307,7 @@ Feature: WOPI
| OwnerId | user1 | | OwnerId | user1 |
| UserId | user2 | | UserId | user2 |
| UserFriendlyName | user2-displayname | | UserFriendlyName | user2-displayname |
And Collabora saves the content of "./../assets/template.ods" as "/saveas.odt" And Collabora saves the content of "./../emptyTemplates/template.ods" as "/saveas.odt"
And the WOPI HTTP status code should be "200" And the WOPI HTTP status code should be "200"
Then User "user2" opens "/saveas.odt" Then User "user2" opens "/saveas.odt"
@ -317,4 +317,4 @@ Feature: WOPI
| UserId | user2 | | UserId | user2 |
| UserFriendlyName | user2-displayname | | UserFriendlyName | user2-displayname |
And Collabora downloads the file And Collabora downloads the file
And Collabora downoads the file and it is equal to "./../assets/template.ods" And Collabora downoads the file and it is equal to "./../emptyTemplates/template.ods"