package guitests;

import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;

import org.junit.Test;

import guitests.guihandles.HelpWindowHandle;

public class HelpWindowTest extends TaskManagerGuiTest {

     @Test
     public void openHelpWindow() {
     // use accelerator
     commandBox.clickOnTextField();
     assertHelpWindowOpen(mainMenu.openHelpWindowUsingAccelerator());
    
     resultDisplay.clickOnTextArea();
     assertHelpWindowOpen(mainMenu.openHelpWindowUsingAccelerator());
    
     taskListPanel.clickOnListView();
     assertHelpWindowOpen(mainMenu.openHelpWindowUsingAccelerator());
    
     browserPanel.clickOnWebView();
     assertHelpWindowNotOpen(mainMenu.openHelpWindowUsingAccelerator());
    
     // use menu button
     assertHelpWindowOpen(mainMenu.openHelpWindowUsingMenu());
    
     // use command
     assertHelpWindowOpen(commandBox.runHelpCommand());
     }

    private void assertHelpWindowOpen(HelpWindowHandle helpWindowHandle) {
        assertTrue(helpWindowHandle.isWindowOpen());
        helpWindowHandle.closeWindow();
    }

    private void assertHelpWindowNotOpen(HelpWindowHandle helpWindowHandle) {
        assertFalse(helpWindowHandle.isWindowOpen());
    }

}

@@ -401,29 +401,25 @@
 lerator());%0A
-    
 %0A
+
      resultD
@@ -514,24 +514,27 @@
 tor());%0A    
+ //
 %0A     taskLi
@@ -630,24 +630,27 @@
 tor());%0A    
+ //
 %0A     browse
@@ -743,32 +743,35 @@
 lerator());%0A    
+ //
 %0A     // use men
@@ -842,20 +842,23 @@
 enu());%0A
-
     
+ //
 %0A     //

fix errors