Behaviour SwRS-MDOKFSTUDIO-TRUST-091
A restricted-reads preview shows the images of its folders
When a preview with restricted reads shows an image file, the extension SHALL load it from the folder of the document, and from the workspace folder unless that folder is broad, granting the webview those folders as local resource roots.
Part of StRS-MDOKFSTUDIO-TRUST-004, outside the paths drawn on its map.
Scenarios 2
The situations the tests check; open one to read it.
nominalImages of the document folder and of the workspace folder
Givena preview with restricted reads of a document in a subfolder of a workspace folder that is not broad, whose images have spaces in their names (written with %20 or between angle brackets), lie in a subfolder of the document folder, or lie in the workspace folder outside the document folder
Whenthe document shows them as images (png, jpg, jpeg, gif, webp or svg)
Thenevery image loads, and the webview has the folder of the document and the workspace folder as local resource roots
boundaryImages in a broad folder
Givena preview with restricted reads whose document is in the home folder (or in a folder that contains it, or in a file-system root), and a workspace folder that may be the home folder too
Whenthe document shows an image next to it or below its folder, and an image of the workspace folder outside the document folder
Thenthe image of the document folder (never one below a dot-segment) loads and the folder of the document is a local resource root; the image of the broad workspace folder is refused with the code restricted-root, and that folder is no local resource root