test plan:
0. upload the following types of files into a course, and
note their IDs:
a) document of some type (such as Word, PDF)
b) image (such as JPEG, PNG, GIF)
c) media (such as MP3, MP4, MOV)
1. enable canvadocs and google docs previews in account
settings.
2. test the document preview by hitting the following
in a new browser tab:
/courses/X/files/Y/file_preview
(where X is the course ID and Y is the file ID
of the document file)
- You should see a Canvadocs preview of the document.
- There should be no Canvas chrome in the window, just
the document preview.
3. disable canvadocs but leave google doc previews
enabled.
4. hit the URL from step 2.
- you should see a Google preview of the document
5. disable Google docs previews.
6. hit the URL from step 2.
- you should see a message indicating that no preview is
available, with a link to download the file.
7. hit the URL from step 2, but substitute the file ID
with the ID of an image instead of a document.
- you should see the image (and nothing else).
8. hit the URL from step 2, but substitute the file ID
with the ID of a media file.
- You should see a functioning media player (or a message
indicating the media has not been converted yet)
9. add a document to a module, and set a "must view"
completion requirement
10. use this endpoint to preview the document, and confirm
that the module completion requirement is fulfilled
fixes CNVS-15827
Change-Id: Id0ecaa7f003248cb3d8f163e48c3b16631ee59cf
Reviewed-on: https://gerrit.instructure.com/42438
Reviewed-by: Ryan Shaw <ryan@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Jahnavi Yetukuri <jyetukuri@instructure.com>
Product-Review: Cosme Salazar <cosme@instructure.com>