From aba3a29e8e4142c5690a4303aa5b495eb741d5fe Mon Sep 17 00:00:00 2001 From: Viktor Scharf Date: Tue, 9 Sep 2025 12:28:39 +0200 Subject: [PATCH] Apitest. file extension change git checkout -b file-extension-rename-test --- tests/acceptance/bootstrap/CliContext.php | 14 ++++++++++++++ .../collaborativePosixFS.feature | 7 +++++++ 2 files changed, 21 insertions(+) diff --git a/tests/acceptance/bootstrap/CliContext.php b/tests/acceptance/bootstrap/CliContext.php index a8b826ee65..268b5d8d4c 100644 --- a/tests/acceptance/bootstrap/CliContext.php +++ b/tests/acceptance/bootstrap/CliContext.php @@ -569,6 +569,20 @@ class CliContext implements Context { sleep(1); } + /** + * @When the administrator has created the file :file with content :content for user :user on the POSIX filesystem + * + * @param string $file + * @param string $content + * @param string $user + * + * @return void + */ + public function theAdministratorHasCreatedFile(string $file, string $content, string $user): void { + $this->theAdministratorCreatesFile($file, $content, $user); + $this->theCommandShouldBeSuccessful(); + } + /** * @When the administrator creates the file :file with size :size for user :user on the POSIX filesystem * diff --git a/tests/acceptance/features/collaborativePosix/collaborativePosixFS.feature b/tests/acceptance/features/collaborativePosix/collaborativePosixFS.feature index 71dfcb114b..982b337d9b 100644 --- a/tests/acceptance/features/collaborativePosix/collaborativePosixFS.feature +++ b/tests/acceptance/features/collaborativePosix/collaborativePosixFS.feature @@ -78,6 +78,13 @@ Feature: create a resources using collaborative posixfs And the content of file "/new-name.txt" for user "Alice" should be "content" + Scenario: rename a created file + Given the administrator has created the file "test.txt" with content "content" for user "Alice" on the POSIX filesystem + When the administrator renames the file "test.txt" to "test.md" for user "Alice" on the POSIX filesystem + Then the command should be successful + And the content of file "/test.md" for user "Alice" should be "content" + + Scenario: move file to folder Given user "Alice" has uploaded file with content "content" to "test.txt" When the administrator moves the file "test.txt" to the folder "firstFolder" for user "Alice" on the POSIX filesystem