FitNesse. SuiteAcceptanceTests. SuiteWidgetTests.
TestContentsHelp [add child]

 Scenario Libraries

!contents with Help Text Option

Use !contents to list all or some of the child pages of the current page along with additional information such as help text, suite filters, some property settings, and graceful names.
Example:  !contents -R2 -g -p -f -h
Options
-R ...include all of the descendent pages;
-Rn ...include n levels of descendent pages;
-f ...show suite filters--define FILTER_TOC {true} for global;
-g ...show graceful names in the list--define REGRACE_TOC {true} for global;
-h ...show help property text--define HELP_TOC {true} for global;
-p ...show property suffixes--define PROPERTY_TOC {true} for global;
defaults: Suite(*), Test(+), Imported(@), Symbolic(>), Pruned(-)
define PROPERTY_CHARACTERS {*+@>-} to change.


Test Rollover Help

First create the parent page.
start Page Builder
line I'm the parent
line !contents
page ParentPage

 Included page: ContentsTestsIncludeWithHelp (edit)
Next create a child
start Page Builder
line I came first!
attributes Help=First Child's help
page ParentPage.FirstChild

Next create a sibling
start Page Builder
line I'm younger, but wiser
attributes Help=Second Child's help
page ParentPage.SecondChild

Then request the parent page.
Response Requester.
uri valid? contents?
ParentPage true  

...and examine the requested page to insure rollover help text exists
Response Examiner.
type pattern matches?
contents a href="ParentPage.FirstChild" title="First Child's help">FirstChild</a true
contents a href="ParentPage.SecondChild" title="Second Child's help">SecondChild</a true

Explicitly Request Help Text Suffix

First create the parent page.
start Page Builder
line I'm also the parent
line !contents -h
page ParentPage

 Included page: ContentsTestsIncludeWithHelp (edit)
Next create a child
start Page Builder
line I came first!
attributes Help=First Child's help
page ParentPage.FirstChild

Next create a sibling
start Page Builder
line I'm younger, but wiser
attributes Help=Second Child's help
page ParentPage.SecondChild

Then request the parent page.
Response Requester.
uri valid? contents?
ParentPage true  

...and examine the requested page to insure help text is visible
Response Examiner.
type pattern matches?
contents a href="ParentPage.FirstChild">FirstChild</a true
contents span class="pageHelp">: First Child's help</span true
contents a href="ParentPage.SecondChild">SecondChild</a true
contents span class="pageHelp">: Second Child's help</span true

Implicitly Request Help Text Suffix via Variable

First create the parent page.
start Page Builder
line I'm also the parent
line !define HELP_TOC {true}
line !contents
line !define HELP_TOC {false}
page ParentPage

 Included page: ContentsTestsIncludeWithHelp (edit)
Next create a child
start Page Builder
line I came first!
attributes Help=First Child's help
page ParentPage.FirstChild

Next create a sibling
start Page Builder
line I'm younger, but wiser
attributes Help=Second Child's help
page ParentPage.SecondChild

Then request the parent page.
Response Requester.
uri valid? contents?
ParentPage true  

...and examine the requested page to insure help text is visible
Response Examiner.
type pattern matches?
contents a href="ParentPage.FirstChild">FirstChild</a true
contents span class="pageHelp">: First Child's help</span true
contents a href="ParentPage.SecondChild">SecondChild</a true
contents span class="pageHelp">: Second Child's help</span true