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 edu.sampleu.kew;
17  
18  import org.junit.Test;
19  import org.kuali.rice.testtools.selenium.AutomatedFunctionalTestUtils;
20  import org.kuali.rice.testtools.selenium.WebDriverLegacyITBase;
21  import org.kuali.rice.testtools.selenium.WebDriverUtils;
22  
23  /**
24   * Tests the Component section in Rice.
25   *
26   * @author Kuali Rice Team (rice.collab@kuali.org)
27   */
28  public class RoutingReportAft extends WebDriverLegacyITBase {
29  
30      /**
31       * AutomatedFunctionalTestUtils.PORTAL + "?channelTitle=Routing%20Report&channelUrl="
32       * + WebDriverUtils.getBaseUrlString() + "/kew/RoutingReport.do?returnLocation=" +
33       * AutomatedFunctionalTestUtils.PORTAL;
34       */
35      public static final String BOOKMARK_URL =
36              AutomatedFunctionalTestUtils.PORTAL + "?channelTitle=Routing%20Report&channelUrl=" + WebDriverUtils
37                      .getBaseUrlString() + "/kew/RoutingReport.do?returnLocation=" + AutomatedFunctionalTestUtils.PORTAL;
38  
39      @Override
40      protected String getBookmarkUrl() {
41          return BOOKMARK_URL;
42      }
43  
44      @Override
45      protected void navigate() throws InterruptedException {
46          waitAndClickMainMenu();
47          waitAndClickByLinkText("Routing Report");
48      }
49  
50      protected void testRoutingReport() throws Exception {
51          selectFrameIframePortlet();
52          selectByName("ruleTemplateId", "WorkflowDocumentDelegationTemplate");
53          //      selectFrameIframePortlet();
54          assertTextPresent(new String[] {"Enter Routing Data", "Effective Date:", "Document Type:"});
55          assertElementPresentByXpath("//input[@name='methodToCall.calculateRoute']");
56          selectByName("ruleTemplateId", "TravelRequest-DestinationRouting");
57          //      selectFrameIframePortlet();
58          waitForTextPresent("Destination:");
59      }
60  
61      @Test
62      public void testRoutingReportBookmark() throws Exception {
63          testRoutingReport();
64          passed();
65      }
66  
67      @Test
68      public void testRoutingReportNav() throws Exception {
69          testRoutingReport();
70          passed();
71      }
72  }