From 72c072f2f3bad61295e479ecc7f3461700f7c40b Mon Sep 17 00:00:00 2001 From: sushmita56 Date: Thu, 24 Feb 2022 16:12:33 +0545 Subject: [PATCH] added then steps for apiMain suite --- .../apiMain/checksums-TestOc10Issue38835.feature | 11 ++++++----- .../features/apiMain/external-storage.feature | 6 ++++-- tests/acceptance/features/bootstrap/Sharing.php | 2 ++ tests/acceptance/features/bootstrap/WebDav.php | 1 + 4 files changed, 13 insertions(+), 7 deletions(-) diff --git a/tests/acceptance/features/apiMain/checksums-TestOc10Issue38835.feature b/tests/acceptance/features/apiMain/checksums-TestOc10Issue38835.feature index 078ab6aa074f..065630c74ac2 100644 --- a/tests/acceptance/features/apiMain/checksums-TestOc10Issue38835.feature +++ b/tests/acceptance/features/apiMain/checksums-TestOc10Issue38835.feature @@ -13,8 +13,9 @@ Feature: checksums And using new DAV path And user "Brian" has been created with default attributes and without skeleton files And user "Alice" has uploaded file "filesForUpload/textfile.txt" to "/myChecksumFile.txt" with checksum "MD5:d70b40f177b14b470d1756a3c12b963a" - When user "Alice" shares file "/myChecksumFile.txt" with user "Brian" using the sharing API - And user "Brian" accepts share "/myChecksumFile.txt" offered by user "Alice" using the sharing API - And user "Brian" uploads file with checksum "SHA1:ce5582148c6f0c1282335b87df5ed4be4b781399" and content "Some Text" to "/Shares/myChecksumFile.txt" using the WebDAV API - And user "Brian" requests the checksum of "/Shares/myChecksumFile.txt" via propfind - Then the webdav checksum should be empty + And user "Alice" has shared file "/myChecksumFile.txt" with user "Brian" + And user "Brian" has accepted share "/myChecksumFile.txt" offered by user "Alice" + And user "Brian" has uploaded file with checksum "SHA1:ce5582148c6f0c1282335b87df5ed4be4b781399" and content "Some Text" to "/Shares/myChecksumFile.txt" + When user "Brian" requests the checksum of "/Shares/myChecksumFile.txt" via propfind + Then the HTTP status code should be "207" + And the webdav checksum should be empty diff --git a/tests/acceptance/features/apiMain/external-storage.feature b/tests/acceptance/features/apiMain/external-storage.feature index f357fb3df1a8..9d2fa2fe49e4 100644 --- a/tests/acceptance/features/apiMain/external-storage.feature +++ b/tests/acceptance/features/apiMain/external-storage.feature @@ -31,7 +31,8 @@ Feature: external-storage | Brian | And user "Alice" has created folder "/local_storage/foo1" When user "Alice" moves file "/textfile0.txt" to "/local_storage/foo1/textfile0.txt" using the WebDAV API - Then as "Brian" file "/local_storage/foo1/textfile0.txt" should exist + Then the HTTP status code should be "201" + And as "Brian" file "/local_storage/foo1/textfile0.txt" should exist And as "Alice" file "/local_storage/foo1/textfile0.txt" should exist Scenario: Move a file out of storage @@ -42,7 +43,8 @@ Feature: external-storage And user "Alice" has created folder "/local_storage/foo2" And user "Alice" has moved file "/textfile0.txt" to "/local_storage/foo2/textfile0.txt" When user "Brian" moves file "/local_storage/foo2/textfile0.txt" to "/local.txt" using the WebDAV API - Then as "Brian" file "/local_storage/foo2/textfile0.txt" should not exist + Then the HTTP status code should be "201" + And as "Brian" file "/local_storage/foo2/textfile0.txt" should not exist And as "Alice" file "/local_storage/foo2/textfile0.txt" should not exist And as "Brian" file "/local.txt" should exist diff --git a/tests/acceptance/features/bootstrap/Sharing.php b/tests/acceptance/features/bootstrap/Sharing.php index ce349793feec..9aa9d2db8c35 100644 --- a/tests/acceptance/features/bootstrap/Sharing.php +++ b/tests/acceptance/features/bootstrap/Sharing.php @@ -1388,6 +1388,7 @@ public function userSharesFileWithUserUsingTheSharingApi( $user2, $permissions ); + $this->pushToLastStatusCodesArrays(); } /** @@ -2977,6 +2978,7 @@ public function userReactsToShareOfferedBy(string $user, string $action, string $url, null ); + $this->pushToLastStatusCodesArrays(); } /** diff --git a/tests/acceptance/features/bootstrap/WebDav.php b/tests/acceptance/features/bootstrap/WebDav.php index aa3e4bff4e9e..330f9e9cc270 100644 --- a/tests/acceptance/features/bootstrap/WebDav.php +++ b/tests/acceptance/features/bootstrap/WebDav.php @@ -3230,6 +3230,7 @@ public function userUploadsAFileWithChecksumAndContentTo( $content ); $this->lastUploadDeleteTime = \time(); + $this->pushToLastStatusCodesArrays(); } /**