I understand that user interaction with GUI can't be tested automatically but some things can be tested using low-level notebook programming functions. Are there any guidelines or limitations of using them in the Mathematica testing framework?
For example, the following code checks if a bug described in InputAliases and SelectionPlaceholder issue in V10 is still present.
SetOptions[
EvaluationNotebook[],
InputAliases -> {"[" ->
RowBox[{"\[LeftDoubleBracket]", "\[SelectionPlaceholder]",
"\[RightDoubleBracket]"}]}
];
RawBoxes@"\\[AliasDelimiter]["
oCell = NextCell[];
SelectionMove[oCell , After, CellContents];
NotebookWrite[EvaluationNotebook[], "\\[AliasDelimiter]"]
( NotebookDelete[oCell]; # ) & @ FreeQ[NotebookRead @ oCell , "\[Placeholder]"]
But it fails in Testing Notebook whether expected output matches or not. I understand why, but
- can I easily integrate such tests into Testing Framework, assuming I will only use Notebook interface to test them? (so no
.wlt
and testing scripts involved)