001/**
002 * Copyright 2005-2015 The Kuali Foundation
003 *
004 * Licensed under the Educational Community License, Version 2.0 (the "License");
005 * you may not use this file except in compliance with the License.
006 * You may obtain a copy of the License at
007 *
008 * http://www.opensource.org/licenses/ecl2.php
009 *
010 * Unless required by applicable law or agreed to in writing, software
011 * distributed under the License is distributed on an "AS IS" BASIS,
012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013 * See the License for the specific language governing permissions and
014 * limitations under the License.
015 */
016package edu.sampleu.admin;
017
018import org.kuali.rice.testtools.common.JiraAwareFailable;
019import org.kuali.rice.testtools.selenium.AutomatedFunctionalTestUtils;
020import org.kuali.rice.testtools.selenium.WebDriverUtils;
021
022/**
023 * @author Kuali Rice Team (rice.collab@kuali.org)
024 */
025public abstract class ClearIndividualCashesAftBase extends AdminTmplMthdAftNavBase {
026
027    /**
028     * ITUtil.PORTAL+"?channelTitle=Cache%20Admin&channelUrl="+WebDriverUtils.getBaseUrlString()+
029     * "/kr-krad/core/admin/cache?viewId=CacheAdmin-view1&methodToCall=start"+    
030     */
031    public static final String BOOKMARK_URL = AutomatedFunctionalTestUtils.PORTAL+"?channelTitle=Cache%20Admin&channelUrl="+ WebDriverUtils
032            .getBaseUrlString()+"/kr-krad/core/admin/cache?viewId=CacheAdmin-view1&methodToCall=start";
033
034    @Override
035    protected String getBookmarkUrl() {
036        return BOOKMARK_URL;
037    }
038
039    /**
040     * {@inheritDoc}
041     * Cache Admin
042     * @return
043     */
044    @Override
045    protected String getLinkLocator() {
046        return "Cache Admin";
047    }
048
049    public void testClearIndividualCashesBookmark(JiraAwareFailable failable) throws Exception {
050        testClearIndividualCashes();
051        passed();
052    }
053
054    public void testClearIndividualCashesNav(JiraAwareFailable failable) throws Exception {
055        testClearIndividualCashes();
056        passed();
057    }    
058    
059    public void testClearIndividualCashes() throws Exception
060    {
061        selectFrameIframePortlet();
062        waitAndClickByXpath("//ul[@class='jstree-no-icons']/li[4]/ins");
063        waitAndClickByXpath("//ul[@class='jstree-no-icons']/li[4]/ul/li[15]/a/ins");
064        waitAndClickButtonByText("Flush");
065        Thread.sleep(10000);
066        assertTextPresent("Cache: http://rice.kuali.org/krms/v2_0/TermSpecificationType was flushed for the CacheManager: krmsDistributedCacheManager.");
067        assertTextPresent("Cache Management");
068    }
069}