From 70e2c75831679e02d2b9096c6101859e2a62593b Mon Sep 17 00:00:00 2001 From: Salipa Gurung <53458341+Salipa-Gurung@users.noreply.github.com> Date: Thu, 2 May 2024 14:38:50 +0545 Subject: [PATCH] change given step for sharing space in apiDownloads (#9027) --- tests/acceptance/config/behat.yml | 1 + .../features/apiDownloads/download.feature | 17 ++++++++++------- .../features/apiDownloads/spaceDownload.feature | 16 +++++++++------- 3 files changed, 20 insertions(+), 14 deletions(-) diff --git a/tests/acceptance/config/behat.yml b/tests/acceptance/config/behat.yml index f62836b57..f4c7aebd0 100644 --- a/tests/acceptance/config/behat.yml +++ b/tests/acceptance/config/behat.yml @@ -231,6 +231,7 @@ default: - OcisConfigContext: - PublicWebDavContext: - ArchiverContext: + - SharingNgContext: apiSearch1: paths: diff --git a/tests/acceptance/features/apiDownloads/download.feature b/tests/acceptance/features/apiDownloads/download.feature index 599329176..07cc8c76c 100644 --- a/tests/acceptance/features/apiDownloads/download.feature +++ b/tests/acceptance/features/apiDownloads/download.feature @@ -16,13 +16,16 @@ Feature: Download file in project space And the administrator has assigned the role "Space Admin" to user "Alice" using the Graph API And user "Alice" has created a space "download file" with the default quota using the Graph API And user "Alice" has uploaded a file inside space "download file" with content "some content" to "file.txt" - And user "Alice" has shared a space "download file" with settings: - | shareWith | Brian | - | role | editor | - And user "Alice" has shared a space "download file" with settings: - | shareWith | Bob | - | role | viewer | - + And user "Alice" has sent the following share invitation: + | space | download file | + | sharee | Brian | + | shareType | user | + | permissionsRole | Space Editor | + And user "Alice" has sent the following share invitation: + | space | download file | + | sharee | Bob | + | shareType | user | + | permissionsRole | Space Viewer | Scenario Outline: user downloads a file in the project space When user "" downloads the file "file.txt" of the space "download file" using the WebDAV API diff --git a/tests/acceptance/features/apiDownloads/spaceDownload.feature b/tests/acceptance/features/apiDownloads/spaceDownload.feature index afd100be2..199b2f906 100644 --- a/tests/acceptance/features/apiDownloads/spaceDownload.feature +++ b/tests/acceptance/features/apiDownloads/spaceDownload.feature @@ -29,9 +29,11 @@ Feature: Download space Scenario Outline: user downloads a shared space (shared by others) - Given user "Alice" has shared a space "Project-space" with settings: - | shareWith | Brian | - | role | | + Given user "Alice" has sent the following share invitation: + | space | Project-space | + | sharee | Brian | + | shareType | user | + | permissionsRole | | When user "Brian" downloads the space "Project-space" using the WebDAV API Then the HTTP status code should be "200" And the downloaded "tar" archive should contain these files: @@ -39,10 +41,10 @@ Feature: Download space | file1.txt | some data | | .space/readme.md | space description | Examples: - | space-role | - | manager | - | editor | - | viewer | + | space-role | + | Manager | + | Space Editor | + | Space Viewer | Scenario Outline: admin/space-admin tries to download a space that they do not have access to