Skip to content

Commit

Permalink
Merge pull request #202 from owncloud/refactor-feature-files
Browse files Browse the repository at this point in the history
[full-ci] [tests-only] Refactored inter scenarios space
  • Loading branch information
SagarGi authored Nov 9, 2022
2 parents ddbc6d1 + 6e8fe9e commit 63dc0db
Show file tree
Hide file tree
Showing 7 changed files with 38 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
@api @skipOnOcV10.6 @skipOnOcV10.7
Feature: expire a share


Scenario: set a share to expire yesterday and verify that it is not accessible
Given these users have been created with default attributes and without skeleton files:
| username |
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
@api
Feature: add and delete locks on files


Scenario Outline: enable lock provisioning
Given using OCS API version "<ocs-api-version>"
And locking has been enabled
Expand All @@ -13,6 +14,7 @@ Feature: add and delete locks on files
| 1 | 100 | 200 | OK |
| 2 | 200 | 200 | OK |


Scenario Outline: disable lock provisioning
Given using OCS API version "<ocs-api-version>"
And locking has been disabled
Expand All @@ -25,6 +27,7 @@ Feature: add and delete locks on files
| 1 | 501 | 200 | OK |
| 2 | 501 | 501 | Not Implemented |


Scenario Outline: admin locks a file for a user
Given using OCS API version "<ocs-api-version>"
And locking has been enabled
Expand All @@ -39,6 +42,7 @@ Feature: add and delete locks on files
| 1 | 100 | 200 | OK |
| 2 | 200 | 200 | OK |


Scenario Outline: admin deletes lock from a file for a user
Given using OCS API version "<ocs-api-version>"
And locking has been enabled
Expand All @@ -54,6 +58,7 @@ Feature: add and delete locks on files
| 1 | 423 | 200 | OK |
| 2 | 423 | 423 | Locked |


Scenario Outline: admin releases all locks of one type
Given using OCS API version "<ocs-api-version>"
And locking has been enabled
Expand Down Expand Up @@ -82,6 +87,7 @@ Feature: add and delete locks on files
| 1 | 423 | 200 | OK | 100 | 200 | OK |
| 2 | 423 | 423 | Locked | 200 | 200 | OK |


Scenario Outline: admin releases all locks
Given using OCS API version "<ocs-api-version>"
And locking has been enabled
Expand Down
4 changes: 4 additions & 0 deletions tests/acceptance/features/apiTestingApp/loginDate.feature
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ Feature: get and set the last login date
| username |
| Alice |


Scenario Outline: Get the last login date of a user
Given using OCS API version "<ocs-api-version>"
When the administrator gets the last login date for user "Alice" using the testing API
Expand All @@ -17,6 +18,7 @@ Feature: get and set the last login date
| 1 | 200 | 200 |
| 2 | 200 | 200 |


Scenario Outline: Set the last login date of a user
Given using OCS API version "<ocs-api-version>"
When the administrator sets the last login date for user "Alice" to "7" days ago using the testing API
Expand All @@ -29,6 +31,7 @@ Feature: get and set the last login date
| 1 | 200 | 200 |
| 2 | 200 | 200 |


Scenario Outline: Try to get the last login for a non-existent user
Given using OCS API version "<ocs-api-version>"
When the administrator gets the last login date for user "Carol" using the testing API
Expand All @@ -40,6 +43,7 @@ Feature: get and set the last login date
| 1 | 404 | 200 |
| 2 | 404 | 404 |


Scenario Outline: Try to set invalid last login date
Given using OCS API version "<ocs-api-version>"
When the administrator sets the last login date for user "Alice" to "<number_of_days>" days ago using the testing API
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ Feature: Test notifications feature of testing app
| 1 |
| 2 |


Scenario Outline: Testing app can delete notifications
Given using OCS API version "<ocs-api-version>"
And the administrator has created a notification with the following details using the testing API
Expand Down
6 changes: 6 additions & 0 deletions tests/acceptance/features/apiTestingApp/serverFiles.feature
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
@api
Feature: Test ServerFiles feature of testing app


Scenario Outline: Testing app can create file in server root
Given using OCS API version "<ocs-api-version>"
When the administrator creates file "data/loremfile.txt" with content "lorem ipsum" using the testing API
Expand All @@ -10,6 +11,7 @@ Feature: Test ServerFiles feature of testing app
| 1 |
| 2 |


Scenario Outline: Testing app can delete file in server root
Given using OCS API version "<ocs-api-version>"
And the administrator has created file "data/loremfile.txt" with content "lorem ipsum"
Expand All @@ -20,6 +22,7 @@ Feature: Test ServerFiles feature of testing app
| 1 |
| 2 |


Scenario Outline: Testing app can create directory in server root
Given using OCS API version "<ocs-api-version>"
When the administrator creates directory "data/lorem-dir" in server root using the testing API
Expand All @@ -30,6 +33,7 @@ Feature: Test ServerFiles feature of testing app
| 1 |
| 2 |


Scenario Outline: Testing app can delete directory in server root
Given using OCS API version "<ocs-api-version>"
When the administrator creates directory "data/lorem-dir" in server root using the testing API
Expand All @@ -41,6 +45,7 @@ Feature: Test ServerFiles feature of testing app
| 1 |
| 2 |


Scenario Outline: Testing app can move a directory in server root
Given using OCS API version "<ocs-api-version>"
When the administrator creates directory "data/lorem-dir" in server root using the testing API
Expand All @@ -53,6 +58,7 @@ Feature: Test ServerFiles feature of testing app
| 1 |
| 2 |


Scenario Outline: Testing app can rename a file in server root
Given using OCS API version "<ocs-api-version>"
And the administrator creates file "loremfile.txt" with content "lorem ipsum" using the testing API
Expand Down
15 changes: 15 additions & 0 deletions tests/acceptance/features/apiTestingApp/testing.feature
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
@api
Feature: Testing the testing app


Scenario Outline: Testing app returns the location of server
Given using OCS API version "<ocs-api-version>"
When the administrator requests the system-info using the testing API
Expand All @@ -13,6 +14,7 @@ Feature: Testing the testing app
| 1 | 100 | 200 | OK |
| 2 | 200 | 200 | OK |


Scenario Outline: Testing app returns the logfile with given number of lines
Given using OCS API version "<ocs-api-version>"
When the administrator requests the logfile with <line-number> lines using the testing API
Expand All @@ -25,6 +27,7 @@ Feature: Testing the testing app
| 1 | 1 | 100 | 200 | OK |
| 2 | 2 | 200 | 200 | OK |


Scenario Outline: Testing app can delete the logfile
Given using OCS API version "<ocs-api-version>"
Then log entries should decrease when the administrator clears the logfile
Expand All @@ -33,6 +36,7 @@ Feature: Testing the testing app
| 1 |
| 2 |


Scenario Outline: Admin adds and deletes config key in a app
Given using OCS API version "<ocs-api-version>"
When the administrator adds a config key "con" with value "conkey" in app "core" using the testing API
Expand All @@ -51,6 +55,7 @@ Feature: Testing the testing app
| 1 | 100 | 200 | OK |
| 2 | 200 | 200 | OK |


Scenario Outline: Admin adds multiple config keys
Given using OCS API version "<ocs-api-version>"
When the administrator adds these config keys using the testing API
Expand All @@ -69,6 +74,7 @@ Feature: Testing the testing app
| 1 | 100 | 200 | OK |
| 2 | 200 | 200 | OK |


Scenario Outline: Admin deletes multiple config keys
Given using OCS API version "<ocs-api-version>"
And the administrator has added these config keys
Expand All @@ -91,6 +97,7 @@ Feature: Testing the testing app
| 1 | 100 | 200 | OK |
| 2 | 200 | 200 | OK |


Scenario Outline: Admin adds and deletes a system config key of various types
Given using OCS API version "<ocs-api-version>"
When the administrator adds a system config key "testing42" with value "<value>" and type "<type>" using the testing API
Expand All @@ -110,6 +117,7 @@ Feature: Testing the testing app
| 987 | integer | 1 | 100 | 200 | OK |
| 987 | integer | 2 | 200 | 200 | OK |


Scenario Outline: Testing app returns details about the app
Given using OCS API version "<ocs-api-version>"
Given app "comments" has been enabled
Expand All @@ -125,6 +133,7 @@ Feature: Testing the testing app
| 1 | 100 | 200 | OK |
| 2 | 200 | 200 | OK |


Scenario Outline: Testing app can change the max file id length
Given using OCS API version "<ocs-api-version>"
When the administrator increases the max file id size beyond 32 bits using the testing API
Expand All @@ -136,6 +145,7 @@ Feature: Testing the testing app
| 1 |
| 2 |


Scenario Outline: Testing app can run occ commands
Given using OCS API version "<ocs-api-version>"
And app "comments" has been enabled
Expand All @@ -154,6 +164,7 @@ Feature: Testing the testing app
| 1 | 100 | 200 | OK |
| 2 | 200 | 200 | OK |


Scenario Outline: Testing app can run occ commands in bulk
Given using OCS API version "<ocs-api-version>"
And app "comments" has been enabled
Expand All @@ -172,6 +183,7 @@ Feature: Testing the testing app
| 1 | 100 | 200 | OK |
| 2 | 200 | 200 | OK |


Scenario Outline: Testing app returns all the extensions of a mime type
Given using OCS API version "<ocs-api-version>"
When the administrator gets all the extensions of mime-type "audio" using the testing API
Expand All @@ -184,6 +196,7 @@ Feature: Testing the testing app
| 1 | 100 | 200 | OK |
| 2 | 200 | 200 | OK |


Scenario Outline: Testing app returns all the extensions of a mime type with subtype
Given using OCS API version "<ocs-api-version>"
When the administrator gets all the extensions of mime-type "audio/ogg" using the testing API
Expand All @@ -196,6 +209,7 @@ Feature: Testing the testing app
| 1 | 100 | 200 | OK |
| 2 | 200 | 200 | OK |


Scenario Outline: Testing app returns success if the given apache module is loaded
Given using OCS API version "<ocs-api-version>"
When the administrator checks if "core" apache module is installed using the testing API
Expand All @@ -207,6 +221,7 @@ Feature: Testing the testing app
| 1 | 100 | 200 | OK |
| 2 | 200 | 200 | OK |


Scenario Outline: Testing app returns failure if the given apache module is not loaded
Given using OCS API version "<ocs-api-version>"
When the administrator checks if "random_module_123" apache module is installed using the testing API
Expand Down
5 changes: 5 additions & 0 deletions tests/acceptance/features/apiTestingApp/trustedServer.feature
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
@api @federation-app-required
Feature: Test trusted server feature of testing app


Scenario Outline: Add new trusted server using the testing api
Given using OCS API version "<ocs-api-version>"
When the administrator adds url "http://new-oc.com" as trusted server using the testing API
Expand All @@ -13,6 +14,7 @@ Feature: Test trusted server feature of testing app
| 1 | 201 | 201 | Created |
| 2 | 201 | 201 | Created |


Scenario Outline: Add already existing trusted server using the testing api
Given using OCS API version "<ocs-api-version>"
And the administrator has added url "http://aafnobadal.com" as trusted server
Expand All @@ -26,6 +28,7 @@ Feature: Test trusted server feature of testing app
| 1 | 200 | 200 | OK |
| 2 | 200 | 200 | OK |


Scenario Outline: Add multiple trusted servers using the testing api
Given using OCS API version "<ocs-api-version>"
When the administrator adds url "http://new-oc.com" as trusted server using the testing API
Expand All @@ -41,6 +44,7 @@ Feature: Test trusted server feature of testing app
| 1 |
| 2 |


Scenario Outline: Delete trusted servers using the testing api
Given using OCS API version "<ocs-api-version>"
And the administrator has added url "http://new-oc.com" as trusted server
Expand All @@ -52,6 +56,7 @@ Feature: Test trusted server feature of testing app
| 1 | 204 |
| 2 | 204 |


Scenario Outline: Delete all trusted servers using the testing api
Given using OCS API version "<ocs-api-version>"
And the administrator has added url "http://new-oc.com" as trusted server
Expand Down

0 comments on commit 63dc0db

Please sign in to comment.