Kategorien
TestTools

Expand/ Collapse included FitNesse pages in CruiseControl.NET´s web dashboard

In this post I will explaing how to make included FitNesse wiki pages visible in CruiseControl.NET´s web dashboard result page.

In FitNesse you can include pages via the include-command. This is to re-use the same FitNesse wikis as subpages of different tests, e.g. to prepare the same test data for different tests. Also the SetUp-pages are included in a similar way. If you include these pages with the option „-c“ they are displayed collapsed, which is also the default behaviour for the SetUp pages.
If you want to see the content of this pages, just click the „Expand All“ link at the very right, and the included pages are visible.

FitNesse include collapsed
FitNesse include expanded

When including the FitNesse results in CruiseControl.NET´s web dashboard, as described here: „Test Driven .NET Development with FitNesse“ by Gojko Adzic these links („Expand All“ & „Collapse All“) are not working anymore, allthough they are visible.

CruiseControl.NET expand collapse not working

This is because in FitNesse this is realized by some javascript code, which is not available in the CruiseControl.NET web dashboard application. To make it available just execute the following steps:

  • Copy the file fitnesse.js from yourPath\FitNesseRoot\files\javascript to yourPath\CruiseControl.NET\webdashboard\javascript
  • Add the line to the html- of the file yourPath\CruiseControl.NET\webdashboard\templates\SiteTemplate.vm

CruiseControl.NET SiteTemplate.vm head

That´s it!
The „Expand All“ & „Collapse All“ links are now working in your CruiseControl.NET´s web dashboard exactly as in your FitNesse wiki.

Schreibe einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert

Diese Website verwendet Akismet, um Spam zu reduzieren. Erfahre mehr darüber, wie deine Kommentardaten verarbeitet werden.