From a3579eed9989d508cf4b6935c0924f924e586abf Mon Sep 17 00:00:00 2001 From: Prarup Gurung Date: Tue, 30 Apr 2024 16:28:48 +0545 Subject: [PATCH] [full-ci] [tests-only] Use sharingNG for sharing in given step (#9016) * Use sharingNG for sharing in given step * Removed from expected failures --- tests/acceptance/config/behat.yml | 1 + ...ected-failures-localAPI-on-OCIS-storage.md | 4 ---- .../apiGraphUserGroup/deleteGroup.feature | 21 ++++++++++++++++--- .../apiGraphUserGroup/deleteUser.feature | 12 ++++++----- 4 files changed, 26 insertions(+), 12 deletions(-) diff --git a/tests/acceptance/config/behat.yml b/tests/acceptance/config/behat.yml index 7461cd9d16..9491e97fb2 100644 --- a/tests/acceptance/config/behat.yml +++ b/tests/acceptance/config/behat.yml @@ -138,6 +138,7 @@ default: - SpacesTUSContext: - OcisConfigContext: - TrashbinContext: + - SharingNgContext: apiCors: paths: diff --git a/tests/acceptance/expected-failures-localAPI-on-OCIS-storage.md b/tests/acceptance/expected-failures-localAPI-on-OCIS-storage.md index 95d017dbca..c1295eba0d 100644 --- a/tests/acceptance/expected-failures-localAPI-on-OCIS-storage.md +++ b/tests/acceptance/expected-failures-localAPI-on-OCIS-storage.md @@ -41,10 +41,6 @@ The expected failures in this file are from features in the owncloud/ocis repo. - [apiGraph/assignRole.feature:31](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiGraph/assignRole.feature#L31) - [apiGraph/assignRole.feature:32](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiGraph/assignRole.feature#L32) -#### [Share lists deleted user as 'user'](https://github.com/owncloud/ocis/issues/903) - -- [apiGraphUserGroup/deleteGroup.feature:67](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiGraphUserGroup/deleteGroup.feature#L67) - #### [A User can get information of another user with Graph API](https://github.com/owncloud/ocis/issues/5125) - [apiGraphUserGroup/getUser.feature:84](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiGraphUserGroup/getUser.feature#L84) diff --git a/tests/acceptance/features/apiGraphUserGroup/deleteGroup.feature b/tests/acceptance/features/apiGraphUserGroup/deleteGroup.feature index f13e6fcbff..7570fa6f59 100644 --- a/tests/acceptance/features/apiGraphUserGroup/deleteGroup.feature +++ b/tests/acceptance/features/apiGraphUserGroup/deleteGroup.feature @@ -68,8 +68,18 @@ Feature: delete groups Given group "grp1" has been created And group "grp2" has been created And user "Alice" has uploaded file with content "sample text" to "lorem.txt" - And user "Alice" has shared file "lorem.txt" with group "grp1" - And user "Alice" has shared file "lorem.txt" with group "grp2" + And user "Alice" has sent the following share invitation: + | resource | lorem.txt | + | space | Personal | + | sharee | grp1 | + | shareType | group | + | permissionsRole | Viewer | + And user "Alice" has sent the following share invitation: + | resource | lorem.txt | + | space | Personal | + | sharee | grp2 | + | shareType | group | + | permissionsRole | Viewer | And group "grp1" has been deleted When user "Alice" gets all the shares of the file "lorem.txt" using the sharing API Then the HTTP status code should be "200" @@ -82,7 +92,12 @@ Feature: delete groups And user "Brian" has been created with default attributes and without skeleton files And group "grp1" has been created And user "Brian" has been added to group "grp1" - And user "Alice" has shared file "lorem.txt" with group "grp1" + And user "Alice" has sent the following share invitation: + | resource | lorem.txt | + | space | Personal | + | sharee | grp1 | + | shareType | group | + | permissionsRole | Viewer | When user "Alice" deletes group "grp1" using the Graph API Then the HTTP status code should be "204" And user "Brian" should not have any received shares diff --git a/tests/acceptance/features/apiGraphUserGroup/deleteUser.feature b/tests/acceptance/features/apiGraphUserGroup/deleteUser.feature index fec4cdd4bb..7492eed7ad 100644 --- a/tests/acceptance/features/apiGraphUserGroup/deleteUser.feature +++ b/tests/acceptance/features/apiGraphUserGroup/deleteUser.feature @@ -156,11 +156,13 @@ Feature: delete user Scenario: accepted share is deleted automatically when the user is deleted Given the administrator has assigned the role "Admin" to user "Alice" using the Graph API And user "Brian" has been created with default attributes and without skeleton files - And user "Brian" has created a folder "new" in space "Brian Murphy" - And user "Brian" has created a share inside of space "Brian Murphy" with settings: - | path | new | - | shareWith | Alice | - | role | viewer | + And user "Brian" has created folder "new" + And user "Brian" has sent the following share invitation: + | resource | new | + | space | Personal | + | sharee | Alice | + | shareType | user | + | permissionsRole | Viewer | When the user "Alice" deletes a user "Brian" using the Graph API Then the HTTP status code should be "204" And as "Alice" folder "Shares/new" should not exist