From 40661898b9a3f630c6718d94d7a79dded3248655 Mon Sep 17 00:00:00 2001 From: Sabin Date: Fri, 7 Jun 2024 16:50:12 +0545 Subject: [PATCH] adding secure view in apisharingNg feature file --- .../features/apiSharingNg/sharedByMe.feature | 68 ++++++++++++------- .../apiSharingNg/sharedWithMe.feature | 68 ++++++++++++------- 2 files changed, 88 insertions(+), 48 deletions(-) diff --git a/tests/acceptance/features/apiSharingNg/sharedByMe.feature b/tests/acceptance/features/apiSharingNg/sharedByMe.feature index 08e8419dd7..bcfa15e0ee 100644 --- a/tests/acceptance/features/apiSharingNg/sharedByMe.feature +++ b/tests/acceptance/features/apiSharingNg/sharedByMe.feature @@ -12,14 +12,14 @@ Feature: resources shared by user | Brian | - Scenario: sharer lists the file share (Personal space) + Scenario Outline: sharer lists the file share (Personal space) Given user "Alice" has uploaded file with content "hello world" to "textfile.txt" And user "Alice" has sent the following resource share invitation: - | resource | textfile.txt | - | space | Personal | - | sharee | Brian | - | shareType | user | - | permissionsRole | Viewer | + | resource | textfile.txt | + | space | Personal | + | sharee | Brian | + | shareType | user | + | permissionsRole | | When user "Alice" lists the shares shared by her using the Graph API Then the HTTP status code should be "200" And the JSON data of the response should contain resource "textfile.txt" with the following data: @@ -133,6 +133,11 @@ Feature: resources shared by user } } """ + Examples: + | permissions-role | + | File Editor | + | Viewer | + | Secure viewer | Scenario: sharer lists the file share shared from inside a folder (Personal space) @@ -259,14 +264,14 @@ Feature: resources shared by user """ - Scenario: sharer lists the folder share (Personal space) + Scenario Outline: sharer lists the folder share (Personal space) Given user "Alice" has created folder "FolderToShare" And user "Alice" has sent the following resource share invitation: - | resource | FolderToShare | - | space | Personal | - | sharee | Brian | - | shareType | user | - | permissionsRole | Viewer | + | resource | FolderToShare | + | space | Personal | + | sharee | Brian | + | shareType | user | + | permissionsRole | | When user "Alice" lists the shares shared by her using the Graph API Then the HTTP status code should be "200" And the JSON data of the response should contain resource "FolderToShare" with the following data: @@ -373,6 +378,11 @@ Feature: resources shared by user } } """ + Examples: + | permissions-role | + | Editor | + | Viewer | + | Secure viewer | Scenario: sharer lists the file and folder shares (Personal space) @@ -820,17 +830,17 @@ Feature: resources shared by user """ - Scenario: sharer lists the file share (Project space) + Scenario Outline: sharer lists the file share (Project space) Given using spaces DAV path And the administrator has assigned the role "Space Admin" to user "Alice" using the Graph API And user "Alice" has created a space "NewSpace" with the default quota using the Graph API And user "Alice" has uploaded a file inside space "NewSpace" with content "hello world" to "textfile.txt" And user "Alice" has sent the following resource share invitation: - | resource | textfile.txt | - | space | NewSpace | - | sharee | Brian | - | shareType | user | - | permissionsRole | Viewer | + | resource | textfile.txt | + | space | NewSpace | + | sharee | Brian | + | shareType | user | + | permissionsRole | | When user "Alice" lists the shares shared by her using the Graph API Then the HTTP status code should be "200" And the JSON data of the response should contain resource "textfile.txt" with the following data: @@ -944,6 +954,11 @@ Feature: resources shared by user } } """ + Examples: + | permissions-role | + | File Editor | + | Viewer | + | Secure viewer | Scenario: sharer lists the file share shared from inside a folder (Project space) @@ -1073,17 +1088,17 @@ Feature: resources shared by user """ - Scenario: sharer lists the folder share (Project space) + Scenario Outline: sharer lists the folder share (Project space) Given using spaces DAV path And the administrator has assigned the role "Space Admin" to user "Alice" using the Graph API And user "Alice" has created a space "NewSpace" with the default quota using the Graph API And user "Alice" has created a folder "FolderToShare" in space "NewSpace" And user "Alice" has sent the following resource share invitation: - | resource | FolderToShare | - | space | NewSpace | - | sharee | Brian | - | shareType | user | - | permissionsRole | Viewer | + | resource | FolderToShare | + | space | NewSpace | + | sharee | Brian | + | shareType | user | + | permissionsRole | | When user "Alice" lists the shares shared by her using the Graph API Then the HTTP status code should be "200" And the JSON data of the response should contain resource "FolderToShare" with the following data: @@ -1190,6 +1205,11 @@ Feature: resources shared by user } } """ + Examples: + | permissions-role | + | Editor | + | Viewer | + | Secure viewer | Scenario: sharer lists the file and folder shares (Project space) diff --git a/tests/acceptance/features/apiSharingNg/sharedWithMe.feature b/tests/acceptance/features/apiSharingNg/sharedWithMe.feature index 2a70c244da..27a08ed4a8 100755 --- a/tests/acceptance/features/apiSharingNg/sharedWithMe.feature +++ b/tests/acceptance/features/apiSharingNg/sharedWithMe.feature @@ -12,14 +12,14 @@ Feature: an user gets the resources shared to them | Brian | - Scenario: sharee lists the file share (Personal space) + Scenario Outline: sharee lists the file share (Personal space) Given user "Alice" has uploaded file with content "hello world" to "/textfile0.txt" And user "Alice" has sent the following resource share invitation: - | resource | textfile0.txt | - | space | Personal | - | sharee | Brian | - | shareType | user | - | permissionsRole | Viewer | + | resource | textfile0.txt | + | space | Personal | + | sharee | Brian | + | shareType | user | + | permissionsRole | | When user "Brian" lists the shares shared with him after clearing user cache using the Graph API Then the HTTP status code should be "200" And the JSON data of the response should match @@ -309,16 +309,21 @@ Feature: an user gets the resources shared to them } } """ + Examples: + | permissions-role | + | File Editor | + | Viewer | + | Secure viewer | - Scenario: sharee lists the folder share (Personal space) + Scenario Outline: sharee lists the folder share (Personal space) Given user "Alice" has created folder "folder" And user "Alice" has sent the following resource share invitation: - | resource | folder | - | space | Personal | - | sharee | Brian | - | shareType | user | - | permissionsRole | Viewer | + | resource | folder | + | space | Personal | + | sharee | Brian | + | shareType | user | + | permissionsRole | | When user "Brian" lists the shares shared with him using the Graph API Then the HTTP status code should be "200" And the JSON data of the response should match @@ -597,6 +602,11 @@ Feature: an user gets the resources shared to them } } """ + Examples: + | permissions-role | + | Editor | + | Viewer | + | Secure viewer | Scenario: sharee lists the file share received via group invitation (Personal space) @@ -2499,17 +2509,17 @@ Feature: an user gets the resources shared to them """ @issue-8027 @issue-8314 - Scenario: sharee lists the file share (Project space) + Scenario Outline: sharee lists the file share (Project space) Given using spaces DAV path And the administrator has assigned the role "Space Admin" to user "Alice" using the Graph API And user "Alice" has created a space "new-space" with the default quota using the Graph API And user "Alice" has uploaded a file inside space "new-space" with content "some content" to "testfile.txt" And user "Alice" has sent the following resource share invitation: - | resource | testfile.txt | - | space | new-space | - | sharee | Brian | - | shareType | user | - | permissionsRole | Viewer | + | resource | testfile.txt | + | space | new-space | + | sharee | Brian | + | shareType | user | + | permissionsRole | | When user "Brian" lists the shares shared with him using the Graph API Then the HTTP status code should be "200" And the JSON data of the response should match @@ -2725,19 +2735,24 @@ Feature: an user gets the resources shared to them } } """ + Examples: + | permissions-role | + | File Editor | + | Viewer | + | Secure viewer | @issue-8027 @issue-8314 - Scenario: sharee lists the folder share (Project space) + Scenario Outline: sharee lists the folder share (Project space) Given using spaces DAV path And the administrator has assigned the role "Space Admin" to user "Alice" using the Graph API And user "Alice" has created a space "new-space" with the default quota using the Graph API And user "Alice" has created a folder "folder" in space "new-space" And user "Alice" has sent the following resource share invitation: - | resource | folder | - | space | new-space | - | sharee | Brian | - | shareType | user | - | permissionsRole | Viewer | + | resource | folder | + | space | new-space | + | sharee | Brian | + | shareType | user | + | permissionsRole | | When user "Brian" lists the shares shared with him using the Graph API Then the HTTP status code should be "200" And the JSON data of the response should match @@ -2934,6 +2949,11 @@ Feature: an user gets the resources shared to them } } """ + Examples: + | permissions-role | + | Editor | + | Viewer | + | Secure viewer | Scenario: sharee lists the file share received via group invitation (Project space)