[QA] Extend tests coverage for preview
Description
Need to research about the query used in preview api and add tests coverage Preview image contains the query
scalingup:0
preview:1
a:-1
processor:fit
c:19ed023952b05d5006ae58541e2f8dc0
x:640
y:640
There is no test coverage for
- preview
- 0
- 1
- processor
- fit
- look for other types and add
- with different widths and heights when the processor is not set, check whether it is the same or not
- recheck whether this tests scenario is checking image strictly or not
Scenario Outline: it should update the preview content if the file content is updated (content with UTF chars)
- recheck whether this tests scenario is checking image strictly or not
- scalingup
- what
aquery denote
Some related discussions: https://github.com/owncloud/ocis/pull/6770#discussion_r1284301800
AFAIK, the server makes use of preview, x, y and processor query params only.
https://github.com/owncloud/ocis/blob/160f77c6ac7a777ec410be2c4add8824e99357f4/services/webdav/pkg/dav/requests/thumbnail.go#L72-L89
available options for processor
https://github.com/owncloud/ocis/blob/160f77c6ac7a777ec410be2c4add8824e99357f4/services/thumbnails/pkg/thumbnail/processor.go#L33-L42
@saw-jan @amrita-shrestha
As per my research so far, following are the findings:
- all
processortypes:- fit
- fill
- resize
- thumbnail
ais foraspect ratio- only
preview,x,yandprocessorquery params are REQUIRED in the url.Source: https://owncloud.dev/services/thumbnails/
- preview
- 0
- 1
Idk if we need test for this. because route to ?preview=0 doesn't exist. request to ?preview=0 means we are requesting a file not a preview. Maybe one scenario should be sufficient if we want to add test.
Source: https://owncloud.dev/services/thumbnails/
Also, I wonder if the docs related to query params are up-to-date
Scenario Outline: it should update the preview content if the file content is updated (content with UTF chars)
The above mentioned scenario is fine as of now. The preview is asserted with the binary string.
For preview = 0 case, i have written tests in PR: https://github.com/owncloud/ocis/pull/10093
I will be writing tests for available processors in next PR.
@amrita-shrestha @saw-jan
- preview
- 0
- 1
- processor
- fit
- look for other types and add
Closing this issue as: Test coverage for preview set to 0 is covered in PR: https://github.com/owncloud/ocis/pull/10093 and for tests with different processors, it is covered in this PR: https://github.com/owncloud/ocis/pull/10134
For scalingup param, see belwo. this probably means scalingup param is not supported https://github.com/owncloud/ocis/blob/8a522b921927199f799d6404f064ce543115d277/services/thumbnails/pkg/thumbnail/resolutions.go#L59