diff --git a/tests/acceptance/features/apiSearchContent/extractedProps.feature b/tests/acceptance/features/apiSearchContent/extractedProps.feature index db36bf33be6..a241612442e 100644 --- a/tests/acceptance/features/apiSearchContent/extractedProps.feature +++ b/tests/acceptance/features/apiSearchContent/extractedProps.feature @@ -42,6 +42,12 @@ Feature: propfind extracted props | oc:photo/oc:camera-model | COOLPIX P6000 | | oc:photo/oc:f-number | 4.5 | | oc:photo/oc:focal-length | 6 | + | oc:photo/oc:iso | 64 | + | oc:photo/oc:orientation | 1 | + | oc:photo/oc:exposure-numerator | 1 | + | oc:photo/oc:exposure-denominator | 178 | + | oc:photo/oc:taken-date-time | 2008-10-22T16:29:49Z | + | oc:location/oc:altitude | 100 | Scenario: check extracted properties of a file from personal space @@ -75,6 +81,12 @@ Feature: propfind extracted props | oc:photo/oc:camera-model | COOLPIX P6000 | | oc:photo/oc:f-number | 4.5 | | oc:photo/oc:focal-length | 6 | + | oc:photo/oc:iso | 64 | + | oc:photo/oc:orientation | 1 | + | oc:photo/oc:exposure-numerator | 1 | + | oc:photo/oc:exposure-denominator | 178 | + | oc:photo/oc:taken-date-time | 2008-10-22T16:29:49Z | + | oc:location/oc:altitude | 100 | Scenario: check extracted properties of a file by sharee from shares space @@ -125,6 +137,12 @@ Feature: propfind extracted props | oc:photo/oc:camera-model | COOLPIX P6000 | | oc:photo/oc:f-number | 4.5 | | oc:photo/oc:focal-length | 6 | + | oc:photo/oc:iso | 64 | + | oc:photo/oc:orientation | 1 | + | oc:photo/oc:exposure-numerator | 1 | + | oc:photo/oc:exposure-denominator | 178 | + | oc:photo/oc:taken-date-time | 2008-10-22T16:29:49Z | + | oc:location/oc:altitude | 100 | Scenario: GET extracted properties of an audio file (Personal space) @@ -203,13 +221,16 @@ Feature: propfind extracted props }, "location": { "type": "object", - "required": [ "latitude", "longitude" ], + "required": [ "latitude", "longitude", "altitude" ], "properties": { "latitude": { "const": 43.467157 }, "longitude": { "const": 11.885395 + }, + "altitude": { + "const": 100 } } }, @@ -337,13 +358,16 @@ Feature: propfind extracted props }, "location": { "type": "object", - "required": [ "latitude", "longitude" ], + "required": [ "latitude", "longitude". "altitude" ], "properties": { "latitude": { "const": 43.467157 }, "longitude": { "const": 11.885395 + }, + "altitude": { + "const": 100 } } }, @@ -483,13 +507,16 @@ Feature: propfind extracted props }, "location": { "type": "object", - "required": [ "latitude", "longitude" ], + "required": [ "latitude", "longitude", "altitude" ], "properties": { "latitude": { "const": 43.467157 }, "longitude": { "const": 11.885395 + }, + "altitude": { + "const": 100 } } }, diff --git a/tests/acceptance/features/apiSearchContent/metadataSerch.feature b/tests/acceptance/features/apiSearchContent/metadataSerch.feature new file mode 100644 index 00000000000..074ba8ed3a4 --- /dev/null +++ b/tests/acceptance/features/apiSearchContent/metadataSerch.feature @@ -0,0 +1,145 @@ +Feature: metadata type search + As a user + I want to search files by metadata + So that I can find the files with specific metadata + + Background: + Given these users have been created with default attributes: + | username | + | Alice | + | Brian | + And using spaces DAV path + + + Scenario: search for files using metadata + And user "Alice" has uploaded file "filesForUpload/testavatar.jpg" to "/testavatar.jpg" + And user "Alice" has uploaded file "filesForUpload/testavatar.png" to "/testavatar.png" + When user "Alice" searches for '' using the WebDAV API + Then the HTTP status code should be "207" + And the search result should contain "1" entries + And the search result of user "Alice" should contain these entries: + | testavatar.jpg | + Examples: + | metadata | value | operation | + | photo.cameraMake | NIKON | = | + | photo.cameraModel | "COOLPIX P6000" | = | + | photo.exposureDenominator | 178 | = | + | photo.exposureNumerator | 1 | = | + | photo.fNumber | 4.5 | = | + | photo.focalLength | 6 | = | + | photo.orientation | 1 | = | + | photo.takenDateTime | 2008-10-22 | = | + | location.latitude | 43.467157 | = | + | location.longitude | 11.885395 | = | + | location.altitude | 100 | = | + + + Scenario Outline: search for files inside sub folders using media type + Given user "Alice" has created folder "uploadFolder" + And user "Alice" has uploaded file "filesForUpload/testavatar.jpg" to "uploadFolder/testavatar.jpg" + And user "Alice" has uploaded file "filesForUpload/testavatar.png" to "uploadFolder/testavatar.png" + When user "Alice" searches for '' using the WebDAV API + Then the HTTP status code should be "207" + And the search result should contain "1" entries + And the search result of user "Alice" should contain these entries: + | testavatar.jpg | + Examples: + | metadata | value | operation | + | photo.cameraMake | NIKON | = | + | photo.cameraModel | "COOLPIX P6000" | = | + | photo.exposureDenominator | 178 | = | + | photo.exposureNumerator | 1 | = | + | photo.fNumber | 4.5 | = | + | photo.focalLength | 6 | = | + | photo.orientation | 1 | = | + | photo.takenDateTime | 2008-10-22 | = | + | location.latitude | 43.467157 | = | + | location.longitude | 11.885395 | = | + | location.altitude | 100 | = | + + + Scenario Outline: search for file inside project space using media type + Given the administrator has assigned the role "Space Admin" to user "Alice" using the Graph API + And user "Alice" has created a space "project101" with the default quota using the Graph API + And user "Alice" has uploaded a file "filesForUpload/testavatar.jpg" to "/testavatar.jpg" in space "project101" + And user "Alice" has uploaded a file "filesForUpload/testavatar.png" to "/testavatar.png" in space "project101" + When user "Alice" searches for '' using the WebDAV API + Then the HTTP status code should be "207" + And the search result should contain "1" entries + And the search result of user "Alice" should contain these entries: + | testavatar.jpg | + Examples: + | metadata | value | operation | + | photo.cameraMake | NIKON | = | + | photo.cameraModel | "COOLPIX P6000" | = | + | photo.exposureDenominator | 178 | = | + | photo.exposureNumerator | 1 | = | + | photo.fNumber | 4.5 | = | + | photo.focalLength | 6 | = | + | photo.orientation | 1 | = | + | photo.takenDateTime | 2008-10-22 | = | + | location.latitude | 43.467157 | = | + | location.longitude | 11.885395 | = | + | location.altitude | 100 | = | + + + Scenario Outline: sharee searches for shared files using media type + Given user "Alice" has created folder "uploadFolder" + And user "Alice" has uploaded file "filesForUpload/testavatar.jpg" to "uploadFolder/testavatar.jpg" + And user "Alice" has uploaded file "filesForUpload/testavatar.png" to "uploadFolder/testavatar.png" + And user "Alice" has sent the following resource share invitation: + | resource | uploadFolder | + | space | Personal | + | sharee | Brian | + | shareType | user | + | permissionsRole | Viewer | + And user "Brian" has a share "uploadFolder" synced + When user "Alice" searches for '' using the WebDAV API + Then the HTTP status code should be "207" + And the search result should contain "1" entries + And the search result of user "Alice" should contain these entries: + | testavatar.jpg | + Examples: + | metadata | value | operation | + | photo.cameraMake | NIKON | = | + | photo.cameraModel | "COOLPIX P6000" | = | + | photo.exposureDenominator | 178 | = | + | photo.exposureNumerator | 1 | = | + | photo.fNumber | 4.5 | = | + | photo.focalLength | 6 | = | + | photo.orientation | 1 | = | + | photo.takenDateTime | 2008-10-22 | = | + | location.latitude | 43.467157 | = | + | location.longitude | 11.885395 | = | + | location.altitude | 100 | = | + + + Scenario Outline: space viewer searches for files using mediatype filter + Given the administrator has assigned the role "Space Admin" to user "Alice" using the Graph API + And user "Alice" has created a space "project101" with the default quota using the Graph API + And user "Alice" has uploaded a file "filesForUpload/testavatar.jpg" to "/testavatar.jpg" in space "project101" + And user "Alice" has uploaded a file "filesForUpload/testavatar.png" to "/testavatar.png" in space "project101" + And user "Alice" has sent the following space share invitation: + | space | project101 | + | sharee | Brian | + | shareType | user | + | permissionsRole | Space Viewer | + When user "Brian" searches for '' using the WebDAV API + Then the HTTP status code should be "207" + And the search result should contain "1" entries + And the search result of user "Alice" should contain these entries: + | testavatar.jpg | + Examples: + | metadata | value | operation | + | photo.cameraMake | NIKON | = | + | photo.cameraModel | "COOLPIX P6000" | = | + | photo.exposureDenominator | 178 | = | + | photo.exposureNumerator | 1 | = | + | photo.fNumber | 4.5 | = | + | photo.focalLength | 6 | = | + | photo.orientation | 1 | = | + | photo.takenDateTime | 2008-10-22 | = | + | location.latitude | 43.467157 | = | + | location.longitude | 11.885395 | = | + | location.altitude | 100 | = | + diff --git a/tests/acceptance/filesForUpload/testavatar.jpg b/tests/acceptance/filesForUpload/testavatar.jpg index eae213b8272..09b85472480 100644 Binary files a/tests/acceptance/filesForUpload/testavatar.jpg and b/tests/acceptance/filesForUpload/testavatar.jpg differ