Markdown OKF-Schema Studio

Behaviour SwRS-MDOKFSTUDIO-REVIEW-065

A comment carries the configured, Git or system author name

When the host stores a comment or a reply, the extension SHALL use as author the comments.authorName setting, else the Git user.name of the document repository, else the operating system user name, else Anonymous, with control characters replaced by spaces and the name trimmed and cut at 100 characters.

Another outcome at step 5 of path 1 in StRS-MDOKFSTUDIO-REVIEW-003, in the state “The comment has its anchor”.

Scenarios 6

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

nominalSetting wins
Giventhe setting authorName set to Ada Reviewer and a Git user.name of Bob
Whena comment is saved
Thenthe author is Ada Reviewer
boundaryOrder of the sources
InputOutcome
The setting is setThe author is the setting
The setting is empty and the Git user.name is BobThe author is Bob
The setting and the Git name are empty and the operating system user name is knownThe author is the operating system user name
An empty setting, no Git name and no system user nameThe author is Anonymous
boundaryThe name is cleaned and cut
InputOutcome
An author name holding a tab or a line breakEach control character becomes a space and the ends are trimmed
A name of 150 charactersThe name is cut at 100 characters
nominalThe Git user name is read through the built-in Git extension
Givena repository whose user.name is " Ada "
Whenthe host needs the Git user name of the document
Thenthe name is Ada
refusalNo Git user name
Givenno Git extension, no repository, no getConfig or an empty value
Whenthe host reads the Git user name
Thenno name is returned and the next source is used
boundaryThe comments.authorName setting
InputOutcome
The setting is set to Ada ReviewerThe author name is Ada Reviewer
The setting is set to a numberThe author name is the empty default
The setting as declared by the extensionIt is in the Comments category with type string, default empty and resource scope
The setting is set in a workspace folderThe folder value is read for the documents of that folder, over the user value

Implemented in 3

Tested by 6