Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 30 additions & 3 deletions tests/acceptance/features/apiSearchContent/extractedProps.feature
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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
}
}
},
Expand Down Expand Up @@ -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
}
}
},
Expand Down Expand Up @@ -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
}
}
},
Expand Down
145 changes: 145 additions & 0 deletions tests/acceptance/features/apiSearchContent/metadataSerch.feature
Original file line number Diff line number Diff line change
@@ -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 '<metadata><operation><value>' 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 '<metadata><operation><value>' 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 '<metadata><operation><value>' 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 '<metadata><operation><value>' 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 '<metadata><operation><value>' 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 | = |

Binary file modified tests/acceptance/filesForUpload/testavatar.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading