View Javadoc
1   /**
2    * Copyright 2005-2014 The Kuali Foundation
3    *
4    * Licensed under the Educational Community License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    *
8    * http://www.opensource.org/licenses/ecl2.php
9    *
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS,
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   * See the License for the specific language governing permissions and
14   * limitations under the License.
15   */
16  package org.kuali.rice.krad.demo.uif.library.collections;
17  
18  import org.junit.Test;
19  
20  import org.kuali.rice.testtools.selenium.WebDriverLegacyITBase;
21  
22  /**
23   * @author Kuali Rice Team (rice.collab@kuali.org)
24   */
25  public class DemoCollectionFeaturesLightTableAft extends WebDriverLegacyITBase {
26  
27      /**
28       * /kr-krad/kradsampleapp?viewId=Demo-LightTableView&methodToCall=start
29       */
30      public static final String BOOKMARK_URL = "/kr-krad/kradsampleapp?viewId=Demo-LightTableView&methodToCall=start";
31  
32      @Override
33      protected String getBookmarkUrl() {
34          return BOOKMARK_URL;
35      }
36  
37      @Override
38      protected void navigate() throws Exception {
39          waitAndClickById("Demo-LibraryLink", "");
40          waitAndClickByLinkText("Collection Features");
41          waitAndClickByLinkText("Light Table");
42      }
43  
44      protected void testCollectionFeaturesLightTableBasicData() throws Exception {
45          waitAndClickByLinkText("Basic Data");
46          waitAndClickByLinkText("Basic DataFields LightTable");
47          switchToWindow("Kuali :: Light Table test");
48          waitForElementPresentByXpath("//table[@id='Demo-LightTableGroup1_lightTable']/thead/tr/th[@aria-sort='ascending']");
49          switchToWindow("Kuali");
50      }
51      
52      protected void testCollectionFeaturesLightTableInquiryLinkActions() throws Exception {
53          waitAndClickByLinkText("Inquiry, Links, and Actions");
54          waitAndClickByXpath("//section[@id='Demo-LightTable-Example2']/a");
55          switchToWindow("Kuali :: Light Table test");
56          waitForElementPresentByXpath("//table[@id='Demo-LightTableGroup2_lightTable']/tbody/tr/td/div/a");
57          waitForElementPresentByXpath("//table[@id='Demo-LightTableGroup2_lightTable']/tbody/tr/td[5]/div/fieldset/div/button");
58          switchToWindow("Kuali");
59       }
60      
61      protected void testCollectionFeaturesLightTableConditionalRender() throws Exception {
62          waitAndClickByLinkText("Conditional Render");
63          waitAndClickByXpath("//section[@id='Demo-LightTable-Example3']/a");
64          switchToWindow("Kuali :: Light Table test");
65          waitForElementPresentByXpath("//table[@id='Demo-LightTableGroup3_lightTable']/tbody/tr/td[3]");
66          switchToWindow("Kuali");
67      }
68      
69      protected void testCollectionFeaturesLightTableBasicInput() throws Exception {
70          waitAndClickByLinkText("Basic Input");
71          waitAndClickByXpath("//a[@href='http://env14.rice.kuali.org/kr-krad/uicomponents?viewId=Demo-LightTable-View4&methodToCall=start']");
72          switchToWindow("Kuali :: Light Table test");
73          waitForElementPresentByXpath("//table[@id='Demo-LightTableGroup4_lightTable']/tbody/tr/td/div/input");
74          assertElementPresentByXpath("//table[@id='Demo-LightTableGroup4_lightTable']/tbody/tr/td[3]/div/input[@type='checkbox']");
75          assertElementPresentByXpath("//table[@id='Demo-LightTableGroup4_lightTable']/tbody/tr/td[4]/div/select");
76          switchToWindow("Kuali");
77      }
78      
79      @Test
80      public void testCollectionFeaturesLightTableBasicDataBookmark() throws Exception {
81          testCollectionFeaturesLightTableBasicData();
82          passed();
83      }
84      
85      @Test
86      public void testCollectionFeaturesLightTableInquiryLinkActionsBookmark() throws Exception {
87          testCollectionFeaturesLightTableInquiryLinkActions();
88          passed();
89      }
90  
91      @Test
92      public void testCollectionFeaturesLightTableConditionalRenderBookmark() throws Exception {
93          testCollectionFeaturesLightTableConditionalRender();
94          passed();
95      }
96      
97      @Test
98      public void testCollectionFeaturesLightTableBasicInputBookmark() throws Exception {
99          testCollectionFeaturesLightTableBasicInput();
100         passed();
101     }
102 
103     @Test
104     public void testCollectionFeaturesLightTableBasicDataNav() throws Exception {
105         testCollectionFeaturesLightTableBasicData();
106         passed();
107     }
108     
109     @Test
110     public void testCollectionFeaturesLightTableInquiryLinkActionsNav() throws Exception {
111         testCollectionFeaturesLightTableInquiryLinkActions();
112         passed();
113     }
114 
115     @Test
116     public void testCollectionFeaturesLightTableConditionalRenderNav() throws Exception {
117         testCollectionFeaturesLightTableConditionalRender();
118         passed();
119     }
120     
121     @Test
122     public void testCollectionFeaturesLightTableBasicInputNav() throws Exception {
123         testCollectionFeaturesLightTableBasicInput();
124         passed();
125     }
126 }