Markdown OKF-Schema Studio

Behaviour SwRS-MDOKFSTUDIO-REVIEW-086

Resolve, Reopen and a confirmed Delete wait for the host, one action at a time

When a reader presses Resolve or Reopen in a thread popover, or presses Delete and confirms it in the popover, the extension SHALL send the new flag or the delete to the host, wait for its answer, change the highlight or remove the thread only when the thread is posted again, and run one such action at a time.

Step 3 of path 2 in StRS-MDOKFSTUDIO-REVIEW-003: from “The thread holds the reply” to “The thread is resolved”.

Scenarios 4

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

nominalResolve and Reopen
Givenan open thread
Whenthe reader presses Resolve
Thena resolve message with true is sent and the highlight style changes after the thread is posted again, not before
for a resolved thread the button reads Reopen, and pressing it sends a resolve message with false
nominalDelete asks inside the popover
Givenan open popover
Whenthe reader presses Delete
Thenthe popover asks "Delete thread?" with Yes and No buttons, and no window.confirm call is made
No removes the question and sends nothing
Yes sends one delete message and the buttons wait for the host
refusalA refused or unanswered resolve or delete
InputOutcome
a resolve waiting for the host, answered ok false with a reasonan alert shows the reason as text (cut at 500 characters) and Resolve works again
a resolve or a delete answered ok false without a reasonthe alert reads "The change was not saved."
a resolve or a delete waiting for the host, no answer in 15 secondsthe alert reads "No answer from the editor. Nothing changed here: try again." and the reader can retry
a delete answered ok false with a reasonthe thread stays, the reason is shown and the question is replaced by the Resolve and Delete buttons
a delete with no answer in 15 secondsthe question is replaced by the buttons and the alert reads "No answer from the editor. Nothing changed here: try again."
boundaryOne action at a time
InputOutcome
a reply waiting for the hostResolve and Delete are disabled
a resolve waiting for the hostReply is disabled
a delete waiting for the hostthe other actions of the popover of that thread are disabled

Implemented in 1

Tested by 1