test: combine similar steps

This commit is contained in:
Saw-jan committed 2025-02-24 12:23:56 +05:45
1 parent d647c8ec1c
commit 56e24e14db
8 files changed
+20 -21

No files matched your search

+1 -2
View File
@@ -1623,8 +1623,7 @@ class SpacesContext implements Context {
}
/**
* @Given /^user "([^"]*)" has changed the quota of the personal space of "([^"]*)" space to "([^"]*)"$/
* @Given /^user "([^"]*)" has changed the quota of the "([^"]*)" space to "([^"]*)"$/
* @Given /^user "([^"]*)" has changed the quota of space "([^"]*)" to "([^"]*)"$/
*
* @param string $user
* @param string $spaceName
@@ -411,7 +411,7 @@ Feature: user GDPR (General Data Protection Regulation) report
Scenario: generate a GDPR report after the admin updates the quota of personal space
Given user "Admin" has changed the quota of the personal space of "Alice Hansen" space to "10000"
Given user "Admin" has changed the quota of space "Alice Hansen" to "10000"
When user "Alice" exports her GDPR report to "/.personal_data_export.json" using the Graph API
And user "Alice" downloads the content of GDPR report ".personal_data_export.json"
Then the HTTP status code of responses on each endpoint should be "202, 200" respectively
@@ -519,7 +519,7 @@ Feature: Change data of space
Scenario Outline: user can't upload resource greater than set quota
Given the administrator has assigned the role "<user-role>" to user "Alice" using the Graph API
And user "Admin" has changed the quota of the personal space of "Alice Hansen" space to "15"
And user "Admin" has changed the quota of space "Alice Hansen" to "15"
When user "Alice" uploads a file inside space "Alice Hansen" with content "file is more than 15 bytes" to "file.txt" using the WebDAV API
Then the HTTP status code should be "507"
And for user "Alice" the space "Personal" should not contain these entries:
@@ -108,7 +108,7 @@ Feature: State of the quota
Scenario Outline: check the relative amount of quota of personal space
Given user "Admin" has changed the quota of the personal space of "Alice Hansen" space to "10000"
Given user "Admin" has changed the quota of space "Alice Hansen" to "10000"
And user "Alice" has uploaded file "<file-upload>" to "/demo.txt"
When the user "Alice" requests these endpoints with "GET" with basic auth
| endpoint |
@@ -141,7 +141,7 @@ Feature: State of the quota
Scenario: user can restore a file version even if there is not enough quota to do so
Given user "Admin" has changed the quota of the "Alice Hansen" space to "30"
Given user "Admin" has changed the quota of space "Alice Hansen" to "30"
And user "Alice" has uploaded file with content "file is less than 30 bytes" to "/file.txt"
And user "Alice" has uploaded file with content "reduceContent" to "/file.txt"
And user "Alice" has uploaded file with content "some content" to "newFile.txt"
@@ -331,7 +331,7 @@ Feature: sharing
| shareType | user |
| permissionsRole | Editor |
And user "Brian" has a share "FOLDER" synced
And user "Admin" has changed the quota of the personal space of "Alice Hansen" space to "1"
And user "Admin" has changed the quota of space "Alice Hansen" to "1"
When user "Brian" uploads a file inside space "Shares" with content "new description" to "/FOLDER/textfile.txt" using the WebDAV API
Then the HTTP status code should be "507"
And as "Alice" file "/FOLDER/textfile.txt" should not exist
@@ -348,7 +348,7 @@ Feature: sharing
| shareType | group |
| permissionsRole | Editor |
And user "Brian" has a share "FOLDER" synced
And user "Admin" has changed the quota of the personal space of "Alice Hansen" space to "1"
And user "Admin" has changed the quota of space "Alice Hansen" to "1"
When user "Brian" uploads a file inside space "Shares" with content "new description" to "/FOLDER/textfile.txt" using the WebDAV API
Then the HTTP status code should be "507"
And as "Alice" file "/FOLDER/textfile.txt" should not exist
@@ -363,7 +363,7 @@ Feature: sharing
| shareType | user |
| permissionsRole | Uploader |
And user "Brian" has a share "FOLDER" synced
And user "Admin" has changed the quota of the personal space of "Alice Hansen" space to "1"
And user "Admin" has changed the quota of space "Alice Hansen" to "1"
When user "Brian" uploads a file inside space "Shares" with content "new description" to "/FOLDER/textfile.txt" using the WebDAV API
Then the HTTP status code should be "507"
And as "Alice" file "/FOLDER/textfile.txt" should not exist
@@ -380,7 +380,7 @@ Feature: sharing
| shareType | group |
| permissionsRole | Uploader |
And user "Brian" has a share "FOLDER" synced
And user "Admin" has changed the quota of the personal space of "Alice Hansen" space to "10"
And user "Admin" has changed the quota of space "Alice Hansen" to "10"
When user "Brian" uploads a file inside space "Shares" with content "new descriptionfgshsywhhh" to "/FOLDER/textfile.txt" using the WebDAV API
Then the HTTP status code should be "507"
And as "Alice" file "/FOLDER/textfile.txt" should not exist
@@ -167,7 +167,7 @@ Feature: sharing
Scenario Outline: check quota of owners parent directory of a shared file
Given using <dav-path-version> DAV path
And user "Brian" has been created with default attributes
And user "Admin" has changed the quota of the personal space of "Brian Murphy" space to "0"
And user "Admin" has changed the quota of space "Brian Murphy" to "0"
And user "Alice" has uploaded file "filesForUpload/lorem.txt" to "/myfile.txt"
And user "Alice" has sent the following resource share invitation:
| resource | myfile.txt |
@@ -204,7 +204,7 @@ Feature: sharing
| shareType | user |
| permissionsRole | Editor |
And user "Brian" has a share "FOLDER" synced
And user "Admin" has changed the quota of the personal space of "Alice Hansen" space to "1"
And user "Admin" has changed the quota of space "Alice Hansen" to "1"
When user "Brian" uploads file "filesForUpload/textfile.txt" to "/Shares/FOLDER/myfile.txt" using the WebDAV API
Then the HTTP status code should be "507"
And as "Alice" file "/FOLDER/myfile.txt" should not exist
@@ -228,7 +228,7 @@ Feature: sharing
| shareType | group |
| permissionsRole | Editor |
And user "Brian" has a share "FOLDER" synced
And user "Admin" has changed the quota of the personal space of "Alice Hansen" space to "1"
And user "Admin" has changed the quota of space "Alice Hansen" to "1"
When user "Brian" uploads file "filesForUpload/textfile.txt" to "/Shares/FOLDER/myfile.txt" using the WebDAV API
Then the HTTP status code should be "507"
And as "Alice" file "/FOLDER/myfile.txt" should not exist
@@ -250,7 +250,7 @@ Feature: sharing
| shareType | user |
| permissionsRole | Uploader |
And user "Brian" has a share "FOLDER" synced
And user "Admin" has changed the quota of the personal space of "Alice Hansen" space to "1"
And user "Admin" has changed the quota of space "Alice Hansen" to "1"
When user "Brian" uploads file "filesForUpload/textfile.txt" to "/Shares/FOLDER/myfile.txt" using the WebDAV API
Then the HTTP status code should be "507"
And as "Alice" file "/FOLDER/myfile.txt" should not exist
@@ -274,7 +274,7 @@ Feature: sharing
| shareType | group |
| permissionsRole | Uploader |
And user "Brian" has a share "FOLDER" synced
And user "Admin" has changed the quota of the personal space of "Alice Hansen" space to "1"
And user "Admin" has changed the quota of space "Alice Hansen" to "1"
When user "Brian" uploads file "filesForUpload/textfile.txt" to "/Shares/FOLDER/myfile.txt" using the WebDAV API
Then the HTTP status code should be "507"
And as "Alice" file "/FOLDER/myfile.txt" should not exist
@@ -86,7 +86,7 @@ Feature: upload to a public link share
| space | Personal |
| permissionsRole | edit |
| password | %public% |
And user "Admin" has changed the quota of the personal space of "Alice Hansen" space to "1"
And user "Admin" has changed the quota of space "Alice Hansen" to "1"
When the public uploads file "test.txt" with password "%public%" and content "test2" using the public WebDAV API
Then the HTTP status code should be "507"
@@ -98,7 +98,7 @@ Feature: upload to a public link share
| space | Personal |
| permissionsRole | createOnly |
| password | %public% |
And user "Admin" has changed the quota of the personal space of "Alice Hansen" space to "1"
And user "Admin" has changed the quota of space "Alice Hansen" to "1"
When the public uploads file "test.txt" with password "%public%" and content "test2" using the public WebDAV API
Then the HTTP status code should be "507"
@@ -36,8 +36,8 @@ Feature: get quota
Scenario Outline: retrieving folder quota of shared folder with quota when no quota is set for recipient
Given using <dav-path-version> DAV path
And user "Brian" has been created with default attributes
And user "Admin" has changed the quota of the personal space of "Alice Hansen" space to "0"
And user "Admin" has changed the quota of the personal space of "Brian Murphy" space to "10000"
And user "Admin" has changed the quota of space "Alice Hansen" to "0"
And user "Admin" has changed the quota of space "Brian Murphy" to "10000"
And user "Brian" has created folder "/testquota"
And user "Brian" has uploaded file "/testquota/Brian.txt" of size 1000 bytes
And user "Brian" has sent the following resource share invitation:
@@ -61,7 +61,7 @@ Feature: get quota
@issue-8197
Scenario Outline: retrieving folder quota when quota is set and a file was uploaded
Given using <dav-path-version> DAV path
And user "Admin" has changed the quota of the personal space of "Alice Hansen" space to "10000"
And user "Admin" has changed the quota of space "Alice Hansen" to "10000"
And user "Alice" has uploaded file "/prueba.txt" of size 1000 bytes
When user "Alice" gets the following properties of folder "/" using the WebDAV API
| propertyName |
@@ -78,7 +78,7 @@ Feature: get quota
Scenario Outline: retrieving folder quota when quota is set and a file was received
Given using <dav-path-version> DAV path
And user "Brian" has been created with default attributes
And user "Admin" has changed the quota of the personal space of "Brian Murphy" space to "10000"
And user "Admin" has changed the quota of space "Brian Murphy" to "10000"
And user "Alice" has uploaded file "/Alice.txt" of size 93 bytes
And user "Alice" has sent the following resource share invitation:
| resource | Alice.txt |