View Javadoc

1   /**
2    * Copyright 2005-2013 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.containers;
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 DemoContainerTreeGroupAft extends WebDriverLegacyITBase {
26  
27      /**
28       * /kr-krad/kradsampleapp?viewId=Demo-TreeGroupView
29       */
30      public static final String BOOKMARK_URL = "/kr-krad/kradsampleapp?viewId=Demo-TreeGroupView";
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("Containers");
41          waitAndClickByLinkText("Tree Group");
42      }
43  
44      protected void testLibraryContainerTreeGroup() throws Exception {
45         waitAndClickByXpath("//div[@data-parent='Demo-TreeGroup-Example1']/div/ul/li[@class='jstree-closed']/ins");
46         waitForElementPresentByXpath("//div[@data-parent='Demo-TreeGroup-Example1']/div/ul/li[@class='jstree-open']");
47         waitAndClickByLinkText("Tree With Data Group");
48         assertElementPresentByXpath("//div[@data-parent='Demo-TreeGroup-Example2']/div/ul/li[@class='jstree-closed']/div[@class='uif-verticalBoxGroup']");
49      }
50      
51      @Test
52      public void testContainerTreeGroupBookmark() throws Exception {
53          testLibraryContainerTreeGroup();
54          passed();
55      }
56  
57      @Test
58      public void testContainerTreeGroupNav() throws Exception {
59          testLibraryContainerTreeGroup();
60          passed();
61      }  
62  }