From f26de59b3ab1e6f553f9b155a6fe8ec52717e04c Mon Sep 17 00:00:00 2001 From: Salipa Gurung <53458341+Salipa-Gurung@users.noreply.github.com> Date: Thu, 25 Apr 2024 18:46:05 +0545 Subject: [PATCH] change given step using SharingNG for share (#8965) --- tests/acceptance/config/behat.yml | 1 + ...ected-failures-localAPI-on-OCIS-storage.md | 4 +- .../features/apiArchiver/downloadById.feature | 56 ++++++++++++++++--- 3 files changed, 51 insertions(+), 10 deletions(-) diff --git a/tests/acceptance/config/behat.yml b/tests/acceptance/config/behat.yml index 13f5b71aa..e059550a6 100644 --- a/tests/acceptance/config/behat.yml +++ b/tests/acceptance/config/behat.yml @@ -101,6 +101,7 @@ default: - OCSContext: - PublicWebDavContext: - GraphContext: + - SharingNgContext: apiGraph: paths: diff --git a/tests/acceptance/expected-failures-localAPI-on-OCIS-storage.md b/tests/acceptance/expected-failures-localAPI-on-OCIS-storage.md index 2cb8c511a..d15db5014 100644 --- a/tests/acceptance/expected-failures-localAPI-on-OCIS-storage.md +++ b/tests/acceptance/expected-failures-localAPI-on-OCIS-storage.md @@ -15,8 +15,8 @@ The expected failures in this file are from features in the owncloud/ocis repo. ### [Downloaded /Shares tar contains resource (files|folder) with leading / in Response](https://github.com/owncloud/ocis/issues/4636) -- [apiArchiver/downloadById.feature:125](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiArchiver/downloadById.feature#L125) -- [apiArchiver/downloadById.feature:126](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiArchiver/downloadById.feature#L126) +- [apiArchiver/downloadById.feature:165](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiArchiver/downloadById.feature#L165) +- [apiArchiver/downloadById.feature:166](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiArchiver/downloadById.feature#L166) ### [PROPFIND on accepted shares with identical names containing brackets exit with 404](https://github.com/owncloud/ocis/issues/4421) diff --git a/tests/acceptance/features/apiArchiver/downloadById.feature b/tests/acceptance/features/apiArchiver/downloadById.feature index 9a3836e78..4f676f88f 100644 --- a/tests/acceptance/features/apiArchiver/downloadById.feature +++ b/tests/acceptance/features/apiArchiver/downloadById.feature @@ -80,10 +80,30 @@ Feature: download multiple resources bundled into an archive And user "Alice" has uploaded file with content "some data" to "/my_data/textfile2.txt" And user "Alice" has created folder "more_data" And user "Alice" has uploaded file with content "more data" to "/more_data/an_other_file.txt" - And user "Alice" has shared file "textfile0.txt" with user "Brian" - And user "Alice" has shared file "textfile1.txt" with user "Brian" - And user "Alice" has shared folder "my_data" with user "Brian" - And user "Alice" has shared folder "more_data" with user "Brian" + And user "Alice" has sent the following share invitation: + | resource | textfile0.txt | + | space | Personal | + | sharee | Brian | + | shareType | user | + | permissionsRole | Viewer | + And user "Alice" has sent the following share invitation: + | resource | textfile1.txt | + | space | Personal | + | sharee | Brian | + | shareType | user | + | permissionsRole | Viewer | + And user "Alice" has sent the following share invitation: + | resource | my_data | + | space | Personal | + | sharee | Brian | + | shareType | user | + | permissionsRole | Viewer | + And user "Alice" has sent the following share invitation: + | resource | more_data | + | space | Personal | + | sharee | Brian | + | shareType | user | + | permissionsRole | Viewer | When user "Brian" downloads the archive of these items using the resource ids | /Shares/textfile0.txt | | /Shares/textfile1.txt | @@ -106,10 +126,30 @@ Feature: download multiple resources bundled into an archive And user "Alice" has uploaded file with content "some data" to "/my_data/textfile2.txt" And user "Alice" has created folder "more_data" And user "Alice" has uploaded file with content "more data" to "/more_data/an_other_file.txt" - And user "Alice" has shared file "textfile0.txt" with user "Brian" - And user "Alice" has shared file "textfile1.txt" with user "Brian" - And user "Alice" has shared folder "my_data" with user "Brian" - And user "Alice" has shared folder "more_data" with user "Brian" + And user "Alice" has sent the following share invitation: + | resource | textfile0.txt | + | space | Personal | + | sharee | Brian | + | shareType | user | + | permissionsRole | Viewer | + And user "Alice" has sent the following share invitation: + | resource | textfile1.txt | + | space | Personal | + | sharee | Brian | + | shareType | user | + | permissionsRole | Viewer | + And user "Alice" has sent the following share invitation: + | resource | my_data | + | space | Personal | + | sharee | Brian | + | shareType | user | + | permissionsRole | Viewer | + And user "Alice" has sent the following share invitation: + | resource | more_data | + | space | Personal | + | sharee | Brian | + | shareType | user | + | permissionsRole | Viewer | When user "Brian" downloads the archive of "/Shares" using the resource id and setting these headers | header | value | | User-Agent | |