Markdown OKF-Schema Studio

Behaviour SwRS-MDOKFSTUDIO-LIFE-181

A requested line reaches the page once it is ready and wins over the restored reading place

When the side preview that follows the editor holds a requested line, the session SHALL post the previewRevealLine message to its page once the page is ready and only once, SHALL post it at once when the page is already ready, and the requested line SHALL win over the reading place the page restored for its document. The requested line SHALL belong to a document and an age, and the session SHALL post it only to a visible page that shows that document, and only within 5 seconds, and the line SHALL take the anchor except in the if-off-screen mode, where the editor leads.

Step 2 of path 2 in StRS-MDOKFSTUDIO-LIFE-023: from “The side preview places the line” to “The reader reads and edits on”.

Scenarios 2

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

nominalNominal case
Givena side preview that follows the editor, asked to mark line 42 of its document while its page is not ready
Whenthe page reports ready
ThenpreviewRevealLine with line 42 is posted once and becomes the anchor of the next render, so the line wins over the restored reading place
boundaryBoundary cases
InputOutcome
the page is already readythe line is posted at once
a line below 1, not an integer or not a numberthe message is refused by the router and nothing moves
a pending line older than 5 secondsit is dropped
a pending line takenit is taken once
the page shows another document than the line'sthe line waits for the page of its document, or is dropped by a switch to a third one
the page is hiddenthe line waits for the page to report ready again
the if-off-screen modethe line takes no anchor

Implemented in 2

Tested by 2