Merge branch 'Jalview-JS/jim/JAL-3253-JAL-3418' into Jalview-JS/JAL-3253-applet
[jalview.git] / test / jalview / gui / HelpTest.java
index bfc3c5a..1e26c49 100644 (file)
@@ -1,6 +1,6 @@
 /*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.9.0b1)
- * Copyright (C) 2015 The Jalview Authors
+ * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
+ * Copyright (C) $$Year-Rel$$ The Jalview Authors
  * 
  * This file is part of Jalview.
  * 
@@ -30,10 +30,19 @@ import javax.help.HelpSet;
 import javax.help.HelpSetException;
 import javax.help.Map;
 
+import org.testng.annotations.BeforeClass;
 import org.testng.annotations.Test;
 
 public class HelpTest
 {
+
+  @BeforeClass(alwaysRun = true)
+  public void setUpJvOptionPane()
+  {
+    JvOptionPane.setInteractiveMode(false);
+    JvOptionPane.setMockResponse(JvOptionPane.CANCEL_OPTION);
+  }
+
   @Test(groups = { "Functional" })
   public void checkHelpTargets() throws HelpSetException
   {
@@ -44,7 +53,7 @@ public class HelpTest
 
     for (HelpId id : HelpId.values())
     {
-      String target = id.toString();
+      String target = id.getId();
       assertTrue("Unmatched target enum: " + target,
               targets.isValidID(target, hs));
     }