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 edu.sampleu.admin.workflow;
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   * @author Kuali Rice Team (rice.collab@kuali.org)
25   */
26  public class RuleAttributeAft extends WebDriverLegacyITBase {
27  
28      /**
29       *  AutomatedFunctionalTestUtils.PORTAL+"?channelTitle=Rule%20Attribute&channelUrl="+ WebDriverUtils
30       *  .getBaseUrlString()+" /kr/lookup.do?businessObjectClassName=org.kuali.rice.kew.rule.bo.RuleAttribute&docFormKey=88888888&returnLocation="
31       *  + AutomatedFunctionalTestUtils.PORTAL_URL+ AutomatedFunctionalTestUtils.HIDE_RETURN_LINK;
32       */
33      public static final String BOOKMARK_URL = AutomatedFunctionalTestUtils.PORTAL+"?channelTitle=Rule%20Attribute&channelUrl="+ WebDriverUtils
34              .getBaseUrlString()+"/kr/lookup.do?businessObjectClassName=org.kuali.rice.kew.rule.bo.RuleAttribute&docFormKey=88888888&returnLocation="
35              + AutomatedFunctionalTestUtils.PORTAL_URL+ AutomatedFunctionalTestUtils.HIDE_RETURN_LINK;
36    
37      @Override
38      protected String getBookmarkUrl() {
39          return BOOKMARK_URL;
40      }
41  
42      @Override
43      protected void navigate() throws InterruptedException {
44          waitAndClickAdministration();
45          waitAndClickByLinkText("Rule Attribute");
46      }
47  
48      protected void testRuleAttribute() throws Exception { 
49          selectFrameIframePortlet();
50          waitAndClickSearch();
51          Thread.sleep(2000);
52          assertTextPresent("1000");
53          assertTextPresent("RuleRoutingAttribute");
54          selectByName("type","Rule Xml Attribute");
55          waitAndClickSearch();
56          Thread.sleep(2000);
57          assertTextPresent("1100");
58          assertTextPresent("EDL.Campus.Example");
59          assertTextPresent("RuleXmlAttribute");
60          if(isTextPresent("1000")) {
61              jiraAwareFail("Select Filter not working !");
62          }
63      }
64  
65      @Test
66      public void testRuleAttributeBookmark() throws Exception {
67          testRuleAttribute();
68          passed();
69      }
70  
71      @Test
72      public void testRuleAttributeNav() throws Exception {
73          testRuleAttribute();
74          passed();
75      }
76  }