/**
 * Copyright 2008 Matthew Hillsdon
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package net.hillsdon.reviki.webtests;

public class TestMisc extends WebTestSupport {

  public void testWikiRootRedirectsToFrontPage() throws Exception {
    assertTrue(getWebPage("pages/test/").getTitleText().contains("Front Page"));
    assertTrue(getWebPage("pages/test").getTitleText().contains("Front Page"));
  }
  
  public void testNoBackLinkToSelf() throws Exception {
    assertTrue(getWikiPage("FrontPage")
      .getByXPath("id('backlinks')//a[@href = 'FrontPage']").isEmpty());
  }
  
  public void testSidebar() throws Exception {
    String expect = "T" + System.currentTimeMillis();
    editWikiPage("ConfigSideBar", expect, "Some new content", null);
    assertTrue(getWikiPage("FrontPage").asText().contains(expect));
  }
  
}

@@ -633,16 +633,139 @@
 tests;%0A%0A
+import net.hillsdon.reviki.vc.PageReference;%0Aimport net.hillsdon.reviki.web.vcintegration.SpecialPagePopulatingPageStore;%0A%0A
 public c
@@ -1241,16 +1241,19 @@
 tSidebar
+Etc
 () throw
@@ -1270,16 +1270,116 @@
 n %7B%0A    
+for (PageReference page : SpecialPagePopulatingPageStore.COMPLIMENTARY_CONTENT_PAGES) %7B%0A      final 
 String e
@@ -1418,18 +1418,51 @@
 Millis()
-;%0A
+ + page.getPath().toLowerCase();%0A  
     edit
@@ -1474,23 +1474,22 @@
 age(
-%22ConfigSideBar%22
+page.getPath()
 , ex
@@ -1521,16 +1521,18 @@
  null);%0A
+  
     asse
@@ -1587,21 +1587,27 @@
 s(expect));%0A
+    %7D%0A
   %7D%0A  %0A%7D%0A

Make test cover header/footer too.