From ad31643a46bcd46b09b55f471d96a1b65015dfe4 Mon Sep 17 00:00:00 2001 From: "sagargurung1001@gmail.com" Date: Fri, 22 Sep 2023 12:42:20 +0545 Subject: [PATCH 1/3] Added test for the propfind with file id --- .../propfindByFileId.feature | 137 ++++++++++++++++++ 1 file changed, 137 insertions(+) create mode 100644 tests/acceptance/features/apiSpacesDavOperation/propfindByFileId.feature diff --git a/tests/acceptance/features/apiSpacesDavOperation/propfindByFileId.feature b/tests/acceptance/features/apiSpacesDavOperation/propfindByFileId.feature new file mode 100644 index 00000000000..c675abd8819 --- /dev/null +++ b/tests/acceptance/features/apiSpacesDavOperation/propfindByFileId.feature @@ -0,0 +1,137 @@ +Feature: Propfind by file/folder using file id + As a user + I want to check the PROPFIND response of file/folder using their file id + So that I can make sure that the response contains all the relevant values + + Background: + Given using spaces DAV path + And user "Alice" has been created with default attributes and without skeleton files + + + Scenario Outline: send a PROPFIND requests to a file with its FILEID in dav-path url inside root of personal space + Given user "Alice" has uploaded file with content "some data" to "/textfile.txt" + And we save it into "FILEID" + When user "Alice" sends HTTP method "PROPFIND" to URL "" + Then the HTTP status code should be "207" + And the "PROPFIND" response to user "Alice" should contain a mountpoint "Alice Hansen" with these key and value pairs: + | key | value | + | oc:name | textfile.txt | + | oc:permissions | RDNVWZP | + Examples: + | dav-path | + | /remote.php/dav/spaces/<> | + | /dav/spaces/<> | + + + Scenario Outline: send a PROPFIND requests to a file with its FILEID in dav-path url inside a folder of personal space + Given user "Alice" has created folder "folder" + And user "Alice" has uploaded file with content "some data" to "folder/textfile.txt" + And we save it into "FILEID" + When user "Alice" sends HTTP method "PROPFIND" to URL "" + Then the HTTP status code should be "207" + And the "PROPFIND" response to user "Alice" should contain a mountpoint "Alice Hansen" with these key and value pairs: + | key | value | + | oc:name | textfile.txt | + | oc:permissions | RDNVWZP | + Examples: + | dav-path | + | /remote.php/dav/spaces/<> | + | /dav/spaces/<> | + + + Scenario Outline: sends a PROPFIND request a file in personal space with its FILEID in dav-path url of another user + Given user "Brian" has been created with default attributes and without skeleton files + And user "Alice" has uploaded file with content "some data" to "textfile.txt" + And we save it into "FILEID" + When user "Brian" sends HTTP method "PROPFIND" to URL "" + Then the HTTP status code should be "404" + Examples: + | dav-path | + | /remote.php/dav/spaces/<> | + | /dav/spaces/<> | + + + Scenario Outline: send a PROPFIND requests to a file with its FILEID in dav-path url inside project space + Given 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 GraphApi + And user "Alice" has uploaded a file inside space "new-space" with content "some content" to "textfile.txt" + And we save it into "FILEID" + When user "Alice" sends HTTP method "PROPFIND" to URL "" + Then the HTTP status code should be "207" + And the "PROPFIND" response should contain a space "new-space" with these key and value pairs: + | key | value | + | oc:name | textfile.txt | + | oc:permissions | RDNVWZP | + Examples: + | dav-path | + | /remote.php/dav/spaces/<> | + | /dav/spaces/<> | + + + Scenario Outline: send a PROPFIND requests to a file with its FILEID in dav-path url inside a folder of project space + Given 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 GraphApi + And user "Alice" has created a folder "folder" in space "new-space" + And user "Alice" has uploaded a file inside space "new-space" with content "some content" to "/folder/textfile.txt" + And we save it into "FILEID" + When user "Alice" sends HTTP method "PROPFIND" to URL "" + Then the HTTP status code should be "207" + And the "PROPFIND" response should contain a space "new-space" with these key and value pairs: + | key | value | + | oc:name | textfile.txt | + | oc:permissions | RDNVWZP | + Examples: + | dav-path | + | /remote.php/dav/spaces/<> | + | /dav/spaces/<> | + + + Scenario Outline: sends a PROPFIND request a file in project space with its FILEID in dav-path url of another user + Given user "Brian" has been created with default attributes and without skeleton files + 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 GraphApi + And user "Alice" has uploaded a file inside space "new-space" with content "some content" to "textfile.txt" + And we save it into "FILEID" + When user "Brian" sends HTTP method "PROPFIND" to URL "" + Then the HTTP status code should be "404" + Examples: + | dav-path | + | /remote.php/dav/spaces/<> | + | /dav/spaces/<> | + + + Scenario Outline: send a PROPFIND requests to a file with its FILEID in dav-path of a shared file + Given user "Brian" has been created with default attributes and without skeleton files + And user "Alice" has uploaded file with content "some data" to "/textfile.txt" + And we save it into "FILEID" + And user "Alice" has shared file "/textfile.txt" with user "Brian" + And user "Brian" has accepted share "/textfile.txt" offered by user "Alice" + When user "Brian" sends HTTP method "PROPFIND" to URL "" + Then the HTTP status code should be "207" + And the "PROPFIND" response to user "Alice" should contain a mountpoint "Brian Murphy" with these key and value pairs: + | key | value | + | oc:name | textfile.txt | + | oc:permissions | SRNVW | + Examples: + | dav-path | + | /remote.php/dav/spaces/<> | + | /dav/spaces/<> | + + + Scenario Outline: sharee send a PROPFIND requests to a file with its FILEID in dav-path inside of a shared folder + Given user "Brian" has been created with default attributes and without skeleton files + And user "Alice" has created folder "/folder" + And user "Alice" has shared folder "/folder" with user "Brian" + And user "Brian" has accepted share "/folder" offered by user "Alice" + And user "Alice" has uploaded file with content "some data" to "/folder/textfile.txt" + And we save it into "FILEID" + When user "Brian" sends HTTP method "PROPFIND" to URL "" + Then the HTTP status code should be "207" + And the "PROPFIND" response to user "Alice" should contain a mountpoint "Brian Murphy" with these key and value pairs: + | key | value | + | oc:name | textfile.txt | + | oc:permissions | RDNVWZP | + Examples: + | dav-path | + | /remote.php/dav/spaces/<> | + | /dav/spaces/<> | From 93a3da8da9b7057b38a733249abbce65625b8651 Mon Sep 17 00:00:00 2001 From: "sagargurung1001@gmail.com" Date: Fri, 22 Sep 2023 12:49:26 +0545 Subject: [PATCH 2/3] Refactor the scenario title description --- .../propfindByFileId.feature | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/tests/acceptance/features/apiSpacesDavOperation/propfindByFileId.feature b/tests/acceptance/features/apiSpacesDavOperation/propfindByFileId.feature index c675abd8819..b52baaab360 100644 --- a/tests/acceptance/features/apiSpacesDavOperation/propfindByFileId.feature +++ b/tests/acceptance/features/apiSpacesDavOperation/propfindByFileId.feature @@ -1,6 +1,6 @@ -Feature: Propfind by file/folder using file id +Feature: propfind a file using file id As a user - I want to check the PROPFIND response of file/folder using their file id + I want to check the PROPFIND response of file using their file id So that I can make sure that the response contains all the relevant values Background: @@ -8,7 +8,7 @@ Feature: Propfind by file/folder using file id And user "Alice" has been created with default attributes and without skeleton files - Scenario Outline: send a PROPFIND requests to a file with its FILEID in dav-path url inside root of personal space + Scenario Outline: send a PROPFIND request to a file inside root of personal space Given user "Alice" has uploaded file with content "some data" to "/textfile.txt" And we save it into "FILEID" When user "Alice" sends HTTP method "PROPFIND" to URL "" @@ -23,7 +23,7 @@ Feature: Propfind by file/folder using file id | /dav/spaces/<> | - Scenario Outline: send a PROPFIND requests to a file with its FILEID in dav-path url inside a folder of personal space + Scenario Outline: send a PROPFIND requests to a file inside a folder of personal space Given user "Alice" has created folder "folder" And user "Alice" has uploaded file with content "some data" to "folder/textfile.txt" And we save it into "FILEID" @@ -39,7 +39,7 @@ Feature: Propfind by file/folder using file id | /dav/spaces/<> | - Scenario Outline: sends a PROPFIND request a file in personal space with its FILEID in dav-path url of another user + Scenario Outline: sends a PROPFIND request to a file in personal space owned by other user Given user "Brian" has been created with default attributes and without skeleton files And user "Alice" has uploaded file with content "some data" to "textfile.txt" And we save it into "FILEID" @@ -51,7 +51,7 @@ Feature: Propfind by file/folder using file id | /dav/spaces/<> | - Scenario Outline: send a PROPFIND requests to a file with its FILEID in dav-path url inside project space + Scenario Outline: send a PROPFIND requests to a file of inside project space Given 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 GraphApi And user "Alice" has uploaded a file inside space "new-space" with content "some content" to "textfile.txt" @@ -68,7 +68,7 @@ Feature: Propfind by file/folder using file id | /dav/spaces/<> | - Scenario Outline: send a PROPFIND requests to a file with its FILEID in dav-path url inside a folder of project space + Scenario Outline: send a PROPFIND requests to a file inside a folder of project space Given 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 GraphApi And user "Alice" has created a folder "folder" in space "new-space" @@ -86,7 +86,7 @@ Feature: Propfind by file/folder using file id | /dav/spaces/<> | - Scenario Outline: sends a PROPFIND request a file in project space with its FILEID in dav-path url of another user + Scenario Outline: sends a PROPFIND request to a file inside project space owned by other user Given user "Brian" has been created with default attributes and without skeleton files 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 GraphApi @@ -100,7 +100,7 @@ Feature: Propfind by file/folder using file id | /dav/spaces/<> | - Scenario Outline: send a PROPFIND requests to a file with its FILEID in dav-path of a shared file + Scenario Outline: send a PROPFIND requests to a shared file Given user "Brian" has been created with default attributes and without skeleton files And user "Alice" has uploaded file with content "some data" to "/textfile.txt" And we save it into "FILEID" @@ -118,7 +118,7 @@ Feature: Propfind by file/folder using file id | /dav/spaces/<> | - Scenario Outline: sharee send a PROPFIND requests to a file with its FILEID in dav-path inside of a shared folder + Scenario Outline: sharee send a PROPFIND requests to a file inside of a shared folder Given user "Brian" has been created with default attributes and without skeleton files And user "Alice" has created folder "/folder" And user "Alice" has shared folder "/folder" with user "Brian" From c71a73e4005aa16ac5b70e868d008b27652ec939 Mon Sep 17 00:00:00 2001 From: "sagargurung1001@gmail.com" Date: Mon, 25 Sep 2023 14:29:06 +0545 Subject: [PATCH 3/3] Review address- refactor scenarios --- .../propfindByFileId.feature | 30 +++++++++---------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/tests/acceptance/features/apiSpacesDavOperation/propfindByFileId.feature b/tests/acceptance/features/apiSpacesDavOperation/propfindByFileId.feature index b52baaab360..b88a52af3dd 100644 --- a/tests/acceptance/features/apiSpacesDavOperation/propfindByFileId.feature +++ b/tests/acceptance/features/apiSpacesDavOperation/propfindByFileId.feature @@ -14,32 +14,32 @@ Feature: propfind a file using file id When user "Alice" sends HTTP method "PROPFIND" to URL "" Then the HTTP status code should be "207" And the "PROPFIND" response to user "Alice" should contain a mountpoint "Alice Hansen" with these key and value pairs: - | key | value | - | oc:name | textfile.txt | - | oc:permissions | RDNVWZP | + | key | value | + | oc:name | textfile.txt | + | oc:permissions | RDNVWZP | Examples: | dav-path | | /remote.php/dav/spaces/<> | | /dav/spaces/<> | - Scenario Outline: send a PROPFIND requests to a file inside a folder of personal space + Scenario Outline: send a PROPFIND request to a file inside a folder of personal space Given user "Alice" has created folder "folder" And user "Alice" has uploaded file with content "some data" to "folder/textfile.txt" And we save it into "FILEID" When user "Alice" sends HTTP method "PROPFIND" to URL "" Then the HTTP status code should be "207" And the "PROPFIND" response to user "Alice" should contain a mountpoint "Alice Hansen" with these key and value pairs: - | key | value | - | oc:name | textfile.txt | - | oc:permissions | RDNVWZP | + | key | value | + | oc:name | textfile.txt | + | oc:permissions | RDNVWZP | Examples: | dav-path | | /remote.php/dav/spaces/<> | | /dav/spaces/<> | - Scenario Outline: sends a PROPFIND request to a file in personal space owned by other user + Scenario Outline: send a PROPFIND request to a file in personal space owned by another user Given user "Brian" has been created with default attributes and without skeleton files And user "Alice" has uploaded file with content "some data" to "textfile.txt" And we save it into "FILEID" @@ -51,7 +51,7 @@ Feature: propfind a file using file id | /dav/spaces/<> | - Scenario Outline: send a PROPFIND requests to a file of inside project space + Scenario Outline: send a PROPFIND request to a file of inside project space Given 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 GraphApi And user "Alice" has uploaded a file inside space "new-space" with content "some content" to "textfile.txt" @@ -61,14 +61,14 @@ Feature: propfind a file using file id And the "PROPFIND" response should contain a space "new-space" with these key and value pairs: | key | value | | oc:name | textfile.txt | - | oc:permissions | RDNVWZP | + | oc:permissions | RDNVWZP | Examples: | dav-path | | /remote.php/dav/spaces/<> | | /dav/spaces/<> | - Scenario Outline: send a PROPFIND requests to a file inside a folder of project space + Scenario Outline: send a PROPFIND request to a file inside a folder of project space Given 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 GraphApi And user "Alice" has created a folder "folder" in space "new-space" @@ -79,14 +79,14 @@ Feature: propfind a file using file id And the "PROPFIND" response should contain a space "new-space" with these key and value pairs: | key | value | | oc:name | textfile.txt | - | oc:permissions | RDNVWZP | + | oc:permissions | RDNVWZP | Examples: | dav-path | | /remote.php/dav/spaces/<> | | /dav/spaces/<> | - Scenario Outline: sends a PROPFIND request to a file inside project space owned by other user + Scenario Outline: send a PROPFIND request to a file inside project space owned by another user Given user "Brian" has been created with default attributes and without skeleton files 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 GraphApi @@ -100,7 +100,7 @@ Feature: propfind a file using file id | /dav/spaces/<> | - Scenario Outline: send a PROPFIND requests to a shared file + Scenario Outline: send a PROPFIND request to a shared file Given user "Brian" has been created with default attributes and without skeleton files And user "Alice" has uploaded file with content "some data" to "/textfile.txt" And we save it into "FILEID" @@ -118,7 +118,7 @@ Feature: propfind a file using file id | /dav/spaces/<> | - Scenario Outline: sharee send a PROPFIND requests to a file inside of a shared folder + Scenario Outline: sharee sends a PROPFIND request to a file inside of a shared folder Given user "Brian" has been created with default attributes and without skeleton files And user "Alice" has created folder "/folder" And user "Alice" has shared folder "/folder" with user "Brian"