Skip to content

Commit

Permalink
Refactoring example table scenerio (#6697)
Browse files Browse the repository at this point in the history
  • Loading branch information
S-Panta authored Jul 12, 2023
1 parent 51bc49d commit f2498e1
Show file tree
Hide file tree
Showing 62 changed files with 2,870 additions and 2,869 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ Feature: upload file
Scenario Outline: upload a file and check download content
Given using OCS API version "<ocs_api_version>"
And user "Alice" has been created with default attributes and without skeleton files
And using <dav_version> DAV path
And using <dav-path-version> DAV path
When user "Alice" uploads file with content "uploaded content" to "/upload.txt" using the WebDAV API
Then the content of file "/upload.txt" for user "Alice" should be "uploaded content"
Examples:
| ocs_api_version | dav_version |
| 1 | old |
| 1 | new |
| 2 | old |
| 2 | new |
| ocs_api_version | dav-path-version |
| 1 | old |
| 1 | new |
| 2 | old |
| 2 | new |
24 changes: 12 additions & 12 deletions tests/acceptance/features/apiContract/sharesReport.feature
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Feature: REPORT request to Shares space


Scenario Outline: check the REPORT response of the found folder
Given using <dav_version> DAV path
Given using <dav-path-version> DAV path
And user "Brian" has accepted share "/folderMain" offered by user "Alice"
When user "Brian" searches for "SubFolder1" using the WebDAV API
Then the HTTP status code should be "207"
Expand All @@ -29,13 +29,13 @@ Feature: REPORT request to Shares space
| d:getcontenttype | httpd/unix-directory |
| oc:permissions | S |
Examples:
| dav_version |
| old |
| new |
| dav-path-version |
| old |
| new |


Scenario Outline: check the REPORT response of the found file
Given using <dav_version> DAV path
Given using <dav-path-version> DAV path
And user "Brian" has accepted share "/folderMain" offered by user "Alice"
And user "Alice" has uploaded file with content "Not all those who wander are lost." to "/folderMain/SubFolder1/subFOLDER2/frodo.txt"
When user "Brian" searches for "frodo.txt" using the WebDAV API
Expand All @@ -50,17 +50,17 @@ Feature: REPORT request to Shares space
| oc:permissions | S |
| d:getcontentlength | 34 |
Examples:
| dav_version |
| old |
| new |
| dav-path-version |
| old |
| new |


Scenario Outline: search for the shared folder when share is not accepted
Given using <dav_version> DAV path
Given using <dav-path-version> DAV path
When user "Brian" searches for "folderMain" using the WebDAV API
Then the HTTP status code should be "207"
And the search result should contain "0" entries
Examples:
| dav_version |
| old |
| new |
| dav-path-version |
| old |
| new |
108 changes: 54 additions & 54 deletions tests/acceptance/features/coreApiFavorites/favorites.feature
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Feature: favorite

@issue-1263
Scenario Outline: favorite a folder
Given using <dav_version> DAV path
Given using <dav-path-version> DAV path
When user "Alice" favorites element "/FOLDER" using the WebDAV API
Then the HTTP status code should be "207"
And as user "Alice" folder "/FOLDER" should be favorited
Expand All @@ -28,18 +28,18 @@ Feature: favorite
Then the HTTP status code should be "207"
And the single response should contain a property "oc:favorite" with value "1"
Examples:
| dav_version |
| old |
| new |
| dav-path-version |
| old |
| new |

@skipOnRevaMaster
Examples:
| dav_version |
| spaces |
| dav-path-version |
| spaces |

@issue-1263
Scenario Outline: unfavorite a folder
Given using <dav_version> DAV path
Given using <dav-path-version> DAV path
And user "Alice" has favorited element "/FOLDER"
When user "Alice" unfavorites element "/FOLDER" using the WebDAV API
Then the HTTP status code should be "207"
Expand All @@ -50,18 +50,18 @@ Feature: favorite
Then the HTTP status code should be "207"
And the single response should contain a property "oc:favorite" with value "0"
Examples:
| dav_version |
| old |
| new |
| dav-path-version |
| old |
| new |

@skipOnRevaMaster
Examples:
| dav_version |
| spaces |
| dav-path-version |
| spaces |

@smokeTest @issue-1263
Scenario Outline: favorite a file
Given using <dav_version> DAV path
Given using <dav-path-version> DAV path
When user "Alice" favorites element "/textfile0.txt" using the WebDAV API
Then the HTTP status code should be "207"
And as user "Alice" file "/textfile0.txt" should be favorited
Expand All @@ -71,18 +71,18 @@ Feature: favorite
Then the HTTP status code should be "207"
And the single response should contain a property "oc:favorite" with value "1"
Examples:
| dav_version |
| old |
| new |
| dav-path-version |
| old |
| new |

@skipOnRevaMaster
Examples:
| dav_version |
| spaces |
| dav-path-version |
| spaces |

@smokeTest @issue-1263
Scenario Outline: unfavorite a file
Given using <dav_version> DAV path
Given using <dav-path-version> DAV path
And user "Alice" has favorited element "/textfile0.txt"
When user "Alice" unfavorites element "/textfile0.txt" using the WebDAV API
Then the HTTP status code should be "207"
Expand All @@ -93,18 +93,18 @@ Feature: favorite
Then the HTTP status code should be "207"
And the single response should contain a property "oc:favorite" with value "0"
Examples:
| dav_version |
| old |
| new |
| dav-path-version |
| old |
| new |

@skipOnRevaMaster
Examples:
| dav_version |
| spaces |
| dav-path-version |
| spaces |

@smokeTest
Scenario Outline: get favorited elements of a folder
Given using <dav_version> DAV path
Given using <dav-path-version> DAV path
When user "Alice" favorites element "/FOLDER" using the WebDAV API
And user "Alice" favorites element "/textfile0.txt" using the WebDAV API
And user "Alice" favorites element "/textfile1.txt" using the WebDAV API
Expand All @@ -114,18 +114,18 @@ Feature: favorite
| /textfile0.txt |
| /textfile1.txt |
Examples:
| dav_version |
| old |
| new |
| dav-path-version |
| old |
| new |

@skipOnRevaMaster
Examples:
| dav_version |
| spaces |
| dav-path-version |
| spaces |


Scenario Outline: get favorited elements of a subfolder
Given using <dav_version> DAV path
Given using <dav-path-version> DAV path
And user "Alice" has created folder "/subfolder"
And user "Alice" has uploaded file with content "some data" to "/subfolder/textfile0.txt"
And user "Alice" has uploaded file with content "some data" to "/subfolder/textfile1.txt"
Expand All @@ -141,18 +141,18 @@ Feature: favorite
And user "Alice" should not have favorited the following elements
| /subfolder/textfile1.txt |
Examples:
| dav_version |
| old |
| new |
| dav-path-version |
| old |
| new |

@skipOnRevaMaster
Examples:
| dav_version |
| spaces |
| dav-path-version |
| spaces |


Scenario Outline: get favorited elements and limit count of entries
Given using <dav_version> DAV path
Given using <dav-path-version> DAV path
And user "Alice" has favorited element "/textfile0.txt"
And user "Alice" has favorited element "/textfile1.txt"
And user "Alice" has favorited element "/textfile2.txt"
Expand All @@ -166,18 +166,18 @@ Feature: favorite
| /textfile3.txt |
| /textfile4.txt |
Examples:
| dav_version |
| old |
| new |
| dav-path-version |
| old |
| new |

@skipOnRevaMaster
Examples:
| dav_version |
| spaces |
| dav-path-version |
| spaces |


Scenario Outline: get favorited elements paginated in subfolder
Given using <dav_version> DAV path
Given using <dav-path-version> DAV path
And user "Alice" has created folder "/subfolder"
And user "Alice" has copied file "/textfile0.txt" to "/subfolder/textfile0.txt"
And user "Alice" has copied file "/textfile0.txt" to "/subfolder/textfile1.txt"
Expand All @@ -199,30 +199,30 @@ Feature: favorite
| /subfolder/textfile3.txt |
| /subfolder/textfile4.txt |
Examples:
| dav_version |
| old |
| new |
| dav-path-version |
| old |
| new |

@skipOnRevaMaster
Examples:
| dav_version |
| spaces |
| dav-path-version |
| spaces |


Scenario Outline: favoriting a folder does not change the favorite state of elements inside the folder
Given using <dav_version> DAV path
Given using <dav-path-version> DAV path
When user "Alice" favorites element "/PARENT/parent.txt" using the WebDAV API
And user "Alice" favorites element "/PARENT" using the WebDAV API
Then the HTTP status code should be "207"
And user "Alice" should have favorited the following elements
| /PARENT |
| /PARENT/parent.txt |
Examples:
| dav_version |
| old |
| new |
| dav-path-version |
| old |
| new |

@skipOnRevaMaster
Examples:
| dav_version |
| spaces |
| dav-path-version |
| spaces |
Original file line number Diff line number Diff line change
Expand Up @@ -11,21 +11,21 @@ Feature: favorite


Scenario Outline: favorite a file inside of a received share
Given using <dav_version> DAV path
Given using <dav-path-version> DAV path
And user "Brian" has been created with default attributes and without skeleton files
And user "Alice" has shared folder "/PARENT" with user "Brian"
And user "Brian" has accepted share "/PARENT" offered by user "Alice"
When user "Brian" favorites element "/Shares/PARENT/parent.txt" using the WebDAV API
Then the HTTP status code should be "207"
And as user "Brian" file "/Shares/PARENT/parent.txt" should be favorited
Examples:
| dav_version |
| old |
| new |
| dav-path-version |
| old |
| new |


Scenario Outline: favorite a folder inside of a received share
Given using <dav_version> DAV path
Given using <dav-path-version> DAV path
And user "Brian" has been created with default attributes and without skeleton files
And user "Alice" has created folder "/PARENT/sub-folder"
And user "Alice" has shared folder "/PARENT" with user "Brian"
Expand All @@ -34,27 +34,27 @@ Feature: favorite
Then the HTTP status code should be "207"
And as user "Brian" folder "/Shares/PARENT/sub-folder" should be favorited
Examples:
| dav_version |
| old |
| new |
| dav-path-version |
| old |
| new |


Scenario Outline: favorite a received share itself
Given using <dav_version> DAV path
Given using <dav-path-version> DAV path
And user "Brian" has been created with default attributes and without skeleton files
And user "Alice" has shared folder "/PARENT" with user "Brian"
And user "Brian" has accepted share "/PARENT" offered by user "Alice"
When user "Brian" favorites element "/Shares/PARENT" using the WebDAV API
Then the HTTP status code should be "207"
And as user "Brian" folder "/Shares/PARENT" should be favorited
Examples:
| dav_version |
| old |
| new |
| dav-path-version |
| old |
| new |


Scenario Outline: moving a favorite file out of a share keeps favorite state
Given using <dav_version> DAV path
Given using <dav-path-version> DAV path
And user "Brian" has been created with default attributes and without skeleton files
And user "Alice" has shared folder "/PARENT" with user "Brian"
And user "Brian" has accepted share "/PARENT" offered by user "Alice"
Expand All @@ -64,13 +64,13 @@ Feature: favorite
And as "Brian" file "/taken_out.txt" should exist
And as user "Brian" file "/taken_out.txt" should be favorited
Examples:
| dav_version |
| old |
| new |
| dav-path-version |
| old |
| new |


Scenario Outline: sharee file favorite state should not change the favorite state of sharer
Given using <dav_version> DAV path
Given using <dav-path-version> DAV path
And user "Brian" has been created with default attributes and without skeleton files
And user "Alice" has shared file "/PARENT/parent.txt" with user "Brian"
And user "Brian" has accepted share "/parent.txt" offered by user "Alice"
Expand All @@ -79,6 +79,6 @@ Feature: favorite
And as user "Brian" file "/Shares/parent.txt" should be favorited
And as user "Alice" file "/PARENT/parent.txt" should not be favorited
Examples:
| dav_version |
| old |
| new |
| dav-path-version |
| old |
| new |
Loading

0 comments on commit f2498e1

Please sign in to comment.