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:
authorPierre Ozoux <pierre@ozoux.net>2021-12-14 13:05:38 +0300
committerbackportbot[bot] <backportbot[bot]@users.noreply.github.com>2021-12-16 14:26:24 +0300
commitbb88a674dac0593c15367c16fc819b2767f3986c (patch)
tree2ebadeca04ef6ba24dcf1a2dc1b623a4f1246236
parent6d751c16b609a433c83d9d61585a98efc050260d (diff)
Renames assets folder.
Fixes #1916 Signed-off-by: Pierre Ozoux <pierre@ozoux.net>
-rw-r--r--emptyTemplates/document.ott (renamed from assets/document.ott)bin663 -> 663 bytes
-rw-r--r--emptyTemplates/docxtemplate.docx (renamed from assets/docxtemplate.docx)bin790 -> 790 bytes
-rw-r--r--emptyTemplates/drawing.otg (renamed from assets/drawing.otg)bin8158 -> 8158 bytes
-rw-r--r--emptyTemplates/odgtemplate.otg (renamed from assets/odgtemplate.otg)bin8158 -> 8158 bytes
-rw-r--r--emptyTemplates/odttemplate.odt (renamed from assets/odttemplate.odt)bin642 -> 642 bytes
-rw-r--r--emptyTemplates/pptxtemplate.pptx (renamed from assets/pptxtemplate.pptx)bin836 -> 836 bytes
-rw-r--r--emptyTemplates/presentation.otp (renamed from assets/presentation.otp)bin680 -> 680 bytes
-rw-r--r--emptyTemplates/spreadsheet.ots (renamed from assets/spreadsheet.ots)bin683 -> 683 bytes
-rw-r--r--emptyTemplates/template.odp (renamed from assets/template.odp)bin668 -> 668 bytes
-rw-r--r--emptyTemplates/template.ods (renamed from assets/template.ods)bin667 -> 667 bytes
-rw-r--r--emptyTemplates/template.odt (renamed from assets/template.odt)bin642 -> 642 bytes
-rw-r--r--emptyTemplates/xlsxtemplate.xlsx (renamed from assets/xlsxtemplate.xlsx)bin1409 -> 1409 bytes
-rw-r--r--lib/AppInfo/Application.php12
-rw-r--r--lib/Controller/DocumentController.php2
-rw-r--r--lib/TemplateManager.php2
-rw-r--r--tests/features/direct.feature76
-rw-r--r--tests/features/federation.feature46
-rw-r--r--tests/features/wopi.feature92
18 files changed, 115 insertions, 115 deletions
diff --git a/assets/document.ott b/emptyTemplates/document.ott
index d1547445..d1547445 100644
--- a/assets/document.ott
+++ b/emptyTemplates/document.ott
Binary files differ
diff --git a/assets/docxtemplate.docx b/emptyTemplates/docxtemplate.docx
index 1b8fdf5a..1b8fdf5a 100644
--- a/assets/docxtemplate.docx
+++ b/emptyTemplates/docxtemplate.docx
Binary files differ
diff --git a/assets/drawing.otg b/emptyTemplates/drawing.otg
index f29cd812..f29cd812 100644
--- a/assets/drawing.otg
+++ b/emptyTemplates/drawing.otg
Binary files differ
diff --git a/assets/odgtemplate.otg b/emptyTemplates/odgtemplate.otg
index f29cd812..f29cd812 100644
--- a/assets/odgtemplate.otg
+++ b/emptyTemplates/odgtemplate.otg
Binary files differ
diff --git a/assets/odttemplate.odt b/emptyTemplates/odttemplate.odt
index d2a8dc27..d2a8dc27 100644
--- a/assets/odttemplate.odt
+++ b/emptyTemplates/odttemplate.odt
Binary files differ
diff --git a/assets/pptxtemplate.pptx b/emptyTemplates/pptxtemplate.pptx
index e93a532d..e93a532d 100644
--- a/assets/pptxtemplate.pptx
+++ b/emptyTemplates/pptxtemplate.pptx
Binary files differ
diff --git a/assets/presentation.otp b/emptyTemplates/presentation.otp
index ccba6e40..ccba6e40 100644
--- a/assets/presentation.otp
+++ b/emptyTemplates/presentation.otp
Binary files differ
diff --git a/assets/spreadsheet.ots b/emptyTemplates/spreadsheet.ots
index 20756df2..20756df2 100644
--- a/assets/spreadsheet.ots
+++ b/emptyTemplates/spreadsheet.ots
Binary files differ
diff --git a/assets/template.odp b/emptyTemplates/template.odp
index f97540d8..f97540d8 100644
--- a/assets/template.odp
+++ b/emptyTemplates/template.odp
Binary files differ
diff --git a/assets/template.ods b/emptyTemplates/template.ods
index acb7e250..acb7e250 100644
--- a/assets/template.ods
+++ b/emptyTemplates/template.ods
Binary files differ
diff --git a/assets/template.odt b/emptyTemplates/template.odt
index d2a8dc27..d2a8dc27 100644
--- a/assets/template.odt
+++ b/emptyTemplates/template.odt
Binary files differ
diff --git a/assets/xlsxtemplate.xlsx b/emptyTemplates/xlsxtemplate.xlsx
index 42e73eca..42e73eca 100644
--- a/assets/xlsxtemplate.xlsx
+++ b/emptyTemplates/xlsxtemplate.xlsx
Binary files differ
diff --git a/lib/AppInfo/Application.php b/lib/AppInfo/Application.php
index 0d6562e1..696fb4e6 100644
--- a/lib/AppInfo/Application.php
+++ b/lib/AppInfo/Application.php
@@ -151,12 +151,12 @@ class Application extends App implements IBootstrap {
if (class_exists('\OC\Files\Type\TemplateManager')) {
$manager = \OC_Helper::getFileTemplateManager();
- $manager->registerTemplate('application/vnd.openxmlformats-officedocument.wordprocessingml.document', dirname(__DIR__) . '/assets/docxtemplate.docx');
- $manager->registerTemplate('application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', dirname(__DIR__) . '/assets/xlsxtemplate.xlsx');
- $manager->registerTemplate('application/vnd.openxmlformats-officedocument.presentationml.presentation', dirname(__DIR__) . '/assets/pptxtemplate.pptx');
- $manager->registerTemplate('application/vnd.oasis.opendocument.presentation', dirname(__DIR__) . '/assets/template.odp');
- $manager->registerTemplate('application/vnd.oasis.opendocument.text', dirname(__DIR__) . '/assets/template.odt');
- $manager->registerTemplate('application/vnd.oasis.opendocument.spreadsheet', dirname(__DIR__) . '/assets/template.ods');
+ $manager->registerTemplate('application/vnd.openxmlformats-officedocument.wordprocessingml.document', dirname(__DIR__) . '/emptyTemplates/docxtemplate.docx');
+ $manager->registerTemplate('application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', dirname(__DIR__) . '/emptyTemplates/xlsxtemplate.xlsx');
+ $manager->registerTemplate('application/vnd.openxmlformats-officedocument.presentationml.presentation', dirname(__DIR__) . '/emptyTemplates/pptxtemplate.pptx');
+ $manager->registerTemplate('application/vnd.oasis.opendocument.presentation', dirname(__DIR__) . '/emptyTemplates/template.odp');
+ $manager->registerTemplate('application/vnd.oasis.opendocument.text', dirname(__DIR__) . '/emptyTemplates/template.odt');
+ $manager->registerTemplate('application/vnd.oasis.opendocument.spreadsheet', dirname(__DIR__) . '/emptyTemplates/template.ods');
}
$this->registerProvider();
diff --git a/lib/Controller/DocumentController.php b/lib/Controller/DocumentController.php
index 0658d89f..9f1f7cec 100644
--- a/lib/Controller/DocumentController.php
+++ b/lib/Controller/DocumentController.php
@@ -68,7 +68,7 @@ class DocumentController extends Controller {
/** @var InitialStateService */
private $initialState;
- const ODT_TEMPLATE_PATH = '/assets/odttemplate.odt';
+ const ODT_TEMPLATE_PATH = '/emptyTemplates/odttemplate.odt';
public function __construct(
diff --git a/lib/TemplateManager.php b/lib/TemplateManager.php
index d8a01932..a907f9aa 100644
--- a/lib/TemplateManager.php
+++ b/lib/TemplateManager.php
@@ -216,7 +216,7 @@ class TemplateManager {
foreach ($templates as $template) {
$file = $folder->newFile($template);
- $file->putContent(file_get_contents(__DIR__ . '/../assets/' . $template));
+ $file->putContent(file_get_contents(__DIR__ . '/../emptyTemplates/' . $template));
$templateFiles[] = $file;
}
}
diff --git a/tests/features/direct.feature b/tests/features/direct.feature
index b09103d1..ce39c726 100644
--- a/tests/features/direct.feature
+++ b/tests/features/direct.feature
@@ -8,7 +8,7 @@ Feature: Direct editing
Scenario: Open a file through direct editing
Given on instance "serverA"
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
And Collabora fetches checkFileInfo
Then checkFileInfo "BaseFileName" is "document.odt"
@@ -17,12 +17,12 @@ Feature: Direct editing
Scenario: Open a shared file through direct editing
Given on instance "serverA"
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
And Collabora fetches checkFileInfo
Then checkFileInfo "BaseFileName" is "document-shared.odt"
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
| path | /document-shared.odt |
| shareType | 0 |
@@ -35,18 +35,18 @@ Feature: Direct editing
And checkFileInfo "BaseFileName" is "document-shared.odt"
And checkFileInfo "UserCanWrite" is false
And both Collabora files used the same file id
- And Collabora can not save the file with the content of "./../assets/template.odt"
- Then Collabora downoads the file and it is equal to "./../assets/template.ods"
+ And Collabora can not save the file with the content of "./../emptyTemplates/template.odt"
+ Then Collabora downoads the file and it is equal to "./../emptyTemplates/template.ods"
Scenario: Open a reshared file through direct editing
Given on instance "serverA"
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
And Collabora fetches checkFileInfo
Then checkFileInfo "BaseFileName" is "document-shared-reshare.odt"
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
| path | /document-shared-reshare.odt |
| shareType | 0 |
@@ -65,19 +65,19 @@ Feature: Direct editing
And checkFileInfo "BaseFileName" is "document-shared-reshare.odt"
And checkFileInfo "UserCanWrite" is false
And both Collabora files used the same file id
- And Collabora can not save the file with the content of "./../assets/template.odt"
- Then Collabora downoads the file and it is equal to "./../assets/template.ods"
+ And Collabora can not save the file with the content of "./../emptyTemplates/template.odt"
+ Then Collabora downoads the file and it is equal to "./../emptyTemplates/template.ods"
@federation
Scenario: Open a federated shared file through direct editing
Given on instance "serverA"
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
And Collabora fetches checkFileInfo
Then checkFileInfo "BaseFileName" is "document-shared-federated.odt"
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"
Given on instance "serverB"
And as user "user2"
@@ -87,20 +87,20 @@ Feature: Direct editing
And checkFileInfo "BaseFileName" is "document-shared-federated.odt"
And checkFileInfo "UserCanWrite" is false
And both Collabora files used the same file id
- And Collabora can not save the file with the content of "./../assets/template.odt"
- Then Collabora downoads the file and it is equal to "./../assets/template.ods"
+ And Collabora can not save the file with the content of "./../emptyTemplates/template.odt"
+ Then Collabora downoads the file and it is equal to "./../emptyTemplates/template.ods"
@federation
Scenario: Open a file in a federated shared folder through direct editing
Given on instance "serverA"
And as user "user1"
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
And Collabora fetches checkFileInfo
Then checkFileInfo "BaseFileName" is "document-shared-federated.odt"
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"
Given on instance "serverB"
And as user "user2"
@@ -110,13 +110,13 @@ Feature: Direct editing
And checkFileInfo "BaseFileName" is "document-shared-federated.odt"
And checkFileInfo "UserCanWrite" is false
And both Collabora files used the same file id
- And Collabora can not save the file with the content of "./../assets/template.odt"
- Then Collabora downoads the file and it is equal to "./../assets/template.ods"
+ And Collabora can not save the file with the content of "./../emptyTemplates/template.odt"
+ Then Collabora downoads the file and it is equal to "./../emptyTemplates/template.ods"
Scenario: Open a share link with direct editing
Given on instance "serverA"
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
And Collabora fetches checkFileInfo
And as "user1" create a share with
@@ -133,15 +133,15 @@ Feature: Direct editing
| 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"
+ And Collabora can save the file with the content of "./../emptyTemplates/template.ods"
+ Then Collabora downoads the file and it is equal to "./../emptyTemplates/template.ods"
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
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"
+ 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
And Collabora fetches checkFileInfo
And as "user1" create a share with
@@ -155,14 +155,14 @@ Feature: Direct editing
| 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"
+ And Collabora can not save the file with the content of "./../emptyTemplates/template.ods"
+ 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
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"
+ 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
And Collabora fetches checkFileInfo
And as "user1" create a share with
@@ -179,14 +179,14 @@ Feature: Direct editing
| 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"
+ And Collabora can save the file with the content of "./../emptyTemplates/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
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"
+ 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
And Collabora fetches checkFileInfo
And as "user1" create a share with
@@ -205,14 +205,14 @@ Feature: Direct editing
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 Collabora can save the file with the content of "./../emptyTemplates/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
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"
+ 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
And Collabora fetches checkFileInfo
And as "user1" create a share with
@@ -230,14 +230,14 @@ Feature: Direct editing
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 Collabora can save the file with the content of "./../emptyTemplates/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
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"
+ 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
And Collabora fetches checkFileInfo
And as "user1" create a share with
@@ -256,8 +256,8 @@ Feature: Direct editing
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 Collabora can save the file with the content of "./../emptyTemplates/template.ods"
+ Then Collabora downoads the file and it is equal to "./../emptyTemplates/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"
@@ -267,7 +267,7 @@ Feature: Direct editing
Given user "user3" exists
Given on instance "serverA"
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
And Collabora fetches checkFileInfo
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 "UserCanWrite" is false
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"
+ And Collabora can not save the file with the content of "./../emptyTemplates/template.ods"
+ Then Collabora downoads the file and it is equal to "./../emptyTemplates/template.odt"
And the direct editing link is only valid once
diff --git a/tests/features/federation.feature b/tests/features/federation.feature
index c1efea6f..acb6a6bd 100644
--- a/tests/features/federation.feature
+++ b/tests/features/federation.feature
@@ -8,7 +8,7 @@ Background:
Scenario: Share a file by federation and open it
Given on instance "serverA"
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"
When User "user1" opens "/document.odt"
And Collabora fetches checkFileInfo
@@ -25,7 +25,7 @@ Background:
Scenario: Share a file by federation and open it
Given on instance "serverA"
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"
Given on instance "serverB"
@@ -36,10 +36,10 @@ Background:
And checkFileInfo "BaseFileName" is "reshare.odt"
And checkFileInfo "UserCanWrite" is true
And Collabora downloads the file
- Then the file is equal to "./../assets/template.odt"
- And Collabora saved the file with the content of "./../assets/template.ods"
+ Then the file is equal to "./../emptyTemplates/template.odt"
+ And Collabora saved the file with the content of "./../emptyTemplates/template.ods"
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 as user "user1"
@@ -47,17 +47,17 @@ Background:
And Collabora fetches checkFileInfo
And checkFileInfo "BaseFileName" is "reshare.odt"
And checkFileInfo "UserCanWrite" is true
- Then the file is equal to "./../assets/template.ods"
- And Collabora saved the file with the content of "./../assets/template.odt"
+ Then the file is equal to "./../emptyTemplates/template.ods"
+ And Collabora saved the file with the content of "./../emptyTemplates/template.odt"
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
Scenario: Share a file by federation and reshare it read-only
Given on instance "serverA"
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"
Given on instance "serverB"
@@ -67,8 +67,8 @@ Background:
And Collabora fetches checkFileInfo
And checkFileInfo "BaseFileName" is "file-reshare-readonly.odt"
And checkFileInfo "UserCanWrite" is true
- Then Collabora downoads the file and it is equal to "./../assets/template.odt"
- And Collabora can save the file with the content of "./../assets/template.ods"
+ Then Collabora downoads the file and it is equal to "./../emptyTemplates/template.odt"
+ And Collabora can save the file with the content of "./../emptyTemplates/template.ods"
And as "user2" create a share with
| path | /file-reshare-readonly.odt |
@@ -82,13 +82,13 @@ Background:
And checkFileInfo "BaseFileName" is "file-reshare-readonly.odt"
And checkFileInfo "UserCanWrite" is false
And both Collabora files used the same file id
- And Collabora can not save the file with the content of "./../assets/template.odt"
- Then Collabora downoads the file and it is equal to "./../assets/template.ods"
+ And Collabora can not save the file with the content of "./../emptyTemplates/template.odt"
+ 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
Given on instance "serverA"
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"
Given on instance "serverB"
@@ -98,8 +98,8 @@ Background:
And Collabora fetches checkFileInfo
And checkFileInfo "BaseFileName" is "file-reshare-rw.odt"
And checkFileInfo "UserCanWrite" is true
- Then Collabora downoads the file and it is equal to "./../assets/template.odt"
- And Collabora can save the file with the content of "./../assets/template.ods"
+ Then Collabora downoads the file and it is equal to "./../emptyTemplates/template.odt"
+ And Collabora can save the file with the content of "./../emptyTemplates/template.ods"
And as "user2" create a share with
| path | /file-reshare-rw.odt |
@@ -113,14 +113,14 @@ Background:
Then checkFileInfo "BaseFileName" is "file-reshare-rw.odt"
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"
- And Collabora downoads the file and it is equal to "./../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 "./../emptyTemplates/template.ods"
@known-failure-ci
Scenario: Share a file by federation and reshare it as a link
Given on instance "serverA"
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"
Then User "user1" opens "/file-reshare-link.odt"
And Collabora fetches checkFileInfo
@@ -135,8 +135,8 @@ Background:
And checkFileInfo "BaseFileName" is "file-reshare-link.odt"
And checkFileInfo "UserCanWrite" is true
And both Collabora files used the same file id
- Then Collabora downoads the file and it is equal to "./../assets/template.odt"
- And Collabora can save the file with the content of "./../assets/template.ods"
+ Then Collabora downoads the file and it is equal to "./../emptyTemplates/template.odt"
+ And Collabora can save the file with the content of "./../emptyTemplates/template.ods"
# This might fail curently due to using the same instance
And as "user2" create a share with
@@ -153,5 +153,5 @@ Background:
## And checkFileInfo "OwnerId" is "user1"
## And both Collabora files used the same file id
And checkFileInfo "UserCanWrite" is false
- And Collabora downoads the file and it is equal to "./../assets/template.ods"
- And Collabora can not save the file with the content of "./../assets/template.odt"
+ And Collabora downoads the file and it is equal to "./../emptyTemplates/template.ods"
+ And Collabora can not save the file with the content of "./../emptyTemplates/template.odt"
diff --git a/tests/features/wopi.feature b/tests/features/wopi.feature
index 64ad99e2..a770f020 100644
--- a/tests/features/wopi.feature
+++ b/tests/features/wopi.feature
@@ -6,7 +6,7 @@ Feature: WOPI
Scenario: Create a new wopi token for a user and open it
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"
And Collabora fetches checkFileInfo
And Collabora fetches and receives the following in the checkFileInfo response
@@ -18,7 +18,7 @@ Feature: WOPI
Scenario: Fetch checkFileInfo for public share link
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
| path | /file.odt |
| shareType | 3 |
@@ -29,15 +29,15 @@ Feature: WOPI
And checkFileInfo "UserId" matches "/Guest-/"
And checkFileInfo "OwnerId" is "user1"
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 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
Given as user "user1"
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
| path | /NewFolder |
| shareType | 3 |
@@ -50,14 +50,14 @@ Feature: WOPI
| UserCanWrite | |
| OwnerId | user1 |
And checkFileInfo "UserId" matches "/Guest-/"
- And Collabora downoads the file and it is equal to "./../assets/template.odt"
- And Collabora can not save the file with the content of "./../assets/template.ods"
+ And Collabora downoads the file and it is equal to "./../emptyTemplates/template.odt"
+ And Collabora can not save the file with the content of "./../emptyTemplates/template.ods"
Then both Collabora files used the same file id
Scenario: Open a file in a folder shared by link with a guest name
Given as user "user1"
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
| path | /NewFolder |
| shareType | 3 |
@@ -71,14 +71,14 @@ Feature: WOPI
| OwnerId | user1 |
| UserFriendlyName | Anonymous (Guest) |
And checkFileInfo "UserId" matches "/Guest-/"
- And Collabora downoads the file and it is equal to "./../assets/template.odt"
- And Collabora can not save the file with the content of "./../assets/template.ods"
+ And Collabora downoads the file and it is equal to "./../emptyTemplates/template.odt"
+ And Collabora can not save the file with the content of "./../emptyTemplates/template.ods"
Then both Collabora files used the same file id
Scenario: Open a file in a folder shared by link as the owner
Given as user "user1"
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
| path | /NewFolder |
| shareType | 3 |
@@ -90,13 +90,13 @@ Feature: WOPI
| UserCanWrite | |
| OwnerId | user1 |
| UserId | user1 |
- And Collabora downoads the file and it is equal to "./../assets/template.odt"
- And Collabora can not save the file with the content of "./../assets/template.ods"
+ And Collabora downoads the file and it is equal to "./../emptyTemplates/template.odt"
+ And Collabora can not save the file with the content of "./../emptyTemplates/template.ods"
Then both Collabora files used the same file id
Scenario: Fetch checkFileInfo for public share link as the owner
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
| path | /file.odt |
| shareType | 3 |
@@ -106,12 +106,12 @@ Feature: WOPI
| UserCanWrite | |
| OwnerId | user1 |
| UserId | user1 |
- And Collabora downoads the file and it is equal to "./../assets/template.odt"
- And Collabora can not save the file with the content of "./../assets/template.ods"
+ And Collabora downoads the file and it is equal to "./../emptyTemplates/template.odt"
+ And Collabora can not save the file with the content of "./../emptyTemplates/template.ods"
Scenario: Fetch checkFileInfo for public share link with download hidden
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
| path | /file.odt |
| shareType | 3 |
@@ -142,7 +142,7 @@ Feature: WOPI
Scenario: Fetch checkFileInfo for public share link with write permission
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
| path | /file.odt |
| shareType | 3 |
@@ -156,27 +156,27 @@ Feature: WOPI
And checkFileInfo "OwnerId" is "user1"
And checkFileInfo "UserCanWrite" is true
And Collabora downloads the file
- Then the file is equal to "./../assets/template.odt"
- And Collabora saved the file with the content of "./../assets/template.odt"
+ Then the file is equal to "./../emptyTemplates/template.odt"
+ And Collabora saved the file with the content of "./../emptyTemplates/template.odt"
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
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"
And Collabora fetches checkFileInfo
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 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
- 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
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
| path | /file.odt |
| shareType | 3 |
@@ -191,15 +191,15 @@ Feature: WOPI
And checkFileInfo "OwnerId" is "user1"
And checkFileInfo "UserCanWrite" is true
And Collabora downloads the file
- Then the file is equal to "./../assets/template.odt"
- And Collabora saved the file with the content of "./../assets/template.ods"
+ Then the file is equal to "./../emptyTemplates/template.odt"
+ And Collabora saved the file with the content of "./../emptyTemplates/template.ods"
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
Given as user "user1"
- And User "user1" uploads file "./../assets/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 "/file1.odt"
+ And User "user1" uploads file "./../emptyTemplates/template.odt" to "/file2.odt"
Then User "user1" opens "/file1.odt"
And Collabora fetches checkFileInfo
Then User "user1" opens "/file2.odt"
@@ -208,7 +208,7 @@ Feature: WOPI
Scenario: Open a shared file
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
| path | /file-readonly.odt |
| shareType | 0 |
@@ -216,14 +216,14 @@ Feature: WOPI
| permissions | 1 |
Then User "user2" opens "/file-readonly.odt"
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 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
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
| path | /file-rw.odt |
| shareType | 0 |
@@ -232,13 +232,13 @@ Feature: WOPI
Then User "user2" opens "/file-rw.odt"
And Collabora fetches checkFileInfo
And checkFileInfo "UserCanWrite" is true
- And Collabora downoads the file and it is equal to "./../assets/template.odt"
- And Collabora can save the file with the content of "./../assets/template.ods"
+ And Collabora downoads the file and it is equal to "./../emptyTemplates/template.odt"
+ And Collabora can save the file with the content of "./../emptyTemplates/template.ods"
Scenario: Open a reshared file with read permissions
Given user "user3" exists
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
| path | /file-reshare-ro.odt |
| shareType | 0 |
@@ -253,9 +253,9 @@ Feature: WOPI
Then User "user3" opens "/file-reshare-ro.odt"
And Collabora fetches checkFileInfo
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 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
@@ -273,7 +273,7 @@ Feature: WOPI
Scenario: Save as
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"
And Collabora fetches and receives the following in the checkFileInfo response
| BaseFileName | file-origin.odt |
@@ -281,7 +281,7 @@ Feature: WOPI
| UserId | user1 |
| UserFriendlyName | user1-displayname |
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"
Then User "user1" opens "/saveas.odt"
@@ -291,11 +291,11 @@ Feature: WOPI
| UserId | user1 |
| UserFriendlyName | user1-displayname |
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
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
| path | /file-origin.odt |
| shareType | 0 |
@@ -307,7 +307,7 @@ Feature: WOPI
| OwnerId | user1 |
| UserId | user2 |
| 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"
Then User "user2" opens "/saveas.odt"
@@ -317,4 +317,4 @@ Feature: WOPI
| UserId | user2 |
| UserFriendlyName | user2-displayname |
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"