View Javadoc

1   package edu.samplu.mainmenu.test;
2   
3   import edu.samplu.common.ITUtil;
4   import edu.samplu.common.UpgradedSeleniumITBase;
5   import org.junit.Test;
6   
7   import static junit.framework.Assert.assertTrue;
8   import static org.junit.Assert.assertTrue;
9   
10  /**
11   * test that after doc search, navigating to people flow maintenance view does not cause Javascript errors
12   * and therefore interfere with JS functionality like validation
13   *
14   * @author Kuali Rice Team (rice.collab@kuali.org)
15   */
16  public class DocSearchToAnotherViewIT extends UpgradedSeleniumITBase {
17      @Override
18      public String getTestUrl() {
19          return ITUtil.PORTAL;
20      }
21  
22  	@Test
23      /**
24       * test that after doc search, navigating to people flow maintenance view does not cause Javascript errors
25       * and therefore interfere with JS functionality like validation
26       */
27  	public void testDocSearchToAnotherView() throws Exception {
28  		waitAndClick("css=img[alt=\"doc search\"]");
29  		waitForPageToLoad();
30  		selectFrame("iframeportlet");
31  		waitAndClick("css=td.infoline > input[name=\"methodToCall.search\"]");
32  		waitForPageToLoad();
33  		selectFrame("relative=top");
34  		waitAndClick("link=Main Menu");
35          setSpeed("2000");
36  		waitAndClick("link=People Flow");
37  		waitForPageToLoad();
38  		selectFrame("iframeportlet");
39  		waitAndClick("link=Create New");
40  		waitForPageToLoad();
41  		focusAndType("name=document.documentHeader.documentDescription", "sample description");
42  		focusAndType("name=document.documentHeader.explanation", "sample explanation");		
43          focus("link=Cancel");
44  		waitAndClick("link=Cancel");
45          //assertTrue(getConfirmation().matches("^Form has unsaved data\\. Do you want to leave anyway[\\s\\S]$")); //Removed Confirmation Panel From the page itself
46  	}
47  }