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.samplu.admin.test;
17  
18  import org.kuali.rice.testtools.selenium.Failable;
19  import org.kuali.rice.testtools.selenium.ITUtil;
20  
21  /**
22   * @author Kuali Rice Team (rice.collab@kuali.org)
23   */
24  public abstract class ClearAllCashesAbstractSmokeTestBase extends AdminTmplMthdSTNavBase{
25  
26      /**
27       * ITUtil.PORTAL+"?channelTitle=Cache%20Admin&channelUrl="+ITUtil.getBaseUrlString()+
28       * "/kr-krad/core/admin/cache?viewId=CacheAdmin-view1&methodToCall=start"+    
29       */
30      public static final String BOOKMARK_URL = ITUtil.PORTAL+"?channelTitle=Cache%20Admin&channelUrl="+ITUtil.getBaseUrlString()+
31              "/kr-krad/core/admin/cache?viewId=CacheAdmin-view1&methodToCall=start";
32           
33      /**
34       * {@inheritDoc}
35       * Cache Admin
36       * @return
37       */
38      @Override
39      protected String getLinkLocator() {
40          return "Cache Admin";
41      }
42  
43      public void testClearAllCashesBookmark(Failable failable) throws Exception {
44          testClearAllCashes();
45          passed();
46      }
47  
48      public void testClearAllCashesNav(Failable failable) throws Exception {
49          testClearAllCashes();
50          passed();
51      }    
52      
53      public void testClearAllCashes() throws Exception
54      {
55          selectFrameIframePortlet();
56          waitAndClickByXpath("//li[@id='u27_node_0_parent_root']/a/ins");
57          waitAndClickByXpath("//li[@id='u27_node_1_parent_root']/a/ins");
58          waitAndClickByXpath("//li[@id='u27_node_2_parent_root']/a/ins");
59          waitAndClickByXpath("//li[@id='u27_node_3_parent_root']/a/ins");
60          waitAndClickByXpath("//li[@id='u27_node_4_parent_root']/a/ins");        
61          waitAndClickByXpath("//button[@id='u50']");
62          Thread.sleep(10000);
63          assertTextPresent("All caches were flushed for the CacheManager: coreServiceDistributedCacheManager.");
64          assertTextPresent(" Cache Management ");
65      }
66  }