View Javadoc

1   package edu.samplu.krad.labs;
2   
3   import edu.samplu.common.SmokeTestBase;
4   import org.junit.Test;
5   
6   /**
7    * @author Kuali Rice Team (rice.collab@kuali.org)
8    */
9   
10  public class DemoPerformanceMediumSmokeTest extends SmokeTestBase {
11  
12      /**
13       * /kr-krad/labs?viewId=Lab-PerformanceMedium
14       */
15      public static final String BOOKMARK_URL = "/kr-krad/labs?viewId=Lab-PerformanceMedium";
16  
17      /**
18       * /kr-krad/labs?viewId=Lab-PerformanceMedium&pageId=Lab-Performance-Page1#Lab-Performance-Page2
19       */
20      public static final String BOOKMARK_URL_2 = "/kr-krad/labs?viewId=Lab-PerformanceMedium&pageId=Lab-Performance-Page1#Lab-Performance-Page2&methodToCall=start";
21  
22      @Override
23      protected String getBookmarkUrl() {
24          return BOOKMARK_URL;
25      }
26  
27      @Override
28      protected void navigate() throws Exception {
29          waitAndClickByLinkText("Performance Medium");
30      }
31  
32      @Test
33      public void testPerformanceMediumBookmark() throws Exception {
34          testPerformanceMedium();
35          navigateToSecondPage(); // how to bookmark the second page?
36          //        driver.navigate().to(ITUtil.getBaseUrlString() + BOOKMARK_URL_2);
37          passed();
38      }
39  
40      @Test
41      public void testPerformanceMediumNav() throws Exception {
42          testPerformanceMedium();
43          navigateToSecondPage();
44          passed();
45      }
46  
47      private void navigateToSecondPage() throws InterruptedException {
48          waitAndClickByLinkText("Page 2");
49          waitForBottomButton();
50      }
51  
52      private void waitForBottomButton() throws InterruptedException {
53          waitForElementsPresentByXpath("//button[contains(text(), 'Refresh - Non-Ajax')]");
54      }
55  
56      protected void testPerformanceMedium()throws Exception {
57          waitForBottomButton();
58      }
59  }