Markdown OKF-Schema Studio

Behaviour SwRS-MDOKFSTUDIO-DIAG-046

PlantUML includes are read through the extension and refusals reach the diagram

When a built-in diagram contains !include, !include_many, !include_once or !includesub of a local file, the page SHALL ask the extension host for the file with a previewPlantUmlInclude message, draw the diagram with the text returned, make no network request, and give the engine the reason exactly once when the host refuses, does not answer within 10 seconds or sends an answer that is not well formed.

Step 1 of path 1 in StRS-MDOKFSTUDIO-DIAG-009: from “A diagram includes a local file” to “The assembled picture is drawn”.

Scenarios 5

The situations the tests check; open one to read it.

nominalNested include and diagram file include
Givena diagram that includes a file which includes another file, and a {uml} diagram whose file includes a style file
Whenthe diagram is drawn
Thenthe host is asked for the first file with from null and for the nested file with from equal to the id of the first, and the picture shows the nested content
for the {uml} diagram the style file is asked with from equal to the id of the diagram file
no network request is made
boundaryThe from field of the request
InputOutcome
a request with a string path and from set to a numberthe host message carries from null
a request with from equal to an absolute paththe host message carries that path
a request for the diagram's own includefrom is null
refusalThe host refuses an include
InputOutcome
a host answer ok false with a reasonthe engine receives that reason once
a second answer for the same requestit is ignored and the engine still received the reason once
refusalSilence and malformed answers
InputOutcome
no answer from the host for 10 secondsthe engine receives The editor did not answer. Try again.
an ok answer without a textthe engine receives the file name followed by could not be read
refusalMalformed include requests are ignored
InputOutcome
a request whose path is not a stringno host message is sent and the request is not marked accepted
a file request dispatched without a respond functionit is ignored
a file request dispatched without a request objectit is ignored

Implemented in 4

Tested by 3

Known limits (1)

Replaces

SwRS-MDOKFSTUDIO-DIAG-048A host refusal of an include reaches the diagram as its reason superseded superseded by SwRS-MDOKFSTUDIO-DIAG-046 Markdown file
SwRS-MDOKFSTUDIO-DIAG-049Malformed include requests are ignored superseded superseded by SwRS-MDOKFSTUDIO-DIAG-046 Markdown file
SwRS-MDOKFSTUDIO-DIAG-113Include silence and malformed answers reach the diagram as reasons superseded superseded by SwRS-MDOKFSTUDIO-DIAG-046 Markdown file
SwRS-MDOKFSTUDIO-DIAG-114A non-string from is sent as null superseded superseded by SwRS-MDOKFSTUDIO-DIAG-046 Markdown file